Skip to content

Passing size to decompress() API #223

@jtbandes

Description

@jtbandes

When streaming compression is used, the compressed frame does not include a size, and therefore ZSTD_getFrameContentSize will return ZSTD_CONTENTSIZE_UNKNOWN. Thus, the new Simple().decompress(buf) call will fail, because contentSizeImpl returns null.

However, if the caller already knows the decompressed size (by some other means), it should still be possible to use the new Simple().decompress() function. This could be achieved by passing an optional size param to the function.

Edit: I have worked around the issue by using the streaming decompress function. However I still think it would be valuable for the simple decompress function to include an optional size param.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions