-
-
Notifications
You must be signed in to change notification settings - Fork 0
Handle output for decoders which require a minimum amount of distance codes #2
Copy link
Copy link
Open
Labels
Description
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.
Reactions are currently unavailable