Skip to content
Matthew Barker edited this page Jun 14, 2026 · 1 revision

BIS.Core

Foundation module. All format-specific modules depend on BIS.Core for shared utilities, compression, stream handling, config parsing, and math types.

No internal dependencies. This is the leaf module of the dependency graph.

Namespaces

BIS.Core.Streams

Enhanced binary I/O used throughout the library.

Type Description
BinaryReaderEx Extended BinaryReader with ReadAsciiz(), ReadUTF8z(), ReadLZSS(), aligned reads, and position tracking
BinaryWriterEx Extended BinaryWriter with WriteAsciiz(), aligned writes
StreamHelper Utility methods for stream operations
TrackedArray Array wrapper with access tracking for debugging
IReadObject Interface for objects that can read themselves from a BinaryReaderEx
IReadWriteObject Interface for objects that can read/write themselves

BIS.Core.Compression

Decompression algorithms used by PBO and other archive formats.

Type Description
LZSS LZSS decompression (the primary PBO compression method)
LzssCompression LZSS compression/decompression stream wrapper
LZO LZO decompression implementation
MiniLzo Lightweight LZO implementation

BIS.Core.Config

Parsing for Arma's config.bin (binarized config format) and params files.

Type Description
ConfigParser Reads binarized config.bin files into an AST
ConfigSerializer Serializes config AST back to text or binary
ConfigPreprocessor Preprocessor for config source files
ConfigTokenizer Tokenizer for config source
ConfigFiles Config file discovery and helpers
Params / ParamClass / ParamValue AST node types for config structure (classes, values, arrays)

BIS.Core.Math

3D math types used by P3D model data and world coordinates.

Type Description
Vector3P 3D vector (float)
Vector3PCompressed Compressed 3D vector (integer)
Matrix4P 4x4 transformation matrix
QuaternionP Quaternion for rotation
TransformP Combined transform (position + orientation + scale)
ShortFloat 16-bit float representation

BIS.Core.Core

Type Description
Color RGBA color (used in P3D vertex colors and PAA pixels)
QuadTree Quad-tree spatial index (used in WRP world files)
Methods General utility methods

BIS.Core.Serialization

Type Description
ArmaTextDeserializer Deserializes Arma's text serialization format
ArmaTextSerializer Serializes objects to Arma's text format

Usage

// Reading a config.bin
using var stream = File.OpenRead("config.bin");
var reader = new BinaryReaderEx(stream);
var parser = new ConfigParser();
var config = parser.ParseFile(stream);

// Navigate the config AST
var root = config.Root;
foreach (var entry in root.Entries)
{
    if (entry is ParamClass cls)
        Console.WriteLine($"Class: {cls.Name}");
}

// LZSS decompression
byte[] compressed = File.ReadAllBytes("compressed.dat");
byte[] decompressed = LZSS.Decompress(compressed, originalSize);

Test Data

Test data for config.bin parsing is extracted from ALDP PBOs. Run _testdata/download.sh to populate it. Integration tests skip gracefully if no config.bin files are present.

Clone this wiki locally