[fix] [#14] File handler: Don't truncate gzip output

This commit is contained in:
Peter Taoussanis 2024-08-05 17:42:12 +02:00
parent 6e94215e7a
commit 2d4b049717

View file

@ -23,7 +23,7 @@
stream-out (java.io.FileOutputStream. file-out)
gz-out (java.util.zip.GZIPOutputStream. stream-out 2048 false)]
(let [read-buffer (byte-array 4096)]
(let [read-buffer (byte-array (.length file-in))]
(loop []
(let [bytes-read (.read stream-in read-buffer)]
(when-not (== -1 bytes-read)