Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mtbl(7) [debian man page]

MTBL(7) 																   MTBL(7)

NAME
mtbl - immutable sorted string library SYNOPSIS
#include <mtbl.h> gcc [flags] files -lmtbl [libraries] DESCRIPTION
The mtbl library provides interfaces for creating, searching, and merging Sorted String Table (SSTable) files in the MTBL format, which provide an immutable mapping of keys to values. Sorted String Tables are compact and provide fast random access to keys and key ranges. Keys and values are arbitrary byte arrays, and MTBL SSTables may not contain duplicate keys. The six main interfaces provided by the mtbl library are: mtbl_iter(3) Iterator objects provide a consistent interface for iterating over the key-value entries returned by other interfaces. mtbl_source(3) Source objects provide functions for obtaining iterators from an underlying data source. The mtbl_reader and mtbl_merger interfaces provide functions for obtaining references to a source object. The source methods return an mtbl_iter object. mtbl_reader(3) Reader objects provide read-only access to MTBL files. mtbl_writer(3) Writer objects initialize a new MTBL file from a sequence of key-value entries provided by the caller. Keys must be in sorted order based on lexicographical byte value, and keys may not be duplicated. mtbl_merger(3) Merger objects receive multiple sequences of key-value entries from one or more mtbl_source objects and combine them into a single, sorted sequence. The combined, merged output sequence is provided via the mtbl_source interface. mtbl_sorter(3) Sorter objects receive a sequence of key-value entries provided by the caller and return them in sorted order. The caller must provide a callback function to merge values in the case of entries with duplicate keys. The sorted output sequence may be retrieved via the mtbl_iter interface or be dumped to an mtbl_writer object. mtbl_fileset(3) Fileset objects automatically maintain an mtbl_source built on top of the mtbl_merger and mtbl_reader interfaces. The set of underlying mtbl_reader objects is kept synchronized with a "setfile" on disk listing MTBL files. Additionally, several utility interfaces are provided: mtbl_crc32c(3) Calculates the CRC32C checksum of a byte array. mtbl_fixed(3) Functions for fixed-width encoding and decoding of 32 and 64 bit integers. mtbl_varint(3) Functions for varint encoding and decoding of 32 and 64 bit integers. 05/29/2012 MTBL(7)

Check Out this Related Man Page

AptPkg::hash(3pm)					User Contributed Perl Documentation					 AptPkg::hash(3pm)

NAME
AptPkg::hash - a helper class for implementing tied hashes SYNOPSIS
use AptPkg::hash; DESCRIPTION
The AptPkg::hash class provides hash-like access for objects which have an underlying XS implementation. Such objects need to add AptPkg::hash to @ISA, provide get, set and exists methods, and an iterator class. AptPkg::hash new([XS_OBJECT]) Create a object as a tied hash. The object is implemented as a hash reference blessed into the class, which in turn is tied to AptPkg::hash. This means that both $obj->method() and $obj->{key} valid, the latter invoking get/set (through FETCH/STORE). The tie associates an array reference with the hash, which initially contains a reference to the hash, the XS object and an anon hash which may be used by subclasses to store state information. If no XS object is passed, one is created via new in the XS class. The name of that class is constructed from the class name, by lower-casing the last component and prefixing it with an underscore (eg. AptPkg::Config becomes AptPkg::_config). If the module contains a @KEYS array, then the private hash will be populated with those entries as keys (see the description below of the AptPkg::hash::method class). _self, _xs, _priv Accessors which may be used in subclass methods to fetch the three array elements associated with the hash reference. keys(ARGS) In a scalar context, creates and returns a new iterator object (the class name with the suffix ::Iter appended). The XS object, the private hash and any arguments are passed to the constructor. In an array context, the iterator is used to generate a list of keys which are then returned. The iterator class must implement a next method, which returns the current key and advances to the next. AptPkg::hash::method The AptPkg::hash::method class extends AptPkg::hash, providing a simple way to map a fixed set of keys (defined by the @KEYS array) into method calls on either the object, or the internal XS object. Classes inheriting from AptPkg::hash::method should provide an iterator class which inherits from AptPkg::hash::method::iter. AUTHOR
Brendan O'Dea <bod@debian.org> perl v5.14.2 2012-03-16 AptPkg::hash(3pm)
Man Page