Rev 27 | Rev 33 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 27 | Rev 30 | ||
---|---|---|---|
Line 372... | Line 372... | ||
372 | { |
372 | { |
373 | compressed_blocksize = (file.bytes[current_offset + 0] << 8) | (file.bytes[current_offset + 1] << 0); // read block size word (in big engian) |
373 | compressed_blocksize = (file.bytes[current_offset + 0] << 8) | (file.bytes[current_offset + 1] << 0); // read block size word (in big engian) |
374 | current_offset += 2; // skip it |
374 | current_offset += 2; // skip it |
375 | if (compressed_blocksize == 0) |
375 | if (compressed_blocksize == 0) |
376 | break; // a nil block size means end of stream is reached |
376 | break; // a nil block size means end of stream is reached |
377 | LOG_DEBUG |
377 | //LOG_DEBUG ("about to decompress block of %zd bytes", compressed_blocksize); |
378 | decompressor_in = &file.bytes[current_offset]; |
378 | decompressor_in = &file.bytes[current_offset]; |
379 | decompressor_out = &decompression_dst.bytes[decompression_dst.size]; |
379 | decompressor_out = &decompression_dst.bytes[decompression_dst.size]; |
380 | decompressor_outlen = 0; |
380 | decompressor_outlen = 0; |
381 | 381 | ||
382 | if (cf == STARTUP_HDR_FLAGS1_COMPRESS_UCL) |
382 | if (cf == STARTUP_HDR_FLAGS1_COMPRESS_UCL) |
Line 773... | Line 773... | ||
773 | { |
773 | { |
774 | compressed_blocksize = (file.bytes[current_offset + 0] << 8) | (file.bytes[current_offset + 1] << 0); // read block size word (in big engian) |
774 | compressed_blocksize = (file.bytes[current_offset + 0] << 8) | (file.bytes[current_offset + 1] << 0); // read block size word (in big engian) |
775 | current_offset += 2; // skip it |
775 | current_offset += 2; // skip it |
776 | if (compressed_blocksize == 0) |
776 | if (compressed_blocksize == 0) |
777 | break; // a nil block size means end of stream is reached |
777 | break; // a nil block size means end of stream is reached |
778 | LOG_DEBUG |
778 | //LOG_DEBUG ("about to decompress block of %zd bytes", compressed_blocksize); |
779 | decompressor_in = &file.bytes[current_offset]; |
779 | decompressor_in = &file.bytes[current_offset]; |
780 | decompressor_out = &decompression_dst.bytes[decompression_dst.size]; |
780 | decompressor_out = &decompression_dst.bytes[decompression_dst.size]; |
781 | decompressor_outlen = 0; |
781 | decompressor_outlen = 0; |
782 | 782 | ||
783 | if (cf == STARTUP_HDR_FLAGS1_COMPRESS_UCL) |
783 | if (cf == STARTUP_HDR_FLAGS1_COMPRESS_UCL) |