20 lines
432 B
Rust
20 lines
432 B
Rust
use sqlite_parser::{
|
|
header::{validate_magic_string, parse_page_size},
|
|
error::Error,
|
|
};
|
|
use std::fs::read;
|
|
|
|
fn main() -> Result<(), Error> {
|
|
// first, read in all the bytes of our file
|
|
// using unwrap to just panic if this fails
|
|
let contents = read("data.sqlite").unwrap();
|
|
|
|
validate_magic_string(&contents)?;
|
|
|
|
let page_size = parse_page_size(&contents)?;
|
|
|
|
println!("{:?}", page_size);
|
|
|
|
Ok(())
|
|
}
|