In a data compression apparatus for compensating a deviation of a compression rate of an input stream of characters (ISC's), a candidate string matching (CSM) circuit, based on codewords (CD's) in a CD dictionary, performs a CSM on the ISC's to provide a first maximum length candidate string (MLCS) and a second MLCS immediately following the first MLCS. A candidate string (CS) storing circuit, based on the CD dictionary, the first MLCS and the second MLCS, generates derived CS pairs (DCSP's) to thereby store a DCSP table listing the DCSP's. A compression rate deviation (CRD) evaluation circuit evaluates a CRD between the first MLCS and the second MLCS, thereby providing the first MLCS and the second MLCS as a first string and a second string, respectively, if a first predetermined CRD evaluation criterion (PCRDEC) is satisfied; and supplying a reduction string matching (RSM) command signal if otherwise. An RSM circuit, in response to the RSM command signal, performs an RSM based on the DCSP table to select a DCSP as a selected DCSP having a first string and a second string, wherein a CRD between the first string and the second string satisfies a second PCRDEC. An encoder encodes first and second CD's corresponding to the first and second string's to thereby generate encoded first and second CD's, respectively.
Methods and systems for on-chip processing of data are disclosed. Aspects of the method may include generating a plurality of data processing commands for data compression. A first string of characters may be encoded in one operating cycle utilizing the generated plurality of data processing commands for data compression. The plurality of data processing commands may comprise a branch command, a register moving command, a register setting command, a memory load command, a memory store command, and/or a register compare command. The generated plurality of data processing commands may be stored. At least a portion of the stored data processing commands may be decoded. The decoded portion of the stored data processing commands may be sequenced. The first string of characters may be acquired from a character space. The acquired first string of characters may be matched with at least one existing codeword.