We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb0f56b commit 7255613Copy full SHA for 7255613
src/extract.jl
@@ -611,11 +611,12 @@ tarball root and must only match a single entry.
611
"""
612
function extract_file(predicate::Function, tarball::ArgRead, out::ArgWrite)::Vector{Header}
613
headers = Header[]
614
+ buf = Vector{UInt8}(undef, DEFAULT_BUFFER_SIZE)
615
arg_read(tarball) do tar; arg_write(out) do io
616
read_tarball(predicate, tar) do hdr, _
617
if hdr.type == :file # TODO: read symlinks??
618
push!(headers, hdr)
- read_data(tar, io, size=hdr.size)
619
+ read_data(tar, io; size=hdr.size, buf)
620
end
621
622
end end
0 commit comments