Skip to main content

Module codec

Module codec 

Source
Expand description

High-level record encode/decode workflows.

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
file
Schema-aware file framing integration. Schema-aware file processing integration.
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. Configuration option types owned by the codec runtime.
record
Record-level binary decode/encode logic. Record framing facade.
runtime
Codec-owned runtime support for scratch buffers, streaming, and workers. Codec-owned runtime support for bounded, reusable record processing.
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
ParseCodecOptionError
Error returned when a textual codec option is unsupported.
RecordFailure
A single record that failed during a decode or encode run.
RecordIterator
RunSummary
Summary of a processing run with comprehensive statistics.
SmallDecimal
Small decimal structure for parsing/formatting without floats This avoids floating-point precision issues for financial data
ZonedEncodingInfo
Comprehensive encoding detection result for zoned decimal fields

Enums§

CodecOptionKind
Codec option family whose textual value could not be parsed.
Codepage
Character encoding specification supported by copybook-rs.
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 characters that have no mapping.
ZonedEncodingFormat
Zoned decimal encoding format specification for round-trip fidelity.

Constants§

JSON_SCHEMA_VERSION
Stable JSONL schema identifier for decoder output.
MAX_CAPTURED_FAILURES
How many individual record failures a RunSummary retains.

Functions§

check_decode_determinism
Check that decoding the same binary data twice produces identical JSON output.
check_encode_determinism
Check that encoding the same JSON twice produces identical binary output.
check_round_trip_determinism
Check full round-trip determinism: decode->encode->decode.
decode_file_to_jsonl
Decode a file to JSONL format
decode_record
Decode one fixed-size COBOL record into the public JSON envelope.
decode_record_with_scratch
High-performance decode using reusable scratch buffers
encode_jsonl_to_file
Encode JSONL to binary file
encode_record
Encode JSON data to binary using the provided schema
iter_records
Convenience function to create a record iterator from any readable source
iter_records_from_file
Convenience function to create a record iterator from a file path