index_encoder.c (215187) | index_encoder.c (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file index_encoder.c 4/// \brief Encodes the Index field 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 28 unchanged lines hidden (view full) --- 37 38 /// CRC32 of the List of Records field 39 uint32_t crc32; 40}; 41 42 43static lzma_ret 44index_encode(lzma_coder *coder, | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file index_encoder.c 4/// \brief Encodes the Index field 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 28 unchanged lines hidden (view full) --- 37 38 /// CRC32 of the List of Records field 39 uint32_t crc32; 40}; 41 42 43static lzma_ret 44index_encode(lzma_coder *coder, |
45 lzma_allocator *allocator lzma_attribute((unused)), 46 const uint8_t *restrict in lzma_attribute((unused)), 47 size_t *restrict in_pos lzma_attribute((unused)), 48 size_t in_size lzma_attribute((unused)), | 45 lzma_allocator *allocator lzma_attribute((__unused__)), 46 const uint8_t *restrict in lzma_attribute((__unused__)), 47 size_t *restrict in_pos lzma_attribute((__unused__)), 48 size_t in_size lzma_attribute((__unused__)), |
49 uint8_t *restrict out, size_t *restrict out_pos, | 49 uint8_t *restrict out, size_t *restrict out_pos, |
50 size_t out_size, lzma_action action lzma_attribute((unused))) | 50 size_t out_size, 51 lzma_action action lzma_attribute((__unused__))) |
51{ 52 // Position where to start calculating CRC32. The idea is that we 53 // need to call lzma_crc32() only once per call to index_encode(). 54 const size_t out_start = *out_pos; 55 56 // Return value to use if we return at the end of this function. 57 // We use "goto out" to jump out of the while-switch construct 58 // instead of returning directly, because that way we don't need --- 195 unchanged lines hidden --- | 52{ 53 // Position where to start calculating CRC32. The idea is that we 54 // need to call lzma_crc32() only once per call to index_encode(). 55 const size_t out_start = *out_pos; 56 57 // Return value to use if we return at the end of this function. 58 // We use "goto out" to jump out of the while-switch construct 59 // instead of returning directly, because that way we don't need --- 195 unchanged lines hidden --- |