From 5e0a174fb6d2beead633bbf362cd5ab3c148d65c Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Fri, 9 Dec 2016 11:29:36 +0300 Subject: [PATCH] Uncompressed block now added to out a little bit more efficient. --- Sources/Deflate.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Deflate.swift b/Sources/Deflate.swift index 6f6e2075..d674cf2b 100644 --- a/Sources/Deflate.swift +++ b/Sources/Deflate.swift @@ -70,8 +70,11 @@ public class Deflate: DecompressionAlgorithm { // Process uncompressed data into the output // TODO: Replace precondition with guard and error throwing. precondition(pointerData.bitMask == 1, "Misaligned byte.") + var ind = out.count + out.append(contentsOf: Array(repeating: 0, count: length)) for _ in 0..