Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/array_store.c
| Context not available. | |||||
| * matching chunks from this state are re-used in the new state. | * matching chunks from this state are re-used in the new state. | ||||
| * | * | ||||
| * First matches at either end of the array are detected. | * First matches at either end of the array are detected. | ||||
| * For identical arrays this is all thats needed. | * For identical arrays this is all that's needed. | ||||
| * | * | ||||
| * De-duplication is performed on any remaining chunks, by hashing the first few bytes of the chunk | * De-duplication is performed on any remaining chunks, by hashing the first few bytes of the chunk | ||||
| * (see: BCHUNK_HASH_TABLE_ACCUMULATE_STEPS). | * (see: BCHUNK_HASH_TABLE_ACCUMULATE_STEPS). | ||||
| Context not available. | |||||
| * used for lookups. | * used for lookups. | ||||
| * | * | ||||
| * Point to the #BChunkRef, not the #BChunk, | * Point to the #BChunkRef, not the #BChunk, | ||||
| * to allow talking down the chunks in-order until a mis-match is found, | * to allow talking down the chunks in-order until a mismatch is found, | ||||
| * this avoids having to do so many table lookups. | * this avoids having to do so many table lookups. | ||||
| */ | */ | ||||
| typedef struct BTableRef { | typedef struct BTableRef { | ||||
| Context not available. | |||||
| data_trim_len = data_trim_len - data_last_chunk_len; | data_trim_len = data_trim_len - data_last_chunk_len; | ||||
| if (data_last_chunk_len) { | if (data_last_chunk_len) { | ||||
| if (data_last_chunk_len < info->chunk_byte_size_min) { | if (data_last_chunk_len < info->chunk_byte_size_min) { | ||||
| /* may be zero and thats OK */ | /* may be zero and that's OK */ | ||||
| data_trim_len -= info->chunk_byte_size; | data_trim_len -= info->chunk_byte_size; | ||||
| data_last_chunk_len += info->chunk_byte_size; | data_last_chunk_len += info->chunk_byte_size; | ||||
| } | } | ||||
| Context not available. | |||||