()
| 660 | } |
| 661 | |
| 662 | @Test |
| 663 | public void testBlockSwitchMessage() { |
| 664 | byte[] compressed = { |
| 665 | (byte) 0x1b, (byte) 0x0b, (byte) 0x00, (byte) 0xd1, (byte) 0xe1, (byte) 0x01, (byte) 0xc6, |
| 666 | (byte) 0xe0, (byte) 0xe2, (byte) 0x06, (byte) 0x04, (byte) 0x00, (byte) 0x91, (byte) 0xb2, |
| 667 | (byte) 0x70, (byte) 0xfe, (byte) 0x7e, (byte) 0x11, (byte) 0x16, (byte) 0x62, (byte) 0x00, |
| 668 | (byte) 0x00, (byte) 0x1c, (byte) 0x6c, (byte) 0x99, (byte) 0xc4, (byte) 0x00, (byte) 0x09, |
| 669 | (byte) 0x00, (byte) 0x80, (byte) 0x3b, (byte) 0x6d, (byte) 0x02, (byte) 0x08, (byte) 0x82, |
| 670 | (byte) 0x00, (byte) 0x00, (byte) 0x00 |
| 671 | }; |
| 672 | checkSynth( |
| 673 | /* |
| 674 | * // Uses blocks with 1-symbol Huffman codes that take 0 bits, so that it |
| 675 | * // is the block-switch commands that encode the message rather than actual |
| 676 | * // literals. |
| 677 | * main_header |
| 678 | * metablock_header_begin: 1, 0, 12, 0 |
| 679 | * // two literal block types |
| 680 | * vlq_blocktypes: 2 |
| 681 | * huffman_simple: 1,4,4, 1,0,2,3 // literal blocktype prefix code |
| 682 | * huffman_fixed: 26 // literal blockcount prefix code |
| 683 | * blockcount_easy: 2 // 2 a's |
| 684 | * // one ins/copy and dist block type |
| 685 | * vlq_blocktypes: 1 |
| 686 | * vlq_blocktypes: 1 |
| 687 | * ndirect: 0, 0 |
| 688 | * // two MSB6 literal context modes |
| 689 | * bits: "00", "00" |
| 690 | * // two literal prefix codes |
| 691 | * vlq_blocktypes: 2 |
| 692 | * // literal context map |
| 693 | * vlq_rlemax: 5 |
| 694 | * huffman_simple: 0,3,7, 5,0,6 // context map RLE Huffman code |
| 695 | * // context map RLE: repeat 0 64 times, 1+5 64 times |
| 696 | * bits: "01", "0", "11111", "11", "0", "11111" |
| 697 | * bit: 1 // MTF enabled |
| 698 | * // one distance prefix code |
| 699 | * vlq_blocktypes: 1 |
| 700 | * huffman_simple: 0,1,256, 97 // only a's |
| 701 | * huffman_simple: 0,1,256, 98 // only b's |
| 702 | * huffman_fixed: 704 |
| 703 | * huffman_fixed: 64 |
| 704 | * // now comes the data |
| 705 | * command_inscopy_easy: 12, 0 |
| 706 | * bits: "0"; blockcount_easy: 2 // switch to other block type; 2 b's |
| 707 | * bits: "0"; blockcount_easy: 5 // switch to other block type; 5 a's |
| 708 | * bits: "0"; blockcount_easy: 1 // switch to other block type; 1 b |
| 709 | * bits: "0"; blockcount_easy: 1 // switch to other block type; 1 a |
| 710 | * bits: "0"; blockcount_easy: 1 // switch to other block type; 1 b |
| 711 | */ |
| 712 | compressed, |
| 713 | true, |
| 714 | "aabbaaaaabab" |
| 715 | ); |
| 716 | } |
| 717 | |
| 718 | @Test |
| 719 | public void testClClTreeDeficiency() { |
nothing calls this directly
no test coverage detected