A simple C++ library for creating and managing bitstreams in memory.

ezbitstream (v0.001)

A simple C++ library for creating and managing bitstreams in memory.

API & Implementation

ezbitstream implements bitstreams with word sizes 8, 16, 32, and 64 bits. The operations supported by the data structure are as follows:

  • Read, set, clear single bits
  • Read and write words with random access, both word-aligned and non-aligned
  • Write buffers to the bitstream with random access, both word-aligned and non-aligned
  • Write to/from other bitstreams with random access, both word-aligned and non-aligned
  • Flush buffer back to the user

The bitstream itself is implemented as a 0-based indexed dynamic buffer of 8, 16, 32, 64 bit words depending on the type.

The implementation is meant to be as self contained as possible, with the only external dependency being stdint.h.

Implementations of individual bitstreams of word size X are given under bitstreamX.h

An example invocation is:

#include "bitstream64.h"
{..}
Bitstream64 bitstream;
bitstream.write_word(...);
bitstream.write_buffer(...);
{...}
uint64_t *buf;
uint64_t buf_size;
bitstream.flush(buf, buf_size);
// do whatever with buf

The library is still under development. If you encounter a bug, please go with an issue into a pull request.

Owner
Unsal Ozturk
PhD. student, part time rubber duck
Unsal Ozturk
Similar Resources

Cross-platform shared memory stream/buffer, header-only library for IPC in C/C++.

Cross-platform shared memory stream/buffer, header-only library for IPC in C/C++.

libsharedmemory libsharedmemory is a small C++11 header-only library for using shared memory on Windows, Linux and macOS. libsharedmemory makes it eas

Dec 4, 2022

OpenXenium JTAG and Flash Memory programmer

OpenXenium JTAG and Flash Memory programmer

OpenXenium JTAG and Flash Memory programmer * Read: "Home Brew" on ORIGINAL XBOX - a detailed article on why and how * The tools in this repo will all

Oct 23, 2022

Tool for profiling heap usage and memory management

Tool for profiling heap usage and memory management

vizzy ./build/vizzytrace /tmp/heapinfo.trace /bin/find /home/zznop -name vizzy _ _ ____ ____ ____ _ _ ( \/ )(_ _)(_ )(_ )( \/ ) \ /

Jul 22, 2022

Test cpu and memory speed at linux-vps

Тест скорости процессора и памяти на linux-vps. Занимается бессмысленным перемножением массивов случайных чисел, для определения скорости процессора и

Nov 30, 2021

Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be useful for remote visualization/debugging.

shared-memory-example Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be usefu

Aug 17, 2022

Detect strange memory regions and DLLs

MalMemDetect Detect strange memory regions and DLLs Compile as a DLL and inject into a process to identify hollowed DLLs and unmapped memory region ca

Dec 6, 2022

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

rpmalloc - General Purpose Memory Allocator This library provides a public domain cross platform lock free thread caching 16-byte aligned memory alloc

Dec 28, 2022

manually map driver for a signed driver memory space

smap manually map driver for a signed driver memory space credits https://github.com/btbd/umap tested system Windows 10 Education 20H2 UEFI installati

Dec 17, 2022

Memory instrumentation tool for android app&game developers.

Memory instrumentation tool for android app&game developers.

Overview LoliProfiler is a C/C++ memory profiling tool for Android games and applications. LoliProfiler supports profiling debuggable applications out

Jan 6, 2023
The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.

The Hoard Memory Allocator Copyright (C) 1998-2020 by Emery Berger The Hoard memory allocator is a fast, scalable, and memory-efficient memory allocat

Jan 2, 2023
Custom memory allocators in C++ to improve the performance of dynamic memory allocation
Custom memory allocators in C++ to improve the performance of dynamic memory allocation

Table of Contents Introduction Build instructions What's wrong with Malloc? Custom allocators Linear Allocator Stack Allocator Pool Allocator Free lis

Jan 2, 2023
Memory-dumper - A tool for dumping files from processes memory

What is memory-dumper memory-dumper is a tool for dumping files from process's memory. The main purpose is to find patterns inside the process's memor

Nov 9, 2022
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Mesh: Compacting Memory Management for C/C++ Mesh is a drop in replacement for malloc(3) that can transparently recover from memory fragmentation with

Dec 30, 2022
A simple windows driver that can read and write to process memory from kernel mode

ReadWriteProcessMemoryDriver A simple windows driver that can read and write to process memory from kernel mode This was just a small project for me t

Dec 7, 2022
Known ring3 memory protections that can be handled at a simple level.
Known ring3 memory protections that can be handled at a simple level.

EasySafe Known ring3 memory protections that can be handled at a simple level. Example usage Check Example.cpp Syscall hooking Add a syscall hook Spec

Oct 27, 2022
Malloc Lab: simple memory allocator using sorted segregated free list

LAB 6: Malloc Lab Main Files mm.{c,h} - Your solution malloc package. mdriver.c - The malloc driver that tests your mm.c file short{1,2}-bal.rep - T

Feb 28, 2022
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

memory The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to b

Dec 26, 2022
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Dec 2, 2021
Modern C++ 32bit Windows Process Memory Library.
Modern C++ 32bit Windows Process Memory Library.

basil Simple 32-bit Windows Process Memory Library. Written in Modern C++. JavaScript bindings basil (wilL) be available as bindings for JavaScript. C

Jul 5, 2022