Skip to content

Home

Build Status NuGet Version NuGet Downloads

Extension methods on primitive types for various binary operations, such as reading and writing values from bytes and calculating parity.

The name is based on the BinaryPrimitives class in the .NET Framework which provides similar methods.

Reading and Writing

Extension methods on byte container types (byte[], Span<byte>, Stream, and others) for reading and writing multi-byte primitive values with configurable endianness.

Read more

UInt24

A 24-bit unsigned integer value type (UInt24) bridging the gap between ushort (16-bit) and uint (32-bit). Implements the full suite of .NET generic math interfaces and is returned by all GetUInt24 read methods.

Read more

Bit Operations

Extension methods on integer types (byte, ushort, int, uint, long, ulong) for common bit-level operations: individual bit access, bit range extraction and replacement, nibble manipulation, parity, overflow detection, and binary string formatting.

Read more

Streams

Two Stream implementations for byte-oriented work: ReadOnlyListStream wraps an IReadOnlyList<byte> as a seekable read-only stream, and PeekableStream adds peek-without-consuming to any readable stream.

Read more

Licencing

Licensed under GPL v3.0.