diff options
Diffstat (limited to 'src/xz/file_io.h')
-rw-r--r-- | src/xz/file_io.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xz/file_io.h b/src/xz/file_io.h index 6722aef840923..c533d641badb0 100644 --- a/src/xz/file_io.h +++ b/src/xz/file_io.h @@ -20,7 +20,10 @@ /// is_sparse() accesses the buffer as uint64_t for maximum speed. -/// Use an union to make sure that the buffer is properly aligned. +/// The u32 and u64 members must only be access through this union +/// to avoid strict aliasing violations. Taking a pointer of u8 +/// should be fine as long as uint8_t maps to unsigned char which +/// can alias anything. typedef union { uint8_t u8[IO_BUFFER_SIZE]; uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)]; @@ -46,6 +49,13 @@ typedef struct { /// True once end of the source file has been detected. bool src_eof; + /// For --flush-timeout: True if at least one byte has been read + /// since the previous flush or the start of the file. + bool src_has_seen_input; + + /// For --flush-timeout: True when flushing is needed. + bool flush_needed; + /// If true, we look for long chunks of zeros and try to create /// a sparse file. bool dest_try_sparse; |