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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

breki-0.1.0.tar.gz (86.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

breki-0.1.0-py3-none-any.whl (96.1 kB view details)

Uploaded Python 3

File details

Details for the file breki-0.1.0.tar.gz.

File metadata

  • Download URL: breki-0.1.0.tar.gz
  • Upload date:
  • Size: 86.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for breki-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5707bfd48377fa770f43b22640afbad52e86697334332e8bd417fe000954d06
MD5 1d79b489806b3dbfed5c8b063790261f
BLAKE2b-256 688896b0ee6516cddea0d5e0b92e622fc954f8f5f232675fe5972c6b85eb561d

See more details on using hashes here.

File details

Details for the file breki-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: breki-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 96.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for breki-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4701c6d6264722ab06cf954a3d2f666d47329b8cac1a065728dadc88ab30b68b
MD5 263de5c330e32e0a9414d0dcd1d41273
BLAKE2b-256 8dc1c01d88d2fa213b1394ca64a1cbba7091d1261c5b222fea452177f630d401

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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