Skip to content

Content size written into frame after ZSTD_resetCStream despite contentSizeFlag not being set #641

@indygreg

Description

@indygreg

I believe I found another regression in 1.1.4 as detected by python-zstandard's test suite.

The equivalent C code is something like the following:

ZSTD_parameters params;
memset(&params, 0, sizeof(params));
cctx = ZSTD_createCCtx()
cstream = ZSTD_createCStream()
ZSTD_initCStream_advanced(cstream, NULL, 0, params, 42); /* Note non-0 size */

/* Do a compression operation with cstream */
/* The produced frame doesn't have the content size written because fparams.contentSizeFlag isn't set */

ZSTD_resetCStream(cstream, 42); /* Note non-0 size */

/* Do a 2nd compression operation with cstream */

/* Regression: the produced frame has content size == 42 written despite fparams not being set. */

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions