Class NumericFormatCompressed

java.lang.Object
Direct Known Subclasses:
NumericFormatBinary, NumericFormatBinaryX, NumericFormatDouble, NumericFormatPackedDecimal

public abstract class NumericFormatCompressed extends NumericFormat
Provides a formatter that emulates COBOL's NumericFormatCompressed (COMP-3) functionality in Java. Given a decimal value and specified integer and fractional digit counts, this class:
1) encodes the value into packed decimal (two digits per byte, high-order nibble first)
2) appends a sign nibble ('C','D','F') in the low-order nibble of the last byte
3) decodes packed decimal back into numeric values, respecting sign and scale
4) enforces correct byte length based on digit counts
This implementation delivers a reliable, high-performance Java equivalent of COBOL's compressed numeric format for mission-critical data-conversion workflows.