Skip to main content

breki

Bikkie's Reverse Engineering Kit

Features

  • archives
    • Archive: virtual filesystem (similar to zipfile.ZipFile)
    • DiscImage: virtual disc image (tracks & sectors; behaves like a BinaryStream)
  • binary
    • xxd: hex view for terminal
    • find_all: .find but it keeps looking
    • read_str: read stream until null byte
    • read_struct & write_struct: struct wrappers for working with binary streams
  • core
    • built on struct from the standard library
    • Struct: robust base class for parsing objects from bytes
    • MappedArray: used by Struct for handling nested structures
    • BitField: basic bitfield parser
  • files
    • CodePage: string encoding & decoding tool
    • File: virtual file wrapper (stream + metadata)
    • FriendlyFile: base class for objects w/ data spread over multiple files
    • ParsedFile: base class for objects representing file data
    • BinaryFile & TextFile: ParsedFile subclasses for their matching DataTypes
    • HybridFile: ParsedFile subclass for files with both binary & text representations
  • libraries
    • GameLibrary: scans game folders for files we can parse
  • parse
    • TokenClass: two-way string to python object conversion

Migration from bsp_tool

  • utils.binary -> binary
  • core
  • archives
    • ArchiveClasses
    • DiscClasses
  • tests.files -> libraries
    • GameLibrary
    • Librarians
    • TODO: ~/.library_map.json config
    • bulk file parsing
      • optionally defer w/ a generator

Maybes

  • lumps
    • LumpClass.from_count is handy
    • BasicLumpClass is just as handy
  • apex_archive
    • but not hardcoded for apex
    • for managing an archive of game updates

Installation

To use the latest unstable version, clone with git:

$ git clone git@github.com:snake-biscuits/breki.git
$ cd breki
$ pip install -e .

You can also clone with pip:

$ pip install git+https://github.com/snake-biscuits/breki.git

Or, use the latest stable release (August 2026 | 0.1.0 | Python 3.8-14):

$ pip install breki

Usage

TODO: usage guide / general docs

Common Mistakes

Archive / Filepath order

File.__init__ argument order is filepath, archive.

File.from_archive argument order is archive, filepath.

For .__init__: the archive is optional, so it can't come before filepath.

For .from_archive: the archive is essential & it comes first in the path string.

e.g. folder/archive.zip/file.ext -> .from_archive(Zip("folder/archive.zip"), "file.ext")

It's also worth noting that __init__ args are a valid way to open a file.

Since the data isn't read until File.stream is first cached.

Shoutouts

Tools

Metadata

Release files for breki 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for breki 0.1.0
File Size Uploaded
breki-0.1.0.tar.gz 86.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for breki 0.1.0
File Interpreter ABI Platform
breki-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 182.4 kB

Release files / breki-0.1.0.tar.gz

Download URL breki-0.1.0.tar.gz
Size 86.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b5707bfd48377fa770f43b22640afbad52e86697334332e8bd417fe000954d06
BLAKE2b-256 checksum
How to use checksums
688896b0ee6516cddea0d5e0b92e622fc954f8f5f232675fe5972c6b85eb561d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / breki-0.1.0-py3-none-any.whl

Download URL breki-0.1.0-py3-none-any.whl
Size 96.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4701c6d6264722ab06cf954a3d2f666d47329b8cac1a065728dadc88ab30b68b
BLAKE2b-256 checksum
How to use checksums
8dc1c01d88d2fa213b1394ca64a1cbba7091d1261c5b222fea452177f630d401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page