TBOX

For other uses, see TBOX (disambiguation).

TBOX is a mutli-platform c library for unix, windows, mac, ios, android, etc.

It includes asio, stream, network, container, algorithm, object, memory, database, string, charset, math, libc, libm, utils and other library modules.

The stream io library

  1. supports file, data, http and socket source
  2. supports the stream filter for gzip charset and ..
  3. implements the multi-stream transfer using asio

The asynchronous io library

  1. supports reactor and proactor mode
  2. using epoll, poll, select, kqueue and iocp os system api

The database library

  1. supports mysql and sqlite3 database and enumerates data using the iterator mode

The xml parser library

  1. supports DOM and SAX mode and supports xpath.

The serialization and deserialization library.

  1. supports xml, json, bplist, xplist, binary formats

The memory library

  1. implements some memory pools for optimizating memory.
  2. supports fast memory error detecting. it can detect the following types of bugs for the debug mode:
  3. # out-of-bounds accesses to heap and globals
  4. # use-after-free
  5. # double-free, invalid free
  6. # memory leaks

The container library

  1. implements hash table, single list, double list, vector, stack, queue and min/max heap.
  2. supports iterator mode for algorithm.

The algorithm library

  1. using the iterator mode
  2. implements find, binary find and reverse find algorithm.
  3. implements sort, bubble sort, quick sort, heap sort and insert sort algorithm.
  4. implements count, walk items, reverse walk items, for_all and rfor_all.

The network library

  1. implements dns(cached), ssl(openssl and polarssl), http and cookies
  2. supports asynchronous io mode for dns, ssl and http using the asio and stream library

The platform library

  1. implements timer, faster and lower precision timer
  2. implements atomic and atomic64 operation
  3. implements spinlock, mutex, event, semaphore, thread and thread pool
  4. implements file, socket operation

The charset library

  1. supports utf8, utf16, gbk, gb2312, uc2 and uc4
  2. supports big endian and little endian mode

The zip library

  1. supports gzip, zlibraw, zlib formats using the zlib library if exists
  2. implements lzsw, lz77 and rlc algorithm

The utils library

  1. implements base32, base64, md5 and sha algorithm
  2. implements assert and trace output for the debug mode

The math library

  1. implements random generator
  2. implements fast fixed-point calculation, supports 6-bits, 16-bits, 30-bits fixed-point number

The libc library

  1. implements lightweight libc library interfaces, the interface name contains tb_xxx prefix for avoiding conflict.
  2. implements strixxx strrxxx wcsixxx wcsrxxx interface extension.
  3. optimizates some frequently-used interface, .e.g. memset, memcpy, strcpy ...
  4. implements memset_u16, memset_u32, memset_u64 extension interfaces.

The libm library

  1. implements lightweight libm library interfaces, the interface name contains tb_xxx prefix for avoiding conflict.
  2. supports float and double type.
This article is issued from Wikipedia - version of the 5/11/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.