dictionary-generator

command
v1.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Dictionary Generator

Description

This utility binary generates Zstandard compression dictionaries for ledger payloads, events and transactions. It does so by generating multiple dictionaries and incrementing their size progressively, benchmarking them to compare them, and stops when doubling the size of the dictionaries leads to negligible improvements in compression ratios. It then automatically transforms those dictionaries into Go files, ready to be used by the codec/zbor package.

Dependencies

  • zstd
  • Having a complete DPS index on your filesystem

Usage

Usage of dictionary-generator:
    -i, --index string         path to database directory for state index (default "index")
    -l, --level string         log output level (default "info")
    --dictionary-path string   path to the package in which to write dictionaries (default "./codec/zbor")
    --sample-path string       path to the directory in which to store samples for dictionary training (temporary folder when left empty) (default "./samples")
    --start-size int           minimum dictionary size in bytes to generate (will be doubled on each iteration) (default 512)
    --tolerance float          compression ratio increase tolerance, between 0 and 1 (default 0.1)

Example

The below command line generates dictionaries in the path ./package/test/ and starts with a dictionary of size 256 kB.

./dictionary-generator --dictionary-path ./package/test --start-size 256000

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL