aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma/container.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/api/lzma/container.h')
-rw-r--r--src/liblzma/api/lzma/container.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/liblzma/api/lzma/container.h b/src/liblzma/api/lzma/container.h
index 4ad7ce6a..cbb37c8b 100644
--- a/src/liblzma/api/lzma/container.h
+++ b/src/liblzma/api/lzma/container.h
@@ -445,18 +445,18 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
/**
- * \brief EROFS LZMA encoder
+ * \brief MicroLZMA encoder
*
- * The EROFS LZMA format is a raw LZMA stream whose first byte (always 0x00)
+ * The MicroLZMA format is a raw LZMA stream whose first byte (always 0x00)
* has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb).
- * This encoding ensures that the first byte of EROFS LZMA stream is never
+ * This encoding ensures that the first byte of MicroLZMA stream is never
* 0x00. There is no end of payload marker and thus the uncompressed size
* must be stored separately. For the best error detection the dictionary
* size should be stored separately as well but alternatively one may use
* the uncompressed size as the dictionary size when decoding.
*
- * With the EROFS LZMA encoder, lzma_code() behaves slightly unusually.
- * The action argument must be LZMA_FINISH and the return value cannot be
+ * With the MicroLZMA encoder, lzma_code() behaves slightly unusually.
+ * The action argument must be LZMA_FINISH and the return value will never be
* LZMA_OK. Thus the encoding is always done with a single lzma_code() after
* the initialization. The benefit of the combination of initialization
* function and lzma_code() is that memory allocations can be re-used for
@@ -479,6 +479,11 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* size is 4 KiB, dictionary size of 32 KiB or 64 KiB is good. If the
* data compresses extremely well, even 128 KiB may be useful.
*
+ * The MicroLZMA format and this encoder variant were made with the EROFS
+ * file system in mind. This format may be convenient in other embedded
+ * uses too where many small streams are needed. XZ Embedded includes a
+ * decoder for this format.
+ *
* \return - LZMA_STREAM_END: All good. Check the amounts of input used
* and output produced. Store the amount of input used
* (uncompressed size) as it needs to be known to decompress
@@ -487,9 +492,9 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* - LZMA_MEM_ERROR
* - LZMA_PROG_ERROR: In addition to the generic reasons for this
* error code, this may also be returned if there isn't enough
- * output space (6 bytes) to create a valid EROFS LZMA stream.
+ * output space (6 bytes) to create a valid MicroLZMA stream.
*/
-extern LZMA_API(lzma_ret) lzma_erofs_encoder(
+extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
lzma_stream *strm, const lzma_options_lzma *options);
@@ -682,17 +687,17 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
/**
- * \brief EROFS LZMA decoder
+ * \brief MicroLZMA decoder
*
- * See lzma_erofs_decoder() for more information.
+ * See lzma_microlzma_decoder() for more information.
*
- * The lzma_code() usage with this decoder is completely normal.
- * The special behavior of lzma_code() applies to lzma_erofs_encoder() only.
+ * The lzma_code() usage with this decoder is completely normal. The
+ * special behavior of lzma_code() applies to lzma_microlzma_encoder() only.
*
* \param strm Pointer to properly prepared lzma_stream
- * \param comp_size Compressed size of the EROFS LZMA stream.
+ * \param comp_size Compressed size of the MicroLZMA stream.
* The caller must somehow know this exactly.
- * \param uncomp_size Uncompressed size of the EROFS LZMA stream.
+ * \param uncomp_size Uncompressed size of the MicroLZMA stream.
* If the exact uncompressed size isn't known, this
* can be set to a value that is at most as big as
* the exact uncompressed size would be, but then the
@@ -715,7 +720,7 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
* affect the memory usage if one specifies bigger
* dictionary than actually required.)
*/
-extern LZMA_API(lzma_ret) lzma_erofs_decoder(
+extern LZMA_API(lzma_ret) lzma_microlzma_decoder(
lzma_stream *strm, uint64_t comp_size,
uint64_t uncomp_size, lzma_bool uncomp_size_is_exact,
uint32_t dict_size);