Home | History | Annotate | Download | only in tests

Lines Matching refs:footer

6 /// \brief      Tests Stream Header and Stream Footer coders
21 // Header and footer magic bytes for .xz file format
112 uint8_t footer[LZMA_STREAM_HEADER_SIZE];
114 // Encode Stream Footer
115 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK);
117 // Stream Footer must start with CRC32
118 const uint32_t crc = read32le(footer);
119 const uint32_t expected_crc = lzma_crc32(footer + sizeof(uint32_t),
125 const uint32_t backwards_size = read32le(footer + sizeof(uint32_t));
130 const uint8_t *stream_flags = footer + sizeof(uint32_t) * 2;
139 // And ends with Footer Magic Bytes
163 uint8_t footer[LZMA_STREAM_HEADER_SIZE];
167 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer),
173 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer),
178 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer),
181 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer),
184 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer),
296 uint8_t footer[LZMA_STREAM_HEADER_SIZE];
297 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK);
300 assert_lzma_ret(lzma_stream_footer_decode(&dest_flags, footer),
330 uint8_t footer[LZMA_STREAM_HEADER_SIZE];
333 // First encode known flags to the footer buffer
334 assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK);
337 footer[LZMA_STREAM_HEADER_SIZE - 1] ^= 1;
338 assert_lzma_ret(lzma_stream_footer_decode(&dest, footer),
340 footer[LZMA_STREAM_HEADER_SIZE - 1] ^= 1;
343 // In the Stream Footer, the Stream Flags follow the CRC32 (4 bytes)
345 uint8_t *stream_flags = footer + sizeof(uint32_t) * 2;
349 uint8_t *crc32_ptr = footer;
351 uint8_t *backward_size = footer + sizeof(uint32_t);
355 assert_lzma_ret(lzma_stream_footer_decode(&dest, footer),
365 assert_lzma_ret(lzma_stream_footer_decode(&dest, footer),
373 assert_lzma_ret(lzma_stream_footer_decode(&dest, footer),
379 assert_lzma_ret(lzma_stream_footer_decode(&dest, footer),