https://github.com/cloudwalk/iso8583-for-files
A library for Iso8583 parser on files
https://github.com/cloudwalk/iso8583-for-files
Last synced: about 1 year ago
JSON representation
A library for Iso8583 parser on files
- Host: GitHub
- URL: https://github.com/cloudwalk/iso8583-for-files
- Owner: cloudwalk
- License: mit
- Created: 2022-03-31T14:01:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T13:46:04.000Z (about 3 years ago)
- Last Synced: 2025-04-27T11:53:33.568Z (about 1 year ago)
- Language: Rust
- Size: 186 KB
- Stars: 5
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# ISO-8583-FOR-FILES
`iso8583-for-files` is a parser focused on translating RDW, blocking, Bitmaps and PDS directly into one data structure.
Initially forked from [rohitjoshi's parser][iso8583] and heavily adapted for files parsing.
## High level features
- Provide an easy to use interface
- Remove Record Descriptor Word ([RDW][rdw])
- Deblocking
- PDS reading
## Usage
```rust
use iso8583::iso_msg::IsoMsg;
use std::fs::File;
use std::io::Read;
fn parse_r111_binary() {
let file_name = "tests/R111_sample.ipm";
let mut file = File::open(file_name).expect("no file found");
let metadata = std::fs::metadata(file_name).expect("unable to read metadata");
let mut payload = vec![0; metadata.len() as usize];
file.read(&mut payload).expect("buffer overflow");
let _iso8583_file: iso8583::Iso8583File = iso8583::parse_file(payload).unwrap();
}
```
Other examples are available on the [tests file][test]. Tests can be executed directly via shell
```
cargo test
```
## License
This project is licensed under the [MIT license][license].
[iso8583]: https://github.com/rohitjoshi/iso8583
[rdw]: https://www.ibm.com/docs/en/zos/2.2.0?topic=records-record-descriptor-word-rdw
[license]: https://github.com/cloudwalk/iso8583-for-files/blob/main/LICENSE-MIT
[test]: https://github.com/cloudwalk/iso8583-for-files/blob/main/tests/integration_test.rs