Skip to content

Support larger (and maybe finer grained) window sizes #150

@benrg

Description

@benrg

LZMA supports sliding window sizes up to (I think) 1.5 GiB. I've found window sizes of hundreds of MiB to be useful. It can have a large effect on the compression ratio for some kinds of data. LZMA also supports non-power-of-2 window sizes, which can be useful when you have enough RAM for a 50% larger window but not for a 100% larger window.

Of course huge windows should never be the default at any compression level, but could they be accepted if set explicitly in ZSTD_parameters?

If you don't want to use 4 header bytes for the window size (as LZMA does), you could use a tiny floating-point format, e.g. dict_size = (8 + (packed_dict_size & 7)) << (8 + (packed_dict_size >> 3)). I don't know whether that's the biggest technical obstacle to non-power-of-2 window sizes, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions