struct

CrImage::JPEG::HuffmanTable

Inherits Struct / Value / Object

Huffman table for JPEG encoding/decoding

Constants

FAST_BITS = 12
FAST_SIZE = 1 << FAST_BITS

Constructors

new(bits : Array(UInt8), values : Array(UInt8))
Source

Instance methods

bits
Source
bits=(bits : Array(UInt8))
Source
build_decode_table

Build decoding lookup tables from bits and values arrays

Source
codes
Source
codes=(codes : Array(UInt16))
Source
decode(reader : BitReader) : UInt8

Decode the next Huffman symbol from the BitReader Returns the decoded symbol value (0-255)

Source
encode_codes
Source
encode_codes=(encode_codes : StaticArray(UInt16, 256))
Source
encode_sizes
Source
encode_sizes=(encode_sizes : StaticArray(UInt8, 256))
Source
look_fast
Source
look_fast=(look_fast : Slice(UInt16))
Source
maxcode
Source
maxcode=(maxcode : Array(Int32))
Source
mincode
Source
mincode=(mincode : Array(Int32))
Source
sizes
Source
sizes=(sizes : Array(UInt8))
Source
valptr
Source
valptr=(valptr : Array(Int32))
Source
values
Source
values=(values : Array(UInt8))
Source