Documentation ¶
Index ¶
- Constants
- func FirmwareBlockCompress(data []byte, exhaustive bool) (output []byte, err error)
- func FirmwareBlockDecompress(data []byte) (output []byte, err error)
- type Window
- func (t *Window) Find(windowIndex int, buf []byte, exhaustive bool) (offsetIndex, length int)
- func (t *Window) GetByte(offsetIndex int) byte
- func (t *Window) GetSet(offsetIndex, windowIndex, length int, buf []byte) (int, []byte)
- func (t *Window) GetSetByte(offsetIndex, windowIndex int) (int, byte)
- func (t *Window) Index(i int) int
- func (t *Window) Peek(offsetIndex, length int, buf []byte) []byte
- func (t *Window) Set(windowIndex int, buf []byte) int
- func (t *Window) SetByte(windowIndex int, data byte) int
Constants ¶
View Source
const DataMaxSize = 0x8000
View Source
const LengthBits = 4
View Source
const LiteralBits = 8
View Source
const MaxCoded = MaxUncoded + (1 << LengthBits)
View Source
const MaxUncoded = 2
View Source
const OffsetBits = 11
OffsetBits Number of bits for the Window offset. From this the WindowSize will be calculated In other LZSS implementations, this is usually set to 12
View Source
const WindowFillValue = 0x20
WindowFillValue Initial value to fill Window[0 : WindowInitialIndex] In other LZSS implementations, this is usually set to 0x20, but Window[] is filled entirely
View Source
const WindowInitialIndex = WindowSize - 0x10 - 1
WindowInitialIndex The windowIndex needs to be set to this before compression/decompression In other LZSS implementations, this is usually set to 0
View Source
const WindowSize = 1 << OffsetBits
Variables ¶
This section is empty.
Functions ¶
func FirmwareBlockCompress ¶
func FirmwareBlockDecompress ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.