GitHub - r-lyeh/tinybits: Tiny bits and useful snippets that I keep using everywhere (C, C++)

r-lyeh

tinybits

Tiny bits and useful snippets that I keep using everywhere.

Too simple to become libraries. Just cut & paste.

Cross-platform C/C++.

Public Domain.

SnippetLanguageDomain

tinyarc4.hpp

C++ARC4 stream cypher

tinyassert.c

C/C++Old assert() macro with new tricks

tinyatoi.c

Catoi() implementation

tinybenchmark.hpp

C++Benchmark code

tinybsearch.c

CDichotomic binary search

tinybsearch.cc

C++Dichotomic binary search

tinybuild.h

CBuild macros

tinydebug.h

CDebug macros

tinydefer.cc

C++Defer macro, Go style

tinydir.cc

C++Directory listing

tinydixy.c

CSmall YAML-subset config file parser

tinydual.sh.bat

BashDual bash/batch file

tinyendian.c

CEndianness conversions

tinyerror.c

CError handling

tinyfsm.c

CTight FSM

tinygc.cc

C++Garbage collector (C++)

tinyhexbase.c

CSimple binary to ascii encoder

tinyhexdump.c

CHexdump viewer

tinyhuman.hpp

C++De/humanized numbers

tinyini.c

CConfig parser (ini+)

tinyjson5.c

CJSON5/SJSON/JSON parser/writer

tinylog.h

CLogging utilities

tinylogger.h

CSimplest colorful logger

tinylogger.hpp

C++Session logger

tinymatch.c

CWildcard/pattern matching

tinymime.c

CMIME/file-type detection

tinypipe.hpp

C++11Chainable pipes

tinyprint.cc

C++Comma-based printer

tinypulse.c

CDigital pulses

tinyroman.cc

C++Integer to roman literals

tinystring.c

CC string library

tinystring.cc

C++C++ string utilities

tinytga.c

CTGA writer (fork)

tinytime.cc

C++Timing utilities

tinytodo.c

CTODO() macro

tinytty.c

CTerminal utilities

tinyunit.c

CUnit-testing

tinyuniso.cc

C++.iso/9960 unarchiver

tinyuntar.cc

C++.tar unarchiver

tinyunzip.cc

C++.zip unarchiver

tinyvariant.cc

C++Variant class

tinyvbyte.h

Cvbyte encoder/decoder (VLE)

tinywav.c

CWAV writer (fork)

tinywtf.h

C/C++Portable host macros

tinyzlib.cpp

C++zlib inflater