Modify the file format to not include rzip chunk size except for STDOUT chunked files thus decreasing the file format size further.

This commit is contained in:
Con Kolivas 2011-03-22 09:04:24 +11:00
parent 7101372167
commit 131d4c92c2
6 changed files with 27 additions and 12 deletions

View file

@ -1104,7 +1104,7 @@ void *open_stream_in(rzip_control *control, int f, int n, int chunk_bytes)
goto failed;
}
/* Read in the expected chunk size */
if (!ENCRYPT) {
if (CHUNKED) {
if (unlikely(read_val(control, f, &sinfo->size, sinfo->chunk_bytes))) {
print_err("Failed to read in chunk size in open_stream_in\n");
goto failed;
@ -1323,9 +1323,9 @@ retry:
write_u8(control, ctis->fd, ctis->chunk_bytes);
/* Write whether this is the last chunk, followed by the size
* of this chunk */
* of this chunk if working with STDOUT and !ENCRYPT */
write_u8(control, ctis->fd, control->eof);
if (!ENCRYPT)
if (CHUNKED)
write_val(control, ctis->fd, ctis->size, ctis->chunk_bytes);
/* First chunk of this stream, write headers */