naps.cores.compression package

Submodules

naps.cores.compression.bit_stuffing module

class naps.cores.compression.bit_stuffing.BitStuffer(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

stuffs bits from a VariableWidthStream into a dense Stream

elaborate(platform)
class naps.cores.compression.bit_stuffing.VariableWidthStream(payload_shape, name=None, reset_width=0, src_loc_at=1)

Bases: naps.stream.stream.PacketizedStream

A stream that can indicate that only n bits of the payload are relevant.

naps.cores.compression.bit_stuffing_test module

class naps.cores.compression.bit_stuffing_test.BitStufferTest(methodName='runTest')

Bases: unittest.case.TestCase

test_advanced()
test_advanced_last()
test_basic()
test_output_stream_properties()

naps.cores.compression.encoding_space module

class naps.cores.compression.encoding_space.EncodingSpace

Bases: object

property numeric_range

naps.cores.compression.huffman_encoder module

class naps.cores.compression.huffman_encoder.HuffmanEncoder(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

elaborate(platform)

naps.cores.compression.huffman_encoder_test module

class naps.cores.compression.huffman_encoder_test.HuffmanTest(methodName='runTest')

Bases: unittest.case.TestCase

test_hello_world()
test_hello_world_bit_stuffing()
test_output_stream_properties()

naps.cores.compression.rle module

class naps.cores.compression.rle.RleEncodingSpace(input_range: range, possible_run_lengths_list, zero_value)

Bases: naps.cores.compression.encoding_space.EncodingSpace

property numeric_range
class naps.cores.compression.rle.ZeroRleEncoder(*args, src_loc_at=0, **kwargs)

Bases: nmigen.hdl.ir.Elaboratable

Converts a stream of numbers into a stream of numbers (with identity mapping) and numbers for different run lengths of zeroes (with a dict of possible run lengths).

elaborate(platform)

naps.cores.compression.rle_test module

class naps.cores.compression.rle_test.RleTest(methodName='runTest')

Bases: unittest.case.TestCase

test_basic()
test_output_stream_properties()

Module contents