Skip to main content

New top story on Hacker News: Show HN: Hexi, modern header-only network binary serialisation for C++ hackers

Show HN: Hexi, modern header-only network binary serialisation for C++ hackers
14 by Chaosvex | 2 comments on Hacker News.
Over the last few years, I've needed an easy way to quickly serialise and deserialise various network protocols safely and efficiently. Most of the libraries that existed at the time were either quite heavy, had less than stellar performance, or were an abstraction level above what I was looking for. I decided to put together my own class to do the job, starting with an easy, low-overhead way to move bytes in and out of arbitrary buffers. Along the way, it picked up useful bits and pieces, such as buffer structures and allocators that made the byte shuffling faster, often being able to do it with zero allocations and zero copies. Safety features came along to make sure that malicious packet data or mistakes in the code wouldn't result in segfaults or vulnerabilities. It's become useful enough to me that I've packaged it up in its own standalone library on the chance that it might be useful to others. It has zero dependencies other than the standard library and has been designed for quick integration into any project within minutes, or seconds with a copy paste of the amalgamated header. It can be used in production code but it's also ideal for for those that want to quickly hack away at binary data with minimal fuss.

Comments

Popular posts from this blog

New top story on Hacker News: Ask HN: Is the EULA on my new $30k RED cinema camera legal?

Ask HN: Is the EULA on my new $30k RED cinema camera legal? 70 by red_throwaway | 77 comments on Hacker News. TLDR: I bought a $30K professional cinema camera that doesn't work unless I sign away my rights to privacy and possibly the video content I make with it ( at least it seems ) Over the past few years my photography business has seen a surge in demand for ultra high quality video production work. In an effort to meet this demand, I picked up one of RED Digital Cinema's newest pro camera bodies, the RED V-RAPTOR. Considering this camera is used by professional filmmakers to create films destined for cinemas, it's not surprising that it came with a $30k price tag. After unboxing and assembling it, I power the camera on and the first thing I see is a wall of legal text on the embedded LCD. Turns out it's a "Software License Agreement" that I'm required to consent to using the on-camera menu buttons before any of the camera's functionality becomes...