Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Feb 23, 2025
1 parent 6d9db04 commit ef66534
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
28 changes: 0 additions & 28 deletions README

This file was deleted.

35 changes: 35 additions & 0 deletions README.md
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.

0 comments on commit ef66534

Please sign in to comment.