-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d9db04
commit ef66534
Showing
2 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# phosg | ||
|
||
phosg is a basic C++ wrapper library around some common C routines. | ||
|
||
A short summary of its contents: | ||
* Byteswapping and encoding functions (base64, rot13) | ||
* Integer types with explicit endianness and transparent byteswapping | ||
* Directory listing, smart-pointer fopen and stat, file and path manipulation | ||
* Hash functions (fnv1a64, fnv1a32, sha1, sha256, md5) | ||
* Basic image manipulation/drawing | ||
* JSON (de)serialization | ||
* Network helpers (IP address parsing/formatting, socket listen and connect functions) | ||
* Functions for getting random data from the OS | ||
* Process utilities (list processes, name <> PID mapping, subprocess execution) | ||
* Time conversions | ||
* std::string helpers like printf, split/join, time and size formatting, etc. | ||
* 2D, 3D, and 4D vectors and basic vector math | ||
* KD-tree and LRU set data structures | ||
|
||
This project also includes a few simple executables: | ||
* **jsonformat**: Parses the input JSON and either minimizes it (with --compress) or reformats it for human readability (with --format). | ||
* **bindiff**: Shows the differing bytes between two binary files in a colored hex/ASCII view. This just does a direct comparison of the two files byte for byte; it doesn't run any e.g. edit-distance algorithm (yet). | ||
* **parse-data**: Parses the data format used by `phosg::parse_data_string` and outputs the result. | ||
* **phosg-png-conv**: Converts the input image (in any format that `phosg::Image` can load) to a PNG image. | ||
|
||
## Building | ||
|
||
Building & installing on macOS, Linux, or Windows (in a Cygwin bash shell): | ||
* Install CMake and zlib (zlib-devel on Cygwin). | ||
* `cmake .` | ||
* `make` | ||
* `make test` | ||
* `sudo make install` | ||
|
||
The Windows build does not have continuous integration, so I may accidentally break it and not know for a while. Please file a GitHub issue if it doesn't work. |