aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma/block.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2013-03-23 19:17:33 +0200
committerLasse Collin <lasse.collin@tukaani.org>2013-03-23 19:17:33 +0200
commitb465da5988dd59ad98fda10c2e4ea13d0b9c73bc (patch)
tree00766ec252f22dde85350b88ec0e7ef276f9ee62 /src/liblzma/api/lzma/block.h
parentAvoid unneeded use of awk in xzless. (diff)
downloadxz-b465da5988dd59ad98fda10c2e4ea13d0b9c73bc.tar.xz
liblzma: Add lzma_block_uncomp_encode().
This also adds a new internal function lzma_block_buffer_bound64() which is similar to lzma_block_buffer_bound() but uses uint64_t instead of size_t.
Diffstat (limited to 'src/liblzma/api/lzma/block.h')
-rw-r--r--src/liblzma/api/lzma/block.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/liblzma/api/lzma/block.h b/src/liblzma/api/lzma/block.h
index 0d77f32e..e450ad69 100644
--- a/src/liblzma/api/lzma/block.h
+++ b/src/liblzma/api/lzma/block.h
@@ -497,6 +497,24 @@ extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
/**
+ * \brief Single-call uncompress .xz Block encoder
+ *
+ * This is like lzma_block_buffer_encode() except this doesn't try to
+ * compress the data and instead encodes the data using LZMA2 uncompressed
+ * chunks. The required output buffer size can be determined with
+ * lzma_block_buffer_bound().
+ *
+ * Since the data won't be compressed, this function ignores block->filters.
+ * This function doesn't take lzma_allocator because this function doesn't
+ * allocate any memory from the heap.
+ */
+extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
* \brief Single-call .xz Block decoder
*
* This is single-call equivalent of lzma_block_decoder(), and requires that