lzss

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decompress

func Decompress(api frontend.API, c []frontend.Variable, cLength frontend.Variable, d, dict []frontend.Variable, options ...DecompressionOption) (dLength frontend.Variable, err error)

Decompress decompresses c into d using dict as the dictionary which must come pre "augmented" it is on the caller to ensure that the dictionary is correct; in particular it must consist of bytes. Decompress does not check this. it is recommended to pack the dictionary using compress.Pack and take a MiMC checksum of it. d will consist of bytes It returns the length of d as a frontend.Variable; if the decompressed stream doesn't fit in d, dLength will be "-1"

func RegisterHints

func RegisterHints()

func WithoutZeroPaddingOutput

func WithoutZeroPaddingOutput(aux *decompressionAux)

WithoutZeroPaddingOutput disables the feature where all decompressor output past the end is zeroed out It saves one constraint per byte of output but necessitates more assignment work If using this option, the output will be padded by the first byte of the input past the end If further the input is not padded, the output still will be padded with zeros

Types

type DecompressionOption

type DecompressionOption func(*decompressionAux)

type DecompressionTestCircuit

type DecompressionTestCircuit struct {
	C                []frontend.Variable
	D                []frontend.Variable
	Dict             []byte
	CBegin           frontend.Variable
	CLength          frontend.Variable
	DLength          frontend.Variable
	CheckCorrectness bool
}

func (*DecompressionTestCircuit) Define

func (c *DecompressionTestCircuit) Define(api frontend.API) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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