Lines Matching refs:iter
978 iter_set_info(lzma_index_iter *iter)
980 const lzma_index *i = iter->internal[ITER_INDEX].p;
981 const index_stream *stream = iter->internal[ITER_STREAM].p;
982 const index_group *group = iter->internal[ITER_GROUP].p;
983 const size_t record = iter->internal[ITER_RECORD].s;
991 iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
996 iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
1004 iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
1005 iter->internal[ITER_GROUP].p = group->node.parent;
1011 iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
1012 iter->internal[ITER_GROUP].p = NULL;
1017 iter->stream.number = stream->number;
1018 iter->stream.block_count = stream->record_count;
1019 iter->stream.compressed_offset = stream->node.compressed_base;
1020 iter->stream.uncompressed_offset = stream->node.uncompressed_base;
1022 // iter->stream.flags will be NULL if the Stream Flags haven't been
1024 iter->stream.flags = stream->stream_flags.version == UINT32_MAX
1026 iter->stream.padding = stream->stream_padding;
1030 iter->stream.compressed_size = index_size(0, 0)
1032 iter->stream.uncompressed_size = 0;
1038 iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
1042 iter->stream.uncompressed_size
1047 iter->block.number_in_stream = group->number_base + record;
1048 iter->block.number_in_file = iter->block.number_in_stream
1051 iter->block.compressed_stream_offset
1055 iter->block.uncompressed_stream_offset
1059 iter->block.uncompressed_size
1061 - iter->block.uncompressed_stream_offset;
1062 iter->block.unpadded_size
1064 - iter->block.compressed_stream_offset;
1065 iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
1067 iter->block.compressed_stream_offset
1070 iter->block.compressed_file_offset
1071 = iter->block.compressed_stream_offset
1072 + iter->stream.compressed_offset;
1073 iter->block.uncompressed_file_offset
1074 = iter->block.uncompressed_stream_offset
1075 + iter->stream.uncompressed_offset;
1083 lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
1085 iter->internal[ITER_INDEX].p = i;
1086 lzma_index_iter_rewind(iter);
1092 lzma_index_iter_rewind(lzma_index_iter *iter)
1094 iter->internal[ITER_STREAM].p = NULL;
1095 iter->internal[ITER_GROUP].p = NULL;
1096 iter->internal[ITER_RECORD].s = 0;
1097 iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
1103 lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
1109 const lzma_index *i = iter->internal[ITER_INDEX].p;
1110 const index_stream *stream = iter->internal[ITER_STREAM].p;
1112 size_t record = iter->internal[ITER_RECORD].s;
1120 switch (iter->internal[ITER_METHOD].s) {
1122 group = iter->internal[ITER_GROUP].p;
1126 group = index_tree_next(iter->internal[ITER_GROUP].p);
1199 iter->internal[ITER_STREAM].p = stream;
1200 iter->internal[ITER_GROUP].p = group;
1201 iter->internal[ITER_RECORD].s = record;
1203 iter_set_info(iter);
1210 lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
1212 const lzma_index *i = iter->internal[ITER_INDEX].p;
1243 iter->internal[ITER_STREAM].p = stream;
1244 iter->internal[ITER_GROUP].p = group;
1245 iter->internal[ITER_RECORD].s = left;
1247 iter_set_info(iter);