Add ZCK_NO_WRITE option to disable writing to a file
authorJonathan Dieter <jdieter@gmail.com>
Sat, 18 Feb 2023 20:54:28 +0000 (20:54 +0000)
committerJonathan Dieter <jdieter@gmail.com>
Sat, 18 Feb 2023 21:03:07 +0000 (21:03 +0000)
commit0624fdd696422e718ce31f590c213e6f994f0641
tree46135f3be2df1bb7370882e73798294f877d87ef
parent0bed8496262a71beadccd4e562bdac093ef6e06f
Add ZCK_NO_WRITE option to disable writing to a file

There are situations where we need to recreate the zchunk header for an
uncompressed file without actually writing out the zchunk file.  This
commit allows setting an `ioption`, `ZCK_NO_WRITE`, that will go through
the full process of creating the zchunk file without actually writing it
to disk, leaving you with a complete zchunk header in the end.

Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
include/zck.h.in
src/lib/comp/comp.c
src/lib/header.c
src/lib/io.c
src/lib/zck.c
src/lib/zck_private.h