on-internet
← Community

Multiframe ZSTD file: why is content_size not matched?

Stack Overflow ·

I would like to compress multiple ndjson files into ZSTD file using the Python binding python-zstandard. For random seeking later on, I would like that each file is compressed independently as a frame. For this purpose, I use import zstandard as zstd from pathlib import Path file_to_compress = [r"E:\Personal Projects\tmp\chunk_0.ndjson", r"E:\Personal Projects\tmp\chunk_0.ndjson"] file_to_compress = [Path(p) for p in file_to_compress] output_file = r"E:\Personal Projects\tmp\dataset.zst" output_file = Path(output_file) cctx = zstd.ZstdCompressor(write_content_size=True, threads=5) with open(ou

Comments

Sign in or sign up to comment and upvote.

No comments yet.