-
Windows -
Macosx -
Linux -
Android -
iOS
characteristic
Stream library
-
Stream: general non blocking stream, which is used for general independent io processing, and also supports coroutine for asynchronous transmission. -
Transfer: the transmission device, which maintains the transmission of two streams. -
Static_stream: static stream optimized for static data buffer, used for lightweight and fast data parsing.
Coroutine library
-
Fast and efficient co schedule switching support (refer to: Benchmark test report ) -
Cross platform support is provided. The core switching algorithm refers to boost, and it is rewritten and optimized. The current support architecture: x86, x86_64, arm, arm64 -
Provide data communication support between channel processes based on production and consumer models -
Provide semaphore and coroutine lock support -
Socket and stream modules natively support coroutines, and can be switched seamlessly between threads and coroutines -
It provides simple server instances based on coroutine such as http and file. It takes only a few hundred lines of code to write a high-performance io server from the socket. The code logic is clearer than the asynchronous callback mode -
It provides support for stackfull and stackless. The interface is similar. stackfull is more flexible and easy to use, and stackless is lighter and more efficient
data base
-
Unify and simplify the database operation interface, adapt to various data sources, automatically connect and open the supported database through a unified url, and use the iterator model for data enumeration. -
Currently, sqlite3 and mysql relational databases are supported, and other relational databases can also be customized and extended.
Xml library
-
DOM and SAX parsing modes are provided for xml. SAX mode adopts external iteration mode, which has higher flexibility and performance, and can select specified path for parsing. -
The parsing process is completely based on stream, so it is highly streaming. It can realize the one-stop service of downloading, decompressing, transcoding, and parsing at the same time. It can also parse large-scale data with low memory. -
Provide an xml writer to support the generation of xml
Memory Library
-
Refer to the implementation of the memory management mechanism of the Linux kernel, and carry out various transformations and optimizations on it. The realized TBOX has a complete set of unique memory pool management architecture. -
In debug mode, you can easily detect and locate common memory problems such as memory leaks, memory overruns, memory overlap and coverage, and make statistics and brief analysis of the overall memory usage. -
It makes full use of large data, small data and string data to avoid a large number of external and internal fragments. The allocation operation has been optimized. In 96% cases, the efficiency is O (1).
Container Library
-
Common containers such as hash, linked list, array, queue, stack, minimum and maximum heap are provided. -
Various common member types are supported. In the original container opening, the member types can also be fully customized and extended. -
All containers support iterator operations. -
Most containers can support stream based serialization and deserialization operations.
Algorithm library
-
Various sorting algorithms are provided: bubble sorting, heap sorting, quick sorting and insert sorting. -
Provide various search algorithms: linear traversal, dichotomy search. -
Various traversal, deletion and statistics algorithms are provided. -
It uses iterator as the interface to realize the separation of algorithm and container. It is similar to stl, but the c implementation is lighter.
Network library
-
Implement http client module -
Implement cookies -
Implement dns parsing and caching -
Implement ssl (support openssl, polarssl, mbedtls) -
Support ipv4 and ipv6 -
Support asynchronous mode through coroutine
Math operation library
-
Provide fixed-point operation support with various precision -
Provide random number generator
Libc library
-
A lightweight implementation of libc, completely cross platform, and optimized for different architectures. -
Support most string and wide string operations. -
Various case insensitive operation interfaces for extended strings and wide strings -
Expand and highly optimize memset_u16, memset_u32 and other interfaces, especially suitable for graphic rendering programs
Libm library
-
A lightweight implementation of some interfaces of libm, and the encapsulation of common system interfaces. (Currently, only part of it has been implemented, and it will be completely implemented when time comes) -
The common interface of the extension part adds the integer version calculation of common functions such as sqrt and log2, which is highly optimized and does not involve floating-point operations, and is suitable for embedded environments.
Object library
-
The lightweight Apple class CoreFoundation library supports common objects such as object, dictionary, array, string, number, date, and data, and can easily extend the serialization of custom objects. -
It supports the serialization and deserialization of xml, json, binary, and apple plist (xplist/bplist) formats. It also implements its own binary serialization format, and implements simple encryption for plaintext. Without affecting performance, the serialized size is 30% less than that of bplist.
Platform Library
-
Provide common system interfaces such as file, directory, socket, thread, time, etc -
Provide atomic and atomic64 interfaces -
Provide high-precision and high-precision timers -
Provides high-performance thread pool operations -
Provide event, mutex, semaphore, spin lock and other events, mutex, semaphore, spin lock operations -
Provides an interface for obtaining function stack information, facilitating debugging and error location -
Provide cross platform dynamic library loading interface (if supported by the system) -
Provides io pollers, which are packaged across platforms for epoll, poll, select, and kqueue -
It provides a cross platform context switching interface, which is mainly used for coroutine implementation. The switching efficiency is very high
Compression Library
-
Support the compression and decompression of zlib/zlibraw/gzip (the third-party zlib library support is required).
Character encoding library
-
It supports transcoding among utf8, utf16, gbk, gb2312, uc2, and uc4, and supports both the big and small end formats.
Utility Library
-
Implement base64/32 codec -
Implement common hash algorithms such as crc32, adler32, md5, sha1, etc -
Implement auxiliary debugging tools such as log output and assertion -
Implement url encoding and decoding -
It implements bit operation related interfaces, supports parsing of various data formats, and can parse fields of 8bits, 16bits, 32bits, 64bits, float, double, and any bits. It also supports big end, small end, and local end modes, and optimizes some operations, such as static_stream All streams have related interfaces to encapsulate them, which is convenient for fast data parsing on the stream. -
Realize swap16, swap32, swap64 and other bit exchange operations, and optimize them for each platform. -
Implement some advanced bit processing interfaces, such as: fast statistics of bit 0, fast bit count of leading 0 and leading 1, fast bit count of leading 01 -
Implement the singleton module, which can quickly encapsulate static objects and instance objects, and achieve global thread safety -
Implement the option module, parse command line parameters, and provide fast and convenient command line option creation and parsing operations, which is very helpful for writing terminal programs
Regular expression library
-
Support matching and replacement operations -
Support global, multi line, case insensitive and other modes -
Using the pcre, pcre2, and posix regular libraries
Asio library (obsolete)
-
Please use the coroutine for asynchronous io programming