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

This reverts commit 131d4c92c2.

Breaks STDIN/OUT so revert this change and cope with the slightly extra file size on non-chunked files.
This commit is contained in:
Con Kolivas 2011-03-23 07:59:04 +11:00
parent 8fcedbc43e
commit b27e1df879
6 changed files with 12 additions and 27 deletions

View file

@ -1119,7 +1119,7 @@ void *open_stream_in(rzip_control *control, int f, int n, char chunk_bytes)
goto failed;
}
/* Read in the expected chunk size */
if (CHUNKED) {
if (!ENCRYPT) {
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;
@ -1340,9 +1340,9 @@ retry:
write_u8(control, ctis->fd, ctis->chunk_bytes);
/* Write whether this is the last chunk, followed by the size
* of this chunk if working with STDOUT and !ENCRYPT */
* of this chunk */
write_u8(control, ctis->fd, control->eof);
if (CHUNKED)
if (!ENCRYPT)
write_val(control, ctis->fd, ctis->size, ctis->chunk_bytes);
/* First chunk of this stream, write headers */