isa-l/igzip/rfc1951_lookup.asm

88 lines
3.2 KiB
NASM
Raw Normal View History

%ifndef RFC1951_LOOKUP
%define RFC1951_LOOKUP
section .data
align 8
;; /* Structure contain lookup data based on RFC 1951 */
;; struct rfc1951_tables {
;; uint8_t len_to_code[264];
;; uint8_t dist_extra_bit_count[32];
;; uint32_t dist_start[32];
;; uint8_t len_extra_bit_count[32];
;; uint16_t len_start[32];
;; };
global rfc1951_lookup_table:data internal
rfc1951_lookup_table:
len_to_code:
db 0x00, 0x00, 0x00
db 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
db 0x09, 0x09, 0x0a, 0x0a, 0x0b, 0x0b, 0x0c, 0x0c
db 0x0d, 0x0d, 0x0d, 0x0d, 0x0e, 0x0e, 0x0e, 0x0e
db 0x0f, 0x0f, 0x0f, 0x0f, 0x10, 0x10, 0x10, 0x10
db 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
db 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12
db 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13
db 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14
db 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15
db 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15
db 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16
db 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16
db 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17
db 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17
db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18
db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18
db 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19
db 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19
db 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19
db 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19
db 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a
db 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a
db 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a
db 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a
db 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b
db 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b
db 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b
db 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b
db 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c
db 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c
db 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c
db 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1d
db 0x00, 0x00, 0x00, 0x00, 0x00
dist_extra_bit_count:
db 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02
db 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06
db 0x07, 0x07, 0x08, 0x08, 0x09, 0x09, 0x0a, 0x0a
db 0x0b, 0x0b, 0x0c, 0x0c, 0x0d, 0x0d, 0x00, 0x00
dist_start:
dd 0x00000001, 0x00000002, 0x00000003, 0x00000004
dd 0x00000005, 0x00000007, 0x00000009, 0x0000000d
dd 0x00000011, 0x00000019, 0x00000021, 0x00000031
dd 0x00000041, 0x00000061, 0x00000081, 0x000000c1
dd 0x00000101, 0x00000181, 0x00000201, 0x00000301
dd 0x00000401, 0x00000601, 0x00000801, 0x00000c01
dd 0x00001001, 0x00001801, 0x00002001, 0x00003001
dd 0x00004001, 0x00006001, 0x00000000, 0x00000000
len_extra_bit_count:
db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
db 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02
db 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04
db 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00
len_start:
dw 0x0003, 0x0004, 0x0005, 0x0006
dw 000007, 0x0008, 0x0009, 0x000a
dw 0x000b, 0x000d, 0x000f, 0x0011
dw 0x0013, 0x0017, 0x001b, 0x001f
dw 0x0023, 0x002b, 0x0033, 0x003b
dw 0x0043, 0x0053, 0x0063, 0x0073
dw 0x0083, 0x00a3, 0x00c3, 0x00e3
dw 0x0102, 0x0000, 0x0000, 0x0000
%endif ; RFC1951_LOOKUP