Skip to main content

openqvd/
lib.rs

1//! OpenQVD: clean-room reader for Qlik QVD files.
2//!
3//! Implements the specification in `SPEC.md` (Apache-2.0). Derived
4//! entirely from binary analysis of a public corpus; no existing QVD
5//! parsers have been consulted.
6//!
7//! # Quick start
8//!
9//! ```no_run
10//! use openqvd::Qvd;
11//!
12//! let qvd = Qvd::from_path("data.qvd").unwrap();
13//! println!("table {:?} with {} rows", qvd.table_name(), qvd.num_rows());
14//! for row in qvd.rows() {
15//!     for (field, value) in qvd.fields().iter().zip(row) {
16//!         println!("  {} = {:?}", field.name, value);
17//!     }
18//! }
19//! ```
20//!
21//! The reader is strict: any deviation from the spec produces a
22//! [`QvdError`] rather than silent misinterpretation.
23
24#![forbid(unsafe_code)]
25#![warn(missing_docs)]
26#![cfg_attr(not(test), warn(clippy::unwrap_used, clippy::expect_used))]
27
28mod error;
29mod header;
30mod reader;
31mod symbols;
32mod value;
33mod writer;
34
35pub(crate) mod bytes;
36
37#[cfg(feature = "arrow")]
38mod arrow;
39
40pub use error::QvdError;
41pub use header::{FieldHeader, NumberFormat, TableHeader};
42pub use reader::{CheckedRowIter, Qvd};
43pub use value::{Dual, Value};
44pub use writer::{Column, WriteTable};
45
46#[cfg(feature = "arrow")]
47pub use self::arrow::{record_batch_to_write_table, ColumnFilter, Filter};