Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-rsm-McKenzie committed Feb 11, 2024
1 parent caa9b13 commit 88c179c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

`ba2` is a DOM-based reader/writer for archives made for the Creation Engine games. It includes near-complete support for all archive variants from Morrowind up to Starfield. `ba2` leverages mem-mapped i/o to cut down on the memory bloat typically associated with DOM-based approaches. It is Rust a port of the equivalent [C++ library](https://github.com/Ryan-rsm-McKenzie/bsa).

The latest development docs are available at: https://ryan-rsm-mckenzie.github.io/bsa-rs/ba2/index.html

The stable release docs are available at: https://docs.rs/ba2/latest/ba2/

Changelogs are available on the Github releases page: https://github.com/Ryan-rsm-McKenzie/bsa-rs/releases

# Maturity

`ba2` is not nearly as mature as its C++ cousin, however it does leverage the C++ test suite, and as such it manages to stand head and shoulders above existing solutions in terms of correctness of implementation. Tests are written directly in the source code, instead of being kept separately. See [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/tes3/archive.rs#L244), [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/tes4/archive.rs#L906), and [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/fo4/archive.rs#L574) for the majority of written tests.
`ba2` is not nearly as mature as its C++ cousin, however it does leverage the C++ test suite, and as such it manages to stand head and shoulders above existing solutions in terms of correctness of implementation. Tests are written directly in the source code, instead of being kept separately. See [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/tes3/archive.rs#L244), [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/tes4/archive.rs#L906), and [here](https://github.com/Ryan-rsm-McKenzie/bsa-rs/blob/51521859898fc67e24c7783a31c35ce66d5b9559/src/fo4/archive.rs#L574) for the majority of the written tests.

# Release Schedule

Expand Down
1 change: 1 addition & 0 deletions src/fo4/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use flate2::{
use lzzzz::{lz4, lz4_hc};
use std::io::Write;

/// See also [`ChunkCompressionOptions`](CompressionOptions).
#[derive(Debug, Default)]
#[repr(transparent)]
pub struct CompressionOptionsBuilder(CompressionOptions);
Expand Down
6 changes: 6 additions & 0 deletions src/fo4/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ impl From<&ArchiveOptions> for WriteOptions {
}
}

/// File header for DX10 archives.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DX10 {
pub height: u16,
Expand All @@ -336,11 +337,16 @@ pub struct DX10 {
pub tile_mode: u8,
}

/// File header for GNMF archives.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GNMF {
/// See [here](https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/GNFTexture.cs#L529-L536) for more info.
pub metadata: [u32; 8],
}

/// Optionally present file header.
///
/// The header variant must match the archive [`Format`] when writing.
#[allow(clippy::upper_case_acronyms)]
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub enum Header {
Expand Down
4 changes: 2 additions & 2 deletions src/fo4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ pub enum Format {
#[default]
GNRL,

/// A DX10 archive can only contain .dds files.
/// A DX10 archive can only contain .dds files (Microsoft DirectX).
DX10,

/// A GNMF archive can only contain .gnf files.
/// A GNMF archive can only contain .gnf files (Sony GNM).
GNMF,
}

Expand Down

0 comments on commit 88c179c

Please sign in to comment.