poe_data_tools 1.0.0

A library for working with Path of Exile game data
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::file_parsers::{FileParser, VersionedResult, shared::utf16_bom_to_string};

pub mod parser;
pub mod types;
use parser::parse_cht_str;
use types::*;

pub struct CHTParser;

impl FileParser for CHTParser {
    type Output = CHTFile;

    fn parse(&self, bytes: &[u8]) -> VersionedResult<Self::Output> {
        let contents = utf16_bom_to_string(bytes)?;

        parse_cht_str(&contents)
    }
}