Skip to main content

Crate copybook_codec

Crate copybook_codec 

Source
Expand description

Encoding and decoding codecs for COBOL data types.

This crate provides the encoding/decoding logic for COBOL record layouts, including character set conversion, numeric codecs, and record framing.

Re-exports§

pub use iterator::RecordIterator;
pub use iterator::iter_records;
pub use iterator::iter_records_from_file;
pub use lib_api::RunSummary;
pub use lib_api::decode_file_to_jsonl;
pub use lib_api::decode_record;
pub use lib_api::decode_record_with_scratch;
pub use lib_api::encode_jsonl_to_file;
pub use lib_api::encode_record;
pub use numeric::SmallDecimal;
pub use numeric::ZonedEncodingInfo;
pub use determinism::check_decode_determinism;
pub use determinism::check_encode_determinism;
pub use determinism::check_round_trip_determinism;
pub use copybook_codec_memory as memory;

Modules§

charset
Character set conversion between EBCDIC codepages and UTF-8. Character set conversion utilities
determinism
Determinism validation for decode, encode, and round-trip operations. Determinism validation for COBOL copybook encoding and decoding operations.
edited_pic
Edited PIC (numeric editing) decode and encode support. Edited PIC (Phase E2 + E3) decode and encode support
iterator
Streaming record iterator for file-level decoding. Record iterator for streaming access to decoded records
lib_api
Core library API: record decode/encode and file-level processing. Core decode / encode API for COBOL binary data.
numeric
Numeric field decoding and encoding (zoned decimal, packed decimal, binary).
options
Configuration types: codepage, record format, JSON modes, raw capture. Backward-compatible options facade.
record
Record-level binary decode/encode logic. Record framing facade.
zoned_overpunch
Zoned decimal overpunch character handling. Zoned decimal overpunch API.

Structs§

ByteDiff
Details about a byte difference found during determinism checking.
DecodeOptions
Options for decoding operations
DeterminismResult
Result of a determinism check operation.
EncodeOptions
Options for encoding operations

Enums§

Codepage
Character encoding specification
DeterminismMode
Mode of determinism checking (decode-only, encode-only, or full round-trip).
FloatFormat
Floating-point binary format for COMP-1/COMP-2 fields.
JsonNumberMode
JSON number representation mode
RawMode
Raw data capture mode
RecordFormat
Record format specification
UnmappablePolicy
Policy for handling unmappable characters during decode
ZonedEncodingFormat
Zoned decimal encoding format specification for round-trip fidelity.

Constants§

JSON_SCHEMA_VERSION
Stable JSONL schema identifier for decoder output.