aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/index.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-12-31 22:45:53 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-12-31 22:45:53 +0200
commit1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691 (patch)
tree3ed5d9cc0c7629c1ca09a5df1d1193b90815cc88 /src/liblzma/common/index.h
parentRemove c-format tag in cs.po. (diff)
downloadxz-1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691.tar.xz
Revised the Index handling code.
This breaks API and ABI but most apps are not affected since most apps don't use this part of the API. You will get a compile error if you are using anything that got broken. Summary of changes: - Ability to store Stream Flags, which are needed for random-access reading in multi-Stream files. - Separate function to set size of Stream Padding. - Iterator structure makes it possible to read the same lzma_index from multiple threads at the same time. - A lot faster code to locate Blocks. - Removed lzma_index_equal() without adding anything to replace it. I don't know what it should do exactly with the new features and what actually needs this function in the first place other than test_index.c, which now has its own code to compare lzma_indexes.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/index.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/liblzma/common/index.h b/src/liblzma/common/index.h
index 9f177b1b..64e97247 100644
--- a/src/liblzma/common/index.h
+++ b/src/liblzma/common/index.h
@@ -28,6 +28,12 @@
extern uint32_t lzma_index_padding_size(const lzma_index *i);
+/// Set for how many Records to allocate memory the next time
+/// lzma_index_append() needs to allocate space for a new Record.
+/// This is used only by the Index decoder.
+extern void lzma_index_prealloc(lzma_index *i, lzma_vli records);
+
+
/// Round the variable-length integer to the next multiple of four.
static inline lzma_vli
vli_ceil4(lzma_vli vli)