GitShow/mholt/archives
mholt

archives

Cross-platform library to create & extract archives, compress & decompress files, and walk virtual file systems across various formats

by mholt
7ziparchivesbrotlibzip2compressionextractfsgo
Star on GitHubForkWebsite

Go

441 stars46 forks20 contributorsActive · 2w agoSince 2024v0.1.5MIT

Meet the team

See all 20 on GitHub →
mholt
mholt31 contributions
M0Rf30
M0Rf303 contributions
sephriot
sephriot3 contributions
darkliquid
darkliquid2 contributions
dpgarrick
dpgarrick2 contributions
dirkmueller
dirkmueller2 contributions
Gusted
Gusted1 contribution
Hashim1999164
Hashim19991641 contribution

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 2 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
57
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · 2 in progress · Last activity 2w ago
See all on GitHub →
gage-marshall
Reporting vulnerabilitiesOpenIssue

Hi Matt, I've found an issue with this library. Could you enable advisories on this repo, or would you prefer to communicate some other way on this? Thanks in advance!

gage-marshall · 5d ago
SinTan1729
Support skipping UID and GID preservation during extrationOpenIssue

What would you like to have changed? I think this mostly applied to , but may apply to others as well. There's currently a way to skip preserving UID and GID during the archive creation process. I'd like to request the same for extraction as well. Why is this feature a useful, necessary, and/or important addition to this project? I'm using it inside a project where I don't really care about the UID and GID because they're modified later anyway. My terminal is flooded with a lot of warnings which I'd rather not see. What alternatives are there, or what are you doing in the meantime to work around the lack of this feature? I'm thinking about processing the output, and potentially filtering these warnings out. Please link to any relevant issues, pull requests, or other discussions. N/A

SinTan1729 · 1w ago
unxed
Support parallel multi-core XZ decompression when input is seekable (io.ReaderAt)OpenIssue

Hello! I would like to propose an optimization for XZ decompression. Currently, XZ decompression is performed sequentially in a single thread. We have implemented a concurrent parallel block decompressor in a fork of the underlying dependency at (which functions as a drop-in replacement). By leveraging the XZ format's native index block boundaries, the parallel decompressor parses the index backwards in O(1) time and decompresses independent blocks concurrently using a worker pool. To keep memory utilization bounded and prevent Garbage Collector overhead, we also introduced pooling for both decompressed block buffers and the large LZMA decoder dictionary slices. Benchmarks (on a 2-core / 4-thread CPU with a 20MB payload): Vanilla decompressor: ~14 MB/s Optimized sequential decompressor: ~30 MB/s Optimized parallel decompressor:** ~70 MB/s On systems with 4, 8, or more physical cores, the throughput scales near-linearly, easily exceeding 120+ MB/s. We can utilize this optimization when the input source implements and the total compressed stream size is known. Integration Instruction To utilize the parallel reader within your Go code when dealing with random-access inputs, you can check if the underlying stream supports seeking and pass it to the parallel decompressor.

unxed · 2mo ago

Recent fixes

View closed PRs →
Hashim1999164
Fix 7z Extract error message referring to zip formatMergedPR

Summary The SevenZip.Extract error path said the input must support Seek/ReadAt because of zip format constraints, and the nearby comment said the same. This updates both to say 7z, which matches the extractor and the issue report. Fixes #77 Test plan [x] go test ./...

Hashim1999164 · 2w ago
deorth-kku
Potential typo?ClosedIssue

There is an error in 7z.go: it uses "zip format" instead of "7z format". https://github.com/mholt/archives/blob/89571374212ff39c25a5ae5148000c1ca14afdb3/7z.go#L66 I was trying to stream-decompress a 7z archive and stumbled on this error. I wonder if it's a typo or not.

deorth-kku · 2w ago
Jah-yee
fix: correct 'zip format' to '7z format' in error message (7z.go:66)MergedPR

Summary Fixes user-facing error message in that incorrectly referenced 'zip format constraints' instead of '7z format constraints'. Fix Changed from: to: Ref Fixes https://github.com/mholt/archives/issues/77

Jah-yee · 2w ago
Structured data for AI agents

Repository: mholt/archives. Description: Cross-platform library to create & extract archives, compress & decompress files, and walk virtual file systems across various formats Stars: 441, Forks: 46. Primary language: Go. Languages: Go (100%). License: MIT. Homepage: https://pkg.go.dev/github.com/mholt/archives Topics: 7zip, archives, brotli, bzip2, compression, extract, fs, go, golang, gzip, lz4, lzip, rar, snappy, streams, tar, xz, zip, zlib, zstandard. Latest release: v0.1.5 (10mo ago). Open PRs: 2, open issues: 7. Last activity: 2w ago. Community health: 57%. Top contributors: mholt, M0Rf30, sephriot, darkliquid, dpgarrick, dirkmueller, Gusted, Hashim1999164, solvingj, joonas and others.

·@ofershap

Replace github.com with gitshow.dev