Skip to content

Handle output for decoders which require a minimum amount of distance codes #2

@NeRdTheNed

Description

@NeRdTheNed

Some Deflate decoders require a minimum amount of distance codes in dynamic block headers, as a workaround for bugs. Currently, deft4j will always use less distance codes if it saves space, but a flag could be added for compatibility reasons. This could be implemented in a few ways:

  • During optimisation passes, only reduce distance codes to a minimum value, regardless of how many distance codes a stream already uses.
  • Add distance additional distance codes to existing blocks if needed. During optimisation, only reduce distance codes to a minimum value.
  • When reading a file, check each block of each stream to find the minimum distance codes used below a threshold (i.e. for a threshold of 2, check if any block uses 0 distance codes or 1 distance code, and use 2 if not). During optimisation, only reduce distance codes to that amount.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions