Skip to content

Commit

Permalink
Update min resize to 8 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Mar 27, 2024
1 parent 5347056 commit c14291c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function Base.readbytes!(stream::TranscodingStream, b::DenseArray{UInt8}, nb=len
resized = false
while filled < nb && !eof(stream)
if length(b) == filled
resize!(b, min(max(length(b) * 2, 32), nb))
resize!(b, min(max(length(b) * 2, 8), nb))
resized = true
end
filled += GC.@preserve b unsafe_read(stream, pointer(b, filled+1), min(length(b), nb)-filled)
Expand Down

0 comments on commit c14291c

Please sign in to comment.