3 * \brief Handling of Index lists
5 * \author Copyright (C) 1999-2006 Igor Pavlov
6 * \author Copyright (C) 2007 Lasse Collin
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
19 #ifndef LZMA_H_INTERNAL
20 # error Never include this file directly. Use <lzma.h> instead.
29 typedef struct lzma_index_s lzma_index;
32 * \brief Total Size of the Block
34 * This includes Block Header, Compressed Data, and Block Footer.
39 * \brief Uncompressed Size of the Block
41 lzma_vli uncompressed_size;
44 * \brief Pointer to the next Index Record
46 * This is NULL on the last Index Record.
53 * \brief Duplicates an Index list
55 * \return A copy of the Index list, or NULL if memory allocation
56 * failed or the original Index was empty.
58 extern lzma_index *lzma_index_dup(
59 const lzma_index *index, lzma_allocator *allocator);
63 * \brief Frees an Index list
65 * All Index Recors in the list are freed. This function is convenient when
66 * getting rid of lzma_metadata structures containing an Index.
68 extern void lzma_index_free(lzma_index *index, lzma_allocator *allocator);
72 * \brief Calculates information about the Index
74 * \return LZMA_OK on success, LZMA_PROG_ERROR on error. FIXME
76 extern lzma_ret lzma_index_count(const lzma_index *index, size_t *count,
77 lzma_vli *lzma_restrict total_size,
78 lzma_vli *lzma_restrict uncompressed_size);
82 * \brief Compares if two Index lists are identical
84 extern lzma_bool lzma_index_is_equal(const lzma_index *a, const lzma_index *b);