logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mtbl_metadata - get MTBL file metadata

Description

       An mtbl_metadata object may be obtained from an mtbl_reader(3). Its accessors export attributes and file
       statistics that are recorded in the metadata block.

Name

       mtbl_metadata - get MTBL file metadata

Return Value

mtbl_metadata_file_version()
       File format version of the MTBL file. Either MTBL_FORMAT_V1 or MTBL_FORMAT_V2.

   mtbl_metadata_index_block_offset()
       Byte offset in the MTBL file where the index begins.

   mtbl_metadata_data_block_size()
       Maximum size of an uncompressed data block, see mtbl_writer(3).

   mtbl_metadata_compression_algorithm()
       One of the compression values allowed by mtbl_writer(3).

   mtbl_metadata_count_entries()
       Total number of key-value entries.

   mtbl_metadata_count_data_blocks()
       Total number of data blocks.

   mtbl_metadata_bytes_data_blocks()
       Total number of bytes consumed by data blocks.

   mtbl_metadata_bytes_index_block()
       Total number of bytes consumed by the index.

   mtbl_metadata_bytes_keys()
       Total number of bytes that all keys would occupy if stored end-to-end in a byte array with no delimiters.

   mtbl_metadata_bytes_values()
       Total number of bytes that all values in the file would occupy if stored end-to-end in a byte array with
       no delimiters.

                                                   02/10/2017                                   MTBL_METADATA(3)

Synopsis

#include<mtbl.h>mtbl_file_versionmtbl_metadata_file_version(conststructmtbl_metadata*m);uint64_tmtbl_metadata_index_block_offset(conststructmtbl_metadata*m);uint64_tmtbl_metadata_data_block_size(conststructmtbl_metadata*m);mtbl_compression_typemtbl_metadata_compression_algorithm(conststructmtbl_metadata*m);uint64_tmtbl_metadata_count_entries(conststructmtbl_metadata*m);uint64_tmtbl_metadata_count_data_blocks(conststructmtbl_metadata*m);uint64_tmtbl_metadata_bytes_data_blocks(conststructmtbl_metadata*m);uint64_tmtbl_metadata_bytes_index_block(conststructmtbl_metadata*m);uint64_tmtbl_metadata_bytes_keys(conststructmtbl_metadata*m);uint64_tmtbl_metadata_bytes_values(conststructmtbl_metadata*m);

See Also