diff --git a/README.md b/README.md index 6cb9e8a..14543c6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/fo4/chunk.rs b/src/fo4/chunk.rs index c44b86d..c143c1a 100644 --- a/src/fo4/chunk.rs +++ b/src/fo4/chunk.rs @@ -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); diff --git a/src/fo4/file.rs b/src/fo4/file.rs index ff5a3eb..7483603 100644 --- a/src/fo4/file.rs +++ b/src/fo4/file.rs @@ -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, @@ -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 { diff --git a/src/fo4/mod.rs b/src/fo4/mod.rs index 7356d4c..c224c8a 100644 --- a/src/fo4/mod.rs +++ b/src/fo4/mod.rs @@ -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, }