Changeset aa0c5c5
- Timestamp:
- 03/12/10 13:40:20 (11 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 5e26f1d
- Parents:
- 29d4438
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/wandio.c
r29d4438 raa0c5c5 48 48 { "GZ", "gz", WANDIO_COMPRESS_ZLIB }, 49 49 { "BZ2", "bz2", WANDIO_COMPRESS_BZ2 }, 50 { "LZO", "lzo", WANDIO_COMPRESS_LZO }, 50 51 { "NONE", "", WANDIO_COMPRESS_NONE } 51 52 }; … … 100 101 101 102 103 >>>>>>> .r1529 102 104 #define READ_TRACE 0 103 105 #define WRITE_TRACE 0 … … 110 112 * determine what type of compression may have been used to write 111 113 * the file */ 114 112 115 io_t *io = peek_open(stdio_open(filename)); 113 116 char buffer[1024]; … … 194 197 195 198 assert ( compression_level >= 0 && compression_level <= 9 ); 199 fprintf(stderr,"Compression level= %d\n",compression_level); 200 fprintf(stderr,"flags=%d\n",flags); 196 201 197 202 iow=stdio_wopen(filename); … … 202 207 if (compression_level != 0 && 203 208 (flags & WANDIO_COMPRESS_MASK) == WANDIO_COMPRESS_ZLIB) { 209 fprintf(stderr,"GZip compression\n"); 204 210 iow = zlib_wopen(iow,compression_level); 211 } 212 #endif 213 #if HAVE_LIBLZO2 214 else if (compression_level != 0 && 215 (flags & WANDIO_COMPRESS_MASK) == WANDIO_COMPRESS_LZO) { 216 fprintf(stderr,"Using LZO\n"); 217 iow = lzo_wopen(iow,compression_level); 205 218 } 206 219 #endif … … 208 221 else if (compression_level != 0 && 209 222 (flags & WANDIO_COMPRESS_MASK) == WANDIO_COMPRESS_BZ2) { 223 fprintf(stderr,"BZ compression\n"); 210 224 iow = bz_wopen(iow,compression_level); 211 225 } 212 226 #endif 227 else if (compression_level != 0) { 228 fprintf(stderr,"Compression %d unavailable\n",flags); 229 } 230 else { 231 fprintf(stderr,"No compression requested\n"); 232 } 213 233 /* Open a threaded writer */ 214 234 if (use_threads)
Note: See TracChangeset
for help on using the changeset viewer.