nothings / single_file_libs Goto Github PK
View Code? Open in Web Editor NEWList of single-file C/C++ libraries.
List of single-file C/C++ libraries.
Hi
I'd like to request an addition for TinySoundFont, a portable software synthesizer using SoundFont2 sound bank files.
It's a single-file library closely following the stb_howto.txt.
category | library | license | API | files | description |
---|---|---|---|---|---|
audio | TinySoundFont | MIT | C/C++ | 1 | SoundFont2 synthesizer |
Thanks for the list and the libs!
Hej!
I just published https://github.com/DrMcCoy/dmc_unrar, a dependency single-file library to unpack and decompress RAR archives, usable from both C and C++. The license is GPLv2+, though, because the unrar code is based on existing GPLv2+ and LGPLv2+ code.
It can unpack RAR 1.5, 2.0/2.6 (including audio/media compression) and 2.9/3.6 (including PPMd, and all stock filters except the Itanium one). It can't do RAR 5 yet and it also doesn't support generic filter bytecode (which would run on a RARVM). There's several other smaller features still missing, but it is very much usable already.
Cheers
Sven
Hello, there is my C++11 header-only library for deal different stuff with random in most convenient way
More info in readme: https://github.com/effolkronium/random
It would be nice to be added to this list.
Hi,
I created a small library for writing command-line interfaces, kindda like the cmd module in Python.
It's located here:
http://github.com/ronen25/libcmdf
It's single-header, ANSI C, Public Domain.
Wondering if it can be included here.
Thank you, and thanks for this incredible collection!
mentioned on Twitter, but trying here, if there is something special about this:
https://github.com/cr88192/bgbtech_misc/blob/master/mini/btac1c_mini0.h
a basic format spec:
https://github.com/cr88192/bgbtech_misc/wiki/BTAC1C
what is it:
a variant of MS-IMA-ADPCM, with some stuff to fudge blocks to power-of-2 sizes, and some extended filters (intended to hopefully allow for higher audio quality vs raw ADPCM);
has a compatible subset with the normal MS-IMA-ADPCM (mono audio can be decoded, and encoder can be forced to produce normal ADPCM).
what is it intended for:
mostly for allowing arbitrary blocks to be decoded in arbitrary order, such as in the back-end of a mixer;
this avoids the cost (and memory use) of up-front decoding into PCM, while IME generally fast enough to not add a significant overhead over the use of raw PCM audio, with a bitrate not significantly worse than typical MP3 audio (given ~ 4 bits/sample, 22kHz gives 88kbps, and 11kHz gives 44kbps).
what does this not address:
it doesn't directly address either WAV loading, or managing a sample-block cache, as this would add a fair bit of code (and a simplistic WAV loader which spits out PCM would completely miss the point).
approx measured speeds (on a 3 GHz AMD K10, MSVC /O2):
stereo: encode= ~ 3 megasamples/second, decode=~ 42 megasamples/second
mono: encode= ~ 10 megasamples/second, decode=~ 63 megasamples/second
license: MIT.
side notes:
elsewhere I also have a Windows ACM implementation (decodes this variant, but only encodes an older/simpler subset for now);
this is derived mostly from code copy/pasted from my 3D engine.
https://github.com/lordoffox/ajson
no dom , direct struct bind , high performance , easy to use.
Hello, maybe http://github.com/antirez/linenoise could be a good fit for the listing. Cheers.
Also, catch2 can be added I think
Hi,
what about m_image ?
https://github.com/anael-seghezzi/Maratis-Tiny-C-library/blob/master/include/m_image.h
graphics (2d) | m_image | zlib | C/C++ | 1 | image processing routines
Alternately, I have other single file libraries here:
https://github.com/anael-seghezzi/Maratis-Tiny-C-library
Maybe not all as complete as m_image.
Thank you for the libs and inspiration !
https://github.com/c-smile/cpp-generators
But it just one .hpp file, not two. Will it qualify?
https://github.com/RandyGaul/tinysound - One file C/C++ API for loading/playing/looping sounds. Minimal dependencies. zlib license (in source as comment), 1 file.
Hi,
I have a public-domain AVL tree implementation in pure C89 that works well on embedded devices and in general applications as well. You can ignore the LICENSE file in the repository, as it's simply a public-domain placeholder. See src/avl.[ch] for the actual library code.
I have several other libraries that I will clean up and submit issues for as well, time permitting.
https://github.com/adishavit/simple-svg
This library generates svg images for vectors, all from a small single header file
I was browsing your links & found that your link for zed_net goes to a 404 page https://github.com/ZedZull/zed_net
Sorry, I don't know anything more but I thought you'd like to know.
Thanks for doing this.
The algorithm used in sdf.h does multiple passes and only produces an approximation. Since its invention, many exact linear time algorithms have been proposed, but people keep implementing the old algorithm.
I thought this might be a good opportunity to promote one of the newer algorithms.
I found this in the glfw dependencies.
https://github.com/datenwolf/linmath.h
Seems like a good addition
https://github.com/zserge/webview
A library creates a window with full-size webview and allows bi-directional communication between C/C++ and JavaScript inside the webview. The library was created in order to provide a simple way for creating modern nice-looking desktop GUI apps.
It can qualify as 2 files, one C/C++ header and a separate LICENSE file (MIT):
Header itself is usable on Linux, MacOS and Windows (CI ensures it works on both 32- and 64-bit systems). Header can be used from both, C99 and C++.
It's a public domain C library for creating simple PDF documents. Should be straight C11 clean.
https://github.com/AndreRenaud/PDFGen
https://github.com/lordoffox/aredis
esay to use
no dependence
cross platform
header only
https://github.com/mayanklahiri/easyexif is BSD-Clause 2 Licensed and it is given as MIT in the ReadMe,md file please modify it!
P.S it is under the images category
Shameless plug:
library | license | API | files | description |
---|---|---|---|---|
debug-assert.hpp | zlib | C++ | 1 | simple, flexible and modular assertion macro |
This is a series of MIT-licensed, one-file libraries for C++11 and C++14. They have been featured in CppCon for several years, and are in the process of becoming part of C++20.
https://github.com/HowardHinnant/date
date.h
- provides various types for calculating dates and durations.These build on top of date.h
:
tz.h
and tz.cpp
(two files) - timezone support, with a tzdata parser.isoweek.h
- ISO week date calendar supportjulian.h
- Julian calendar supportislamic.h
- Islamic calendar supportjsmn is a really simple lib to parse json. Used in https://kristaps.bsd.lv/acme-client/ and other places.
in the parsing part may be the cJason lib is appreciate
Hi! Thank you for including my library.
linkom is MIT-licensed. Did you detect any problem with that on my lib? Thank you very much.
Hernan
https://github.com/tiny-dnn/tiny-dnn
C++11 deep learning framework in a single header
A MIT-licensed web server, fork of an pre-GPL version of mongoose.
https://github.com/civetweb/civetweb
I have a library here called visit_struct
which might fit with your criteria:
https://github.com/cbeck88/visit_struct
There are technically several files here, not just one, however, the main file visit_struct.hpp
can be used as a stand-alone and gets you the vast majority of the functionality. I think this is how most are using it. The extra headers are for extra features / compatibility with other libraries.
The main header is also quite short and the library as a whole is minimalistic, I think it fits well with the premise here.
Cheers
https://github.com/VISWESWARAN1998/CyberGod-KSGMPRH/tree/master/SUB-PROJECTS/strings
is a program which is used to extract ascii strings from the executable, which is currently utilized by my Anti-virus
How can I contribute including CSV parser libraries?
PS: single_file_libs is a very nice ideia!
https://github.com/tanakh/cmdline
This library makes it simple to build otherwise non-trivial command line interfaces. It only requires you include the cmdline.h
file. I've seen it used on Ubuntu, Fedora, OS X, and Windows. The license is somewhat ambiguous. The license reads like BSD.
Perhaps my single-file operating system, OOSMOS, can be included in your list.
oosmos.com website
OOSMOS on GitHub
Cheers
The CImg Library is a small, open-source, and modern C++ toolkit for image processing. It is made of a single include-only header file CImg.h
http://cimg.eu (https://github.com/dtschump/CImg)
Category: images
License: CeCILL-C (close to the GNU LGPL) or CeCILL (compatible with the GNU GPL)
API: C++
Files: 1
Description: multi-format image processing and display
#include "CImg.h"
using namespace cimg_library;
int main(void)
{
CImg<unsigned char> image("lena.jpg");
image.blur(2.5);
CImgDisplay main_disp(image,"Lena (blurred)");
while (!main_disp.is_closed()) {
main_disp.wait();
}
return 0;
}
Hi,
Here my single header serialization library (gist).
Thank you for the great list.
I have a collection of intrusive data structures written in C released in the public domain
https://github.com/graphitemaster/libintrusive
They're two files each (note there are multiple data structures here)
https://github.com/kobalicek/broken
It's public domain, but I'm not sure if it matches all conventions. You need 2 or 3 files (depends whether you want to use the provided broken_main.cpp
file, which just calls BrokenAPI:run()
). It's C++ only as it relies on static initialization.
C++ mocking library (test support), single header file (in c++03 variant). Can runtime mock any interface or free library function on a variety of dev platforms (Mac, Linux, Windows supported). Already existed since 2008...
From my own collection of single-file libraries, I would like to submit selist.[hc], which implement a space-efficient list by way of an unrolled linked list, by bunching up several nodes into one, reducing both memory overhead for pointers and required number of allocations.
My repository is here: https://github.com/ennorehling/clibs and it contains more than those two files, but I don't feel the rest of the code is ready for submission (yet).
Only implements DIT-2 (so, length in powers of 2) fft/ifft on complex numbers and only works with arrays of pairs of double precision floats. C-style C++ though.
This is my own library, it's primarily targeted at Windows programmers. Includes an optional COM bindings to use it in other languages.
Hi,
I like this collection. Wondering if these are admissible:
XPL a scripting language in C that as small as a quark ;P
framepacker a texture bin packing algorithm in C++.
Both are single header only.
Regards.
miniexpect is an expect-like library for C written as two files, a source file and a header file, so I believe it fits the definition. It has a single dependency (PCRE) but that is very widely available, even on Android. I have compiled this on many different Linux architectures, but to be fair never on Windows, although I don't have a reason to believe it would not work on Windows.
Source: http://git.annexia.org/?p=miniexpect.git;a=tree (only miniexpect.c and miniexpect.h are required, the other files are documentation, tests and examples).
More about it: https://rwmj.wordpress.com/2014/04/25/miniexpect-a-small-expect-library-for-c/
inih is a simple .INI file parser for configuration files, perfect for embedded systems (I wrote a Nintendo 3DS Homebrew that used it). Would be a great addition to this list, for when you need something simpler than JSON for config files.
It is a C++ swarming (flocking) library for real-time applications.
https://github.com/Cultrarius/Swarmz
The only file needed is the swarmz.h.
https://github.com/voidah/archive
license: public domain
The only required file is archive.h
Usage examples in main.cpp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.