Commit Graph

48 Commits

Author SHA1 Message Date
Caleb Gardner e1449da2f0 Fix memory leaks & inefficiencies 2025-06-07 02:07:45 -05:00
Caleb Gardner 97214ca6ca Finished readers (theoretically) 2025-06-06 11:05:43 -05:00
Caleb Gardner 1f0868fb21 Added -show-hard-links to go-unsquashfs
Exposed the underlying squashfslow values for File and FS
2025-06-06 11:05:43 -05:00
Caleb Gardner 3378651686 Re-write data fullreader & reader
Moved directory and the rest of the inodes to manual decoding
2025-06-06 06:37:39 -05:00
Caleb Gardner 4490fc3873 Removed all the pointers 2025-04-10 02:15:24 -05:00
Anders F Björklund e6b0b83dcb Add support for uid/gid 2025-03-15 17:50:02 +01:00
Anders F Björklund 24a9457c6b Refactor: export FileInfo 2025-03-15 17:35:40 +01:00
Caleb Gardner 87b5ac7f5d gopls modernize 2025-02-27 02:46:22 -06:00
Caleb Gardner 2a33cad709 PERFORMANCE
Changed some struct values from pointers to normal values for improved performance.
2024-07-17 09:30:16 -05:00
Caleb Gardner 144805e747 Rename squashfslow.Base to squashfslow.FileBase 2023-12-27 23:50:27 -06:00
Caleb Gardner bfba5d5b60 Rename squashfs/squashfs to squashfs/low
squashfs/low library name is now squashfslow
2023-12-27 23:25:49 -06:00
Caleb Gardner 17d45eea50 Finishing touches
Added FastOptions as an alternative to DefaultOptions
A few performance improvements
A few bug fixes
2023-12-27 21:35:40 -06:00
Caleb Gardner d9132ab6a4 Finished. Now for bug fixes 2023-12-24 18:20:05 -06:00
Caleb Gardner 5de59627df Started working on the main library (nearly complete) 2023-12-24 08:05:56 -06:00
Caleb Gardner 6ad6857d8d Renamed files to make them more clear
Trying to figure out how to write. Might have to keep tables uncompressed for now.
2021-04-30 02:52:27 -05:00
Caleb Gardner 7f5fa3ba1f Some quick fixes for "correctness" 2021-04-03 01:17:09 -05:00
Caleb Gardner d89153c3e2 Finished io/FS interface 2021-01-30 06:30:00 -06:00
Caleb Gardner 3f1b2a8d1e Restructure for 1.16 io/fs interface 2021-01-29 12:55:57 -06:00
Caleb Gardner dd08d3516d Reader will now check BlockLog 2021-01-20 14:10:14 -06:00
Caleb Gardner 8dba30e24f Some setup for 1.16 2021-01-20 12:55:39 -06:00
Caleb Gardner 80946f58e7 Fixed issue with Extended Symlinks
Removed some shadowed err's
2021-01-16 01:32:00 -06:00
Caleb Gardner 4187598783 A couple of fixes.
GetChildrenRecursively is no longer threaded so it's more consistent
Fixed GetFileAtPath, specifically when getting the root dir
2021-01-15 10:57:03 -06:00
Caleb Gardner 9cf92c4916 Removed some shadowed values (thanks gopls) 2021-01-13 11:45:10 -06:00
Caleb Gardner dcf59a4261 The root inode is now only initialized once.
Privated File.Reader because it really shouldn't be public.
2021-01-12 01:43:03 -06:00
Caleb Gardner 76649fde7f Implemented WriteTo which halves decompress times.
Added a drag race benchmark (for the fun of it)
2021-01-10 03:33:33 -06:00
Caleb Gardner 18092c63aa Some cleanup, no change in functionality 2021-01-09 09:53:58 -06:00
Caleb Gardner 35d22b4bd0 Removed close function from squashfs.File
This seems to cause issues in ver specific circumstances and ultimately, isn't needed.
2021-01-06 12:56:09 -06:00
Caleb Gardner 47c28baf87 Improved data structure for structs.
Thanks gopls with VS Code
2020-12-28 11:50:56 -06:00
Caleb Gardner 89ec7eb0fb Fixed GetSymlinkFile
Added GetSymlinkFileRecursive
2020-12-16 02:39:35 -06:00
Caleb Gardner 495d2345a4 File now implements os.FileInfo 2020-12-11 01:38:53 -06:00
Caleb Gardner 1da97137a5 Implemented #1
You can dereference a symlink when extracting.
2020-12-08 09:41:10 -06:00
Caleb Gardner e5d4d0902f Finished wildcard support.
Realized that path.Match works perfectly for my wildcard needs.
2020-12-07 10:41:45 -06:00
Caleb Gardner c0f3695cca Working on wildcards before next release. 2020-12-05 15:05:19 -06:00
Caleb Gardner fef7bec20d Extracting is mostly finished.
Fixed reading metadata and data blocks that are the exactly correct size
2020-12-02 01:05:31 -06:00
Caleb Gardner 28bb0f873a Things just aren't working right now...
Had to re-write a seemingly fine for loop because it wouldn't increment
Extracting just isn't working right now.
I'm waaaay too tired for this right now, lol.
2020-12-01 15:29:25 -06:00
Caleb Gardner e302d98665 Further work on extracting
Extracting files is threaded with goroutines.
Extracting also sets the proper UID and GUID
Made recursive children getting threaded with goroutines
Decided I will allow wildcards in paths. Hasn't been implemented though.
Fixed issues with ExtendedDirectory reading (I was using a uint16 instead of a uint32)
I couldn't test basically any of this. somehow a for loop isn't incrementing. For seemingly no reason.
2020-12-01 06:14:09 -06:00
Caleb Gardner 1254df2861 Working on extracting files. 2020-11-30 15:13:47 -06:00
Caleb Gardner c5c6291643 Some more work on ExtractTo
Added Xz compression support
Started testing using a big squashfs fil (particularly the squashfs from an Arch Linux install img)
2020-11-30 03:53:57 -06:00
Caleb Gardner 508a33b323 Starting work on ExtractTo from File
When using ExtractTo, will automatically set the correct permissions
Will also be able to extract folders
2020-11-29 15:55:06 -06:00
Caleb Gardner c5f1962e72 Some documentation changes 2020-11-29 03:07:34 -06:00
Caleb Gardner e20213c3f7 Reorganization. 2020-11-28 05:03:56 -06:00
Caleb Gardner edd63a422b Support for ../ in directory paths 2020-11-28 02:39:58 -06:00
Caleb Gardner cea69188d4 Symlink file support
You can get the path that the symlink is pointing to, AND get the squashfs.File for it.
You can also now give a path FROM a given squashfs.File directory.
2020-11-28 02:22:48 -06:00
Caleb Gardner 23ec7ea6dd First version of File interface.
This will allow you to easily find and extract files.
Extraction of whole folders coming next. (Maybe)
2020-11-27 00:36:21 -06:00
Caleb Gardner 8358cb2805 Added a couple ways to find a particular file. 2020-11-26 09:16:55 -06:00
Caleb Gardner 9471b93ead Working on a better API to interact with squashfs
New API uses a File that can hold more information.
2020-11-26 03:47:44 -06:00
Caleb Gardner 77222f55f5 More setup for Files. 2020-11-25 13:57:38 -06:00
Caleb Gardner 9beca864c3 Starting work on file.
File will be the primary way to interact with squashfs files in the future.
I will be making Files for both reading and writing
2020-11-25 13:20:42 -06:00