@@ -25,7 +25,7 @@ using namespace kanzi;
2525
2626uint64 compress1 (byte block[], uint length)
2727{
28- cout << " Test - Regular" << endl;
28+ cout << " Test - Regular (RLT+TEXT&HUFFMAN) " << endl;
2929 uint blockSize = (length / (1 + (rand () & 3 ))) & -16 ;
3030 byte* buf = new byte[length];
3131 memcpy (&buf[0 ], &block[0 ], size_t (length));
@@ -72,14 +72,18 @@ uint64 compress2(byte block[], uint length)
7272 jobs = 1 ;
7373 cout << " Test - " ;
7474#endif
75-
7675 if (checksum == 0 )
77- cout << " no checksum" << endl ;
76+ cout << " no checksum" ;
7877 else
79- cout << checksum << " bits checksum" << endl;
78+ cout << checksum << " bits checksum" ;
79+
80+ cout << " (LZX&ANS0)" << endl;
8081
8182 byte* buf = new byte[length];
8283 memcpy (&buf[0 ], &block[0 ], size_t (length));
84+ ofstream ofs (" /tmp/data.bin" );
85+ ofs.write ((const char *)block, length);
86+ ofs.close ();
8387 stringbuf buffer;
8488 iostream ios (&buffer);
8589 CompressedOutputStream* cos = new CompressedOutputStream (ios, jobs, " ANS0" , " LZX" , blockSize, checksum);
@@ -111,7 +115,7 @@ uint64 compress2(byte block[], uint length)
111115
112116uint64 compress3 (byte block[], uint length)
113117{
114- cout << " Test - incompressible data" << endl;
118+ cout << " Test - incompressible data (LZP+RLT&FPAQ) " << endl;
115119 uint blockSize = (length / (1 + (rand () & 3 ))) & -16 ;
116120 byte* buf = new byte[length];
117121 memcpy (&buf[0 ], &block[0 ], size_t (length));
@@ -150,7 +154,7 @@ uint64 compress4(byte block[], uint length)
150154 uint64 res;
151155
152156 try {
153- cout << " Test - write after close" << endl;
157+ cout << " Test - write after close (TEXT&HUFFMAN) " << endl;
154158 stringbuf buffer;
155159 iostream os (&buffer);
156160 cos = new CompressedOutputStream (os, 1 , " HUFFMAN" , " TEXT" );
@@ -176,7 +180,7 @@ uint64 compress5(byte block[], uint length)
176180 uint64 res;
177181
178182 try {
179- cout << " Test - read after close" << endl;
183+ cout << " Test - read after close (TEXT&HUFFMAN) " << endl;
180184 stringbuf buffer;
181185 iostream ios (&buffer);
182186 cos = new CompressedOutputStream (ios, 1 , " HUFFMAN" , " TEXT" );
0 commit comments