Kristoffer Carlsson
Kristoffer Carlsson
After trying to use this for a while, I don't think this API works very well. The problem is that to extract a single file you still need to parse...
The reason for the way it is done in Pkg is to avoid having to read data that isn't used. So that's why it just reads the headers and remembers...
> When we decompress the tarball, we've already read all the data The tarball is decompressed once (when the registry is downloaded). Not every time you read the registry.
> Currently we redo all the work to load the registry on each Pkg operation, which made sense when it was possible for the registry contents to change out from...
Here is an example implementation + benchmark of keeping things compressed: ```jl using Downloads, Tar, Pkg using Pkg: PlatformEngines.exe7z reg_url = "https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/28c601505a512da4e5abebc75cd448d48b8dac9c" reg_file = "registry.tar.gz" Downloads.download(reg_url, reg_file) function untar_memory(tar_gz::AbstractString) data...
I think there should be a (very) strong use case to start putting in non-standard stuff in the tar balls. The number of people in this issue over two years...
Would be good with a test as well :)
It would be good with a test to see that the functionality is working properly and doesn't regress in the future.
Thanks, it looks like we need to update the CI infrastructure here from Travis to Github Actions. I will do that and then CI should run on this PR.
Personally I like the structure of arrays style more since it seems to often perform better.