Go implementation of the SBHPF binary format
Find a file
zervo 4cb9df6cdd
All checks were successful
/ test (push) Successful in 1m28s
Update README.md
2025-02-14 17:35:47 +01:00
.forgejo/workflows Fix workflow name 2025-02-14 17:16:49 +01:00
.vscode Add spell config & fix spelling mistake 2025-02-14 17:00:47 +01:00
pkg/seekablebuffer Add SeekableBuffer 2025-02-14 12:04:04 +01:00
SBHPFv1 Add spell config & fix spelling mistake 2025-02-14 17:00:47 +01:00
.gitignore Add .gitignore 2025-02-14 16:53:52 +01:00
go.mod Initial commit 2025-02-14 01:40:36 +01:00
go.sum Initial commit 2025-02-14 01:40:36 +01:00
LICENSE Update LICENSE & README.md 2025-02-14 12:02:38 +01:00
README.md Update README.md 2025-02-14 17:35:47 +01:00

GoSBHPF

Test status Stars status

GoSBHPF is a go library implementing the SBHPF binary format.

It provides functions for serialization and deserialization of SBHPF trees and individual components (nodes and properties).

Will also support efficient dynamic seeking of files in the future.

Installation

Add the module to your project:

go get git.zervo.org/FLUX/GoSBHPF

Then use it in your code:

package main

import (
    sbhpf "git.zervo.org/FLUX/GoSBHPF/SBHPFv1"
)

func main() {
    node := sbhpf.Node{}

    // Rest of code...
}

Usage

There are a variety of different functions and types in this package, but it can be simplified to:

  • (type) Node: Usable object representing SBHPF node.

  • (type) Property: Usable object representing SBHPF node property.

  • (type) Value Type: Usable object representing a SBHPF node property value type.

All this terminology is outlined in the SBHPF version 1 standard.

You can use these types to build a tree structure that can later be efficiently serialized to a raw SBHPF format.

You can also deserialize raw SBHPF into a node object representing the original tree.

NOTE: This library is in its early stages. Parsing performance will be improved over time, and more functions will be added (such as search algorithms). Because of this, the functions of the library are not documented here yet. They do however have quite descriptive comments, which can be viewed directly when consuming the library in any modern go-compatible IDE, or alternatively in the source code.