Q: Input changing during compression semantics?
- Dominant language
- C
- Stars
- 27.9k
- Forks
- 2.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
I'm a maintainer on QEMU's migration code; and we recently found out the hard way that ZLib requires the input data to be stable during compression; and I'd like to know what zstd's requirements are. QEMU is a bit odd in that it is compressing the content of guest ram as it's live migrating, but if it does change it'll resend the data again.
So, speciifically for ZSTD_compressStream2 with the default 0 threads;
a) Is it legal for the input to change during the call to compressStream2?
b) If it's not legal, are the consequences defined
i) Something might crash
ii) This particular block may contain bogus data on decompression
iii) Some other entirely unrelated block might end up with bogus data on decompression.
Contributor guide
Assessment
This issue has not been assessed yet.