Releases: go-again/tarfs
Releases · go-again/tarfs
v1.1.0
- Add support for az format with auto-detection.
- Add
NewAzconstructor that auto-detects lz4 or zstd format from stream header. Consolidates compression support under thego-again/azpackage, replacing separateklauspost/compressandpierrec/lz4dependencies. - Update
NewZstdandNewLz4to use az internally. Update documentation, examples, and compression comparison table.
v1.0.0
- Add tarfs package implementing a read-only, in-memory fs.FS backed by
tar archives. - Core implementation (tarfs.go):
- FS type storing entries and synthesized directory structure.
- Supports fs.FS, fs.ReadDirFS and fs.ReadFileFS.
- File handles implement fs.File, fs.ReadDirFile and io.Seeker
(enables HTTP range requests). - Normalizes paths (strips "./"), synthesizes missing directory
headers, returns sorted directory listings. - Constructors: New (raw tar), NewFromReader (streaming tar).
- Compression helpers:
- NewGzip (gzip)
- NewZstd (zstd via github.com/klauspost/compress)
- NewLz4 (lz4 via github.com/pierrec/lz4/v4)
- NewBzip2 (bzip2 using stdlib decode)
- Add comprehensive tests (tarfs_test.go) exercising plain tar, gzip,
zstd, lz4, bzip2, path normalization, synthetic dirs, fs.Sub and
net/http.FileServer integration (including range requests). - Documentation: README.md with usage examples (embed via //go:embed,
serving with http.FileServer), compression comparisons, SPA fallback
example, dev-mode placeholder and API reference. - Module files: go.mod and go.sum with required dependencies.
- License: MIT.