libostree: Allow compression level to be set for archive-z2 stream

Add a ostree_raw_file_to_archive_z2_stream_with_options() variant of
ostree_raw_file_to_archive_z2_stream(), to allow a compression-level
option to be passed in and passed through to zlib.

This is useful when building archive-z2 files on the fly for
transmission over a non-bandwidth-limited channel, such as a local
network. In this case, CPU time is more valuable than bandwidth, so we
want a low compression level.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #721
Approved by: cgwalters
This commit is contained in:
Philip Withnall authored and Atomic Bot committed 2017-03-06 18:19:45 +00:00
1 parent 72336f1c48
commit 574c3ea6f9
4 files changed
+53 -4

No files matched your search

+1
View File
@@ -117,6 +117,7 @@ ostree_content_stream_parse
ostree_content_file_parse
ostree_content_file_parse_at
ostree_raw_file_to_archive_z2_stream
ostree_raw_file_to_archive_z2_stream_with_options
ostree_raw_file_to_content_stream
ostree_checksum_file_from_input
ostree_checksum_file