1 USING: binhex binhex.private io.encodings.binary
2 io.streams.byte-array kernel sequences strings tools.test ;
4 { 0x0000 } [ "" crc16-binhex ] unit-test
5 { 0x58e5 } [ "A" crc16-binhex ] unit-test
6 { 0x31c3 } [ "123456789" crc16-binhex ] unit-test
7 { 0xabe3 } [ 256 CHAR: A <string> crc16-binhex ] unit-test
9 { B{ 0x41 0x90 0x64 0x42 0x43 0x90 0xff 0x43 0x90 0x2d } } [
12 300 CHAR: C <string> 3append
16 { B{ 0x2B 0x90 0x90 0x90 0x90 0x90 } } [
17 B{ 0x2B 0x90 0x00 0x90 0x05 } rle90-decode
20 { B{ 0x34 0xe3 0xd0 } } [ "0123" hqx-decode ] unit-test
22 { "0123" } [ B{ 0x34 0xe3 0xd0 } hqx-encode >string ] unit-test
25 T{ binhex f "test.txt" 0 0 0 B{ 1 2 3 4 } f }
27 binary [ write-binhex ] with-byte-writer
28 binary [ read-binhex ] with-byte-reader