x12-stream-parser
A high-performance, low-level, iterator-based X12 EDI stream parser for Rust.
Features
- Stream-based: Parse X12 data without loading the entire file into memory
- Zero-copy: Uses byte slices to minimize memory allocation
- Iterator-based: Iterate through segments as they're parsed
- Lightweight: Minimal dependencies and small code footprint
- Customizable: Support for custom delimiters and separator configurations
- Fast: Optimized for performance in parsing large X12 files
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage
use ;
Performance
The library is designed with performance in mind:
- Minimizes memory allocations
- Uses byte slices instead of strings where possible
- Leverages Rust's zero-cost abstractions
- Provides iterators for efficient streaming processing
Customization
You can customize the parser with different delimiters:
// Using non-standard delimiters
let custom_delimiters = new;
let parser = new;
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.