Skip to content

Commit

Permalink
Remove unnecessary unaliasing allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner committed Sep 23, 2024
1 parent cc77be7 commit 4e4f400
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Inflate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ function _inflate(data::InflateData)
length = getlength(data, v)
distance = getdist(data)
if length <= distance
append!(out, @view out[(end - distance + 1):(end - distance + length)])
ln = Base.length(out)
resize!(out, ln+length)
copyto!(out, ln+1, out, ln-distance+1, length)
else
for i = 1:length
push!(out, out[end - distance + 1])
Expand Down

0 comments on commit 4e4f400

Please sign in to comment.