On 4/29/20 8:02 AM, Vladimir Sementsov-Ogievskiy wrote:

+    /*
+     * The compressed stream from the input buffer may consist of more
+     * than one zstd frame.

Can it?

If not, we must require it in the specification.

Actually, now that you mention it, it would make sense anyway to add
some note to the specification on what exactly compressed with zstd means.

So, we don't know do we want one frame restriction or not. Do you have a preference?


I'm a fan of 'be strict in what you produce, liberal in what you accept'. While our implementation always produces only a single frame of compressed data, I think our decoder should be prepared to see more than one frame from other implementations, as that is more liberal than tightening the specification to require that encoding must produce exactly one frame.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to