Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions include/chunkio/cio_file_st.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
* | 0xC1 | 0x00 +--> Header 2 bytes
* +--------------+----------------+
* | 4 BYTES +--> CRC32(Content)
* | 4 BYTES +--> CRC32(Padding)
* | 4 BYTES +--> Legacy CRC padding
* | 4 BYTES +--> Content length
* | 8 BYTES +--> Padding
* | 4 BYTES +--> Shadow content length
* | 4 BYTES +--> Shadow CRC32(Content)
* +-------------------------------+
* | Content |
* | +-------------------------+ |
Expand All @@ -62,10 +63,14 @@
#define CIO_FILE_ID_01 0x00 /* header: second byte */
#define CIO_FILE_HEADER_MIN 24 /* 24 bytes for the header */
#define CIO_FILE_CONTENT_OFFSET 22
#define CIO_FILE_LEGACY_CRC_PADDING_OFFSET 6
#define CIO_FILE_LEGACY_CRC_PADDING_SIZE 4
#define CIO_FILE_CONTENT_LENGTH_OFFSET 10 /* We store the content length
* right after the checksum in
* what used to be padding
*/
#define CIO_FILE_SHADOW_CONTENT_LENGTH_OFFSET 14
#define CIO_FILE_SHADOW_HASH_OFFSET 18
/* Return pointer to hash position */
static inline char *cio_file_st_get_hash(char *map)
{
Expand Down
Loading
Loading