-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Hello,
I tried to use zstd to compress log files which are continuously appended.
Execute:
#!/bin/bash
while true
do
echo "line" >> /tmp/log.txt
doneWhen I tried to compress in another session I were faced to this issue:
zstd --compress --stdout /tmp/log.txt > /tmp/log.txt.zst
zstd: error 27 : Read error : Incomplete read : 66205544 / 66194080 B
zstd -t /tmp/log.txt.zst
/tmp/log.txt.zst : 0 MB... /tmp/log.txt.zst : Decoding error (36) : Corrupted block detected
Note gzip handle this:
gzip --stdout /tmp/log.txt > /tmp/log.txt.gz
gzip: /tmp/log.txt: file size changed while zipping
gzip -v -t /tmp/log.txt.gz
/tmp/log.txt.gz: OK
Same for lz4:
lz4 --compress --stdout /tmp/log.txt > /tmp/log.txt.lz4
lz4 -t /tmp/log.txt.lz4
/tmp/log.txt.lz4 : decoded 71455396 bytes
Regards,
Reactions are currently unavailable