258 Commits

Author SHA1 Message Date
Caleb J. Gardner 3060c4056d Fix #44 v1.4.1 2026-03-08 06:11:15 -05:00
Caleb Gardner f5e9907829 Merge pull request #42 from mikelolasagasti/0bsd-xz
[PATCH] Change xz module due to licensing concerns
2025-06-12 00:03:59 -05:00
Mikel Olasagasti Uranga 9fb4f8839d [PATCH] Change xz module due to licensing concerns
The original module `github.com/xi2/xz/` is in the Public Domain but
does not explicitly specify a license. The module has not been updated
since 2017.

The fork at `github.com/therootcompany/xz` simply adds a Creative
Commons CC0 1.0 Universal (CC0-1.0) license declaration for Public
Domain use. However, this license has been disallowed by Fedora since
2022, as announced in the [Fedora Legal
thread](https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/RRYM3CLYJYW64VSQIXY6IF3TCDZGS6LM/#EO4JUQRG4GDLRHJHJBUZDR2RHMXNU5HT), and the restriction also applies to RHEL and related distributions.

The module at `github.com/mikelolasagasti/xz` is a fork of `xi2/xz`, but
declares the BSD Zero Clause License (0BSD) instead. This aligns with
the licensing of the upstream source from which `xi2/xz` originally
derives, which has moved from [Public Domain to 0BSD for recent
updates](https://tukaani.org/xz/embedded.html#_licensing).

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2025-06-11 22:42:59 +02:00
Caleb Gardner a829f0df9f Accidentally re-added caching_paged_reader v1.4.0 2025-06-07 03:13:33 -05:00
Caleb Gardner ea1b9f20cb Merge pull request #41 from CalebQ42/redo-extract
Redo extract
2025-06-07 03:12:55 -05:00
Caleb Gardner 74d9239c25 Merge branch 'main' into redo-extract 2025-06-07 03:12:42 -05:00
Caleb Gardner 07e9d5f123 Re-added FastOptions
Reset DefaultOptions to half NumCPU
2025-06-07 02:54:30 -05:00
Caleb Gardner 9fd87fe38a More efficient Table reading 2025-06-07 02:43:32 -05:00
Caleb Gardner de1b18fd1c Removed squashfs.test 2025-06-07 02:17:39 -05:00
Caleb Gardner 7d1458b3a4 Add memory & cpu profiles to gitignore 2025-06-07 02:09:43 -05:00
Caleb Gardner b057df9ada Remove memory profile 2025-06-07 02:09:21 -05:00
Caleb Gardner e1449da2f0 Fix memory leaks & inefficiencies 2025-06-07 02:07:45 -05:00
Caleb Gardner ddb81aade0 Rework caching_paged_reader into Table[T]
This *should* fix some issues with extraction due to race conditions
2025-06-06 15:46:25 -05:00
Caleb Gardner b2c8084f41 Minor tweaks 2025-06-06 15:46:25 -05:00
Will Murphy 0905141013 fix: prevent index out of range on long frag tables
Previously, reading fragment 512 would panic with index out of range.
Fix that panic by introducing an abstraction over reading blocks of
items, caching the intermediate result, and returning an item at a
particular index. The primary goal of this abstraction is to make edge
cases like requesting items on page boundaries easy to unit test for.

Additionally, fix unit tests by making t.Fatal calls protected by
nil checks on the error values.
2025-06-06 15:46:22 -05:00
Caleb Gardner 66042eab27 Merge pull request #30 from willmurphyscode/upstream-fix-out-of-range-panic
fix: prevent index out of range on long frag tables
2025-06-06 14:26:20 -05:00
Caleb Gardner 02d98b610c Merge branch 'main' into upstream-fix-out-of-range-panic 2025-06-06 14:26:10 -05:00
Caleb Gardner 81b663b48a Tested and working 2025-06-06 11:20:42 -05:00
Caleb Gardner 97214ca6ca Finished readers (theoretically) 2025-06-06 11:05:43 -05:00
Caleb Gardner 968dff82cb Fixed always showing hardlink info 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 f378136299 Added OpenFile to get a *squashfs.File instead of fs.File
Added -e to extract only specific files/folders
Only require the filename for -l, -ll, and -lln
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 ebbbc9e87e Merge pull request #40 from CalebQ42/go-unsquashfs-hardlinks
go-unsquashfs hardlinks & squashfslow access
v1.3.0
2025-05-25 13:53:38 -05:00
Caleb Gardner 155999a8e3 Fixed always showing hardlink info 2025-05-25 13:45:51 -05:00
Caleb Gardner 7930f4402b Added -show-hard-links to go-unsquashfs
Exposed the underlying squashfslow values for File and FS
2025-05-25 13:35:40 -05:00
Caleb Gardner ada61a391c Added OpenFile to get a *squashfs.File instead of fs.File
Added -e to extract only specific files/folders
Only require the filename for -l, -ll, and -lln
2025-05-21 01:11:24 -05:00
Caleb Gardner f32cb520dc Zstd re-use 2025-04-16 18:02:19 -05:00
Caleb Gardner f991ddb1d4 Don't ignore permissions in benchmark tests 2025-04-16 16:22:32 -05:00
Caleb Gardner 4c8c9f0b47 Re-use zstd and zlib readers 2025-04-16 05:49:42 -05:00
Caleb Gardner 8a2556ea0d Remove test file 2025-04-16 05:16:58 -05:00
Caleb Gardner 33156751ca Merge pull request #39 from CalebQ42/perfExp
Performance
v1.2.0
2025-04-10 11:26:24 -05:00
Caleb Gardner 6224c4be41 Further performance improvements
Further removed multiple pointer instances
Re-use decompression readers (except zstd due to bugs)
2025-04-10 11:20:55 -05:00
Caleb Gardner 6b0e9ef2c6 Reduce use of binary.Read and, by extention, reflection 2025-04-10 06:26:41 -05:00
Caleb Gardner 4490fc3873 Removed all the pointers 2025-04-10 02:15:24 -05:00
Caleb Gardner f242de2710 Better disabling of compression types v1.1.0 2025-03-17 06:53:29 -05:00
Caleb Gardner 88315ee384 Fix build flags 2025-03-17 06:28:31 -05:00
Caleb Gardner 1e2a8f4b75 go mod tidy 2025-03-17 06:22:24 -05:00
Caleb Gardner 863b03fb19 Updated README 2025-03-17 06:21:19 -05:00
Caleb Gardner d3f84344d1 Fix build flags in lzma.go & xz.go 2025-03-17 06:19:45 -05:00
Caleb Gardner ad24995b7b Change no_lzma and no_lzo to no_obsolete and no_gpl
Added build tags section to README
2025-03-17 06:16:25 -05:00
Caleb Gardner 638355ab71 Merge pull request #37 from afbjorklund/comp-none
Allow disabling lzo and lzma
2025-03-17 05:45:26 -05:00
Anders F Björklund 04d914d403 Allow disabling lzo and lzma
By setting the buildtags "no_lzo" and/or "no_lzma",
one can drop the library dependency on lzo and lzma.

The same could be done for xz as well, but there are
still lots of archives using xz compression out there.
2025-03-16 13:56:04 +01:00
Caleb Gardner 7323fe56f6 Merge pull request #35 from afbjorklund/list
Add list option to unsquashfs
2025-03-15 15:48:41 -05:00
Caleb Gardner 6286da31e1 Merge branch 'main' into list 2025-03-15 15:48:06 -05:00
Caleb Gardner 77c87a9653 Merge pull request #34 from afbjorklund/unsquashfs-offset
Allow mounting with an offset
2025-03-15 15:34:04 -05:00
Anders F Björklund e6b0b83dcb Add support for uid/gid 2025-03-15 17:50:02 +01:00
Anders F Björklund cef9090210 Add support for symlinks 2025-03-15 17:46:02 +01:00
Anders F Björklund 24a9457c6b Refactor: export FileInfo 2025-03-15 17:35:40 +01:00
Anders F Björklund e0c1309ed4 Add list option to unsquashfs 2025-03-15 17:32:27 +01:00