diff options
author | Max <msuraev@sysmocom.de> | 2016-02-05 13:55:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-02-18 19:45:44 +0100 |
commit | 5c18e26bc291766b0de22223abcf340bc48e3157 (patch) | |
tree | 8177990abcaed45170179e5d1910f3e8b26e1213 /tests/bits/bitcomp_test.ok | |
parent | 0a59e9899f4dd4213dc72d535f0b9d5382dc7eb7 (diff) |
Add T4 bit map compression routines
Add bit map encoder and decoder functions: decoder is fully functional
while encoder is good enough for testing - no backtracking to find
the best possible compression is implemented. If somebody is willing to
implement MS side of EDGE than this has to be expanded.
Add corresponding tests.
N. B: the encoding is implemented according to ETSI TS 44.060 which is
slightly different from T4 used for fax according to CCITT G31D (RFC 804).
Ticket: OW#2407
Sponsored-by: On-Waves ehf
Signed-off-by: Max <msuraev@sysmocom.de>
Diffstat (limited to 'tests/bits/bitcomp_test.ok')
-rw-r--r-- | tests/bits/bitcomp_test.ok | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/bits/bitcomp_test.ok b/tests/bits/bitcomp_test.ok new file mode 100644 index 00000000..238f3c47 --- /dev/null +++ b/tests/bits/bitcomp_test.ok @@ -0,0 +1,29 @@ + +running static tests... + +TEST1: + 00110111 01000111 10000001 1111 + 00110111 01000111 10000001 1111 +Encoded: +-1 00110111 01000111 10000001 1111 [28] +Expected: +0 11011110 10001000 01110101 01100101 100 [35] + 11011110 10001000 01110101 01100101 100 [35] + +Decoded: +0 00110111 01000111 10000001 1111 [28] +Expected: + 00110111 01000111 10000001 1111 + +TEST2: + 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 + 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 +Encoded: +1 11011101 01000001 00 [18] +Expected: +1 11011101 01000001 00 [18] + +Decoded: +0 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 [90] +Expected: + 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 |