Check out some of my articles on dev.to and Medium.
Some of my talks (in french ๐ซ๐ท) are available on this Youtube playlist.
Cheers ๐ป
Read a tar file contents using go1.16 io/fs abstraction
Home Page: https://pkg.go.dev/github.com/nlepage/go-tarfs
License: The Unlicense
Check out some of my articles on dev.to and Medium.
Some of my talks (in french ๐ซ๐ท) are available on this Youtube playlist.
Cheers ๐ป
It looks like we inadvertently introduced a regression in v1.2.0. It no longer correctly handles opening a PAX global header.
We still correctly record the presence of the pax_global_header
entry in the tarfs entries map. However e.reader()
returns an error for it when calling tr.Next()
.
Here's a tar.gz that exhibits the regression: https://github.com/helm/examples/archive/refs/tags/hello-world-0.1.0.tar.gz
Use tarfiles from https://github.com/golang/go/tree/master/src/archive/tar/testdata in the tests
Some tar files may have file entries with a path inside of a directory (eg dir1/file11
), but miss corresponding directory entries (eg have no entry for dir1
).
ping @mihaibuzgau @viovanov I saw both of you had forks to support this, I just released a v1.1.0 which supports this.
I've been a user of this library, and I find it really useful (thanks!).
However, I've noticed that the files within the tar are fully read into memory, even if the underlying reader supports io.ReaderAt
. If the underlying reader does support io.ReaderAt
, it seems like it would be a significant memory optimization to use io.SectionReader
instead of bytes.Buffer
, so that fs.FS
operations could read file contents directly out of the reader.
Is this something that would be possible to explore in this library?
STEPS
Create an archive:
mkdir empty_dir
tar -cf fs_test_infinite_loop.tar -C empty_dir .
Walk the archive using fs.WalkDir
function.
EXPECTED:
The walk function is called once.
OBSERVED:
The walk function is in an infinite loop.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.