Skip to content

Please, clarify description of ZLibEncoder.dictionary #30647

Open
@alsemenov

Description

The description of property dart:io:ZLibEncoder.dictionary reads:

List<int> dictionary
final
Initial compression dictionary.

It should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary.

It is not clear how strings (byte sequences) should be packed into List.
List<int> is a sequence of integers, so naturally it is only one sequence.
How several sequences should be stored in a List<int>?
May be the type of dictionary should be List<List<int>>?

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-io

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions