Skip to content

Releases: go-again/tarfs

v1.1.0

30 Mar 19:02

Choose a tag to compare

  • Add support for az format with auto-detection.
  • Add NewAz constructor that auto-detects lz4 or zstd format from stream header. Consolidates compression support under the go-again/az package, replacing separate klauspost/compress and pierrec/lz4 dependencies.
  • Update NewZstd and NewLz4 to use az internally. Update documentation, examples, and compression comparison table.

v1.0.0

26 Mar 04:49

Choose a tag to compare

  • 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.