librats vs libp2p: what a 5 MB peer-to-peer node buys you
Benchmarking librats, my C++ peer-to-peer library, against js-libp2p: 22x less memory, a 9.3x small-message gap, and a dead heat on bulk throughput.
9 articles
Benchmarking librats, my C++ peer-to-peer library, against js-libp2p: 22x less memory, a 9.3x small-message gap, and a dead heat on bulk throughput.
librats is an MIT-licensed peer-to-peer library: encrypted transport, mainline DHT discovery, NAT traversal and pub/sub in 5 MB for C++, Node.js, Python and Android.
Making ANSI escape colors work in the Windows console from C/C++ with ENABLE_VIRTUAL_TERMINAL_PROCESSING, instead of printing raw escape characters.
Linking MinGW binaries fully statically with CMake to drop the libgcc_s_seh-1.dll and libstdc++-6.dll runtime dependencies from your Windows build.
Detecting CPU architecture (x86, x86_64, ARM, ARM64) at compile time with portable C/C++ preprocessor macros across GCC, Clang and MSVC.
Fixing the _ZSt28__throw_bad_array_new_lengthv linker error on MinGW - how a libstdc++ version mismatch happens and how to verify your toolchain.
GStreamer from C/C++: building H264/MP4 decode pipelines, gst-launch-1.0 basics, appsink/appsrc buffer manipulation and camera capture.
Decoding AAC on Android with the NDK AMediaCodec API: SoftAAC2 internals, ADTS header alignment and why the decoder drops your first frames.
A small WinAPI trick in C++ to send a Ctrl+C (or any key combination) to an arbitrary Windows window found by its process ID.