TBOX

Last updated

TBOX is a multi-platform c library for unix, windows, mac, ios, android, etc. It's made available under the Apache License 2.0.

Contents

TBOX 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.

Related Research Articles

gzip GNU file compression/decompression tool

gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and intended for use by GNU. Version 0.1 was first publicly released on 31 October 1992, and version 1.0 followed in February 1993.

Heap (data structure) Computer science data structure

In computer science, a heap is a specialized tree-based data structure which is essentially an almost complete tree that satisfies the heap property: in a max heap, for any given node C, if P is a parent node of C, then the key of P is greater than or equal to the key of C. In a min heap, the key of P is less than or equal to the key of C. The node at the "top" of the heap is called the root node.

zlib DEFLATE codec library

zlib is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also a crucial component of many software platforms, including Linux, macOS, and iOS. It has also been used in gaming consoles such as the PlayStation 4, PlayStation 3, Wii U, Wii, Xbox One and Xbox 360.

Java Platform, Standard Edition is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).

In computing, Deflate is a lossless data compression file format that uses a combination of LZSS and Huffman coding. It was designed by Phil Katz, for version 2 of his PKZIP archiving tool. Deflate was later specified in RFC 1951 (1996).

AVR microcontrollers family of microcontrollers

AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

The Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functions, and iterators.

TI MSP430 mixed-signal microcontroller family

The MSP430 is a mixed-signal microcontroller family from Texas Instruments, first introduced on 14 February 1992. Built around a 16-bit CPU, the MSP430 is designed for low cost and, specifically, low power consumption embedded applications.

In computer programming, the term magic number has multiple meanings. It could refer to one or more of the following:

In Unix-like operating systems, /dev/random, /dev/urandom and /dev/arandom are special files that serve as pseudorandom number generators. They allow access to environmental noise collected from device drivers and other sources. /dev/random typically blocks if there is less entropy available than requested; /dev/urandom typically never blocks, even if the pseudorandom number generator seed was not fully initialized with entropy since boot. /dev/arandom blocks after boot until the seed has been securely initialized with enough entropy, and then never blocks again. Not all operating systems implement the same methods for /dev/random and /dev/urandom and only a few provide /dev/arandom.

Nucleus RTOS is a real-time operating system (RTOS) produced by the Embedded Software Division of Mentor Graphics, a Siemens Business, supporting 32- and 64-bit embedded platforms. The operating system (OS) is designed for real-time embedded systems for medical, industrial, consumer, aerospace, and Internet of things (IoT) uses. Nucleus was released first in 1993. The latest version is 3.x, and includes features such as power management, process model, 64-bit support, safety certification, and support for heterogeneous computing multi-core system on a chip (SOCs) processors.

Snappy is a fast data compression and decompression library written in C++ by Google based on ideas from LZ77 and open-sourced in 2011. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. Compression speed is 250 MB/s and decompression speed is 500 MB/s using a single core of a circa 2011 "Westmere" 2.26 GHz Core i7 processor running in 64-bit mode. The compression ratio is 20–100% lower than gzip.

The Renesas R8C is a 16-bit microcontroller that was developed as a smaller and cheaper version of the Renesas M16C. It retains the M16C's 16-bit CISC architecture and instruction set, but trades size for speed by cutting the internal data bus from 16 bits to 8 bits. It is available in a number of different versions with varying amounts of flash memory and SRAM.

C mathematical operations are a group of functions in the standard library of the C programming language implementing basic mathematical functions. All functions use floating-point numbers in one manner or another. Different C standards provide different, albeit backwards-compatible, sets of functions. Most of these functions are also available in the C++ standard library, though in different headers.

HTTP compression is a capability that can be built into web servers and web clients to improve transfer speed and bandwidth utilization.

In computing, Microsoft's Windows Vista and Windows Server 2008 introduced in 2007/2008 a new networking stack named Next Generation TCP/IP stack, to improve on the previous stack in several ways. The stack includes native implementation of IPv6, as well as a complete overhaul of IPv4. The new TCP/IP stack uses a new method to store configuration settings that enables more dynamic control and does not require a computer restart after a change in settings. The new stack, implemented as a dual-stack model, depends on a strong host-model and features an infrastructure to enable more modular components that one can dynamically insert and remove.

Ethernut is an open source hardware and software project for use as an embedded-Ethernet-system.

Zopfli is data compression software that encodes data into DEFLATE, gzip and zlib formats. It achieves higher compression than other DEFLATE/zlib implementations, but takes much longer to perform the compression. It was first released in February 2013 by Google as a free software programming library under the Apache License, Version 2.0. The name Zöpfli is the Swiss German diminutive of “Zopf”, an unsweetened type of Hefezopf.

Brotli is a data format specification for data streams compressed with a specific combination of the general-purpose LZ77 lossless compression algorithm, Huffman coding and 2nd order context modelling. Brotli is a compression algorithm developed by Google and works best for text compression.

Ghost (operating system)

Ghost OS is an open-source hobby operating system and kernel. It is under development since 2014 and currently compatible with the x86 platform.