Patent ID: 7133832

Claim:
A lossless encoding and/or decoding system for converting input data in real time, comprising: an input buffer to store an input one of audio data and encoded audio data, a lossless conversion unit to losslessly convert the stored input one data stored in the input buffer in units of predetermined data and to output converted data in sequence, the converted data being the other one of the audio data and the encoded audio data, an output buffer to store the converted data output from the lossless conversion unit, and to output the other one of the audio data and the encoded audio data, and a bitrate controller to control the encoded data stored in one of the input and output buffers, so as to: distinguish each predetermined data unit of the converted data stored in the one of the input and output buffers as first data having a data amount exceeding a maximum bitrate or second data having a data amount less than the maximum bitrate, categorize the first data as third data being the encoded audio data having a data amount of the maximum bitrate and fourth data being the encoded audio data of a portion of the first data exceeding the maximum bitrate, use identification information corresponding to the third data and fourth data to indicate which of the third data and fourth data are from the same predetermined data units, and control the one of the first and second buffers so that, in order to output a bitstream of the encoded data at or below the maximum bit rate, the fourth data is output together with the second data from the one of the input and output buffers and the second through fourth data are output as the bitstream, or, in order to output the bitstream at above the maximum bit rate to be supplied to the lossless converter, the second data is supplied to the lossless converter and the third data and fourth data having the same identification information are combined and supplied to the lossless converter.