a system for variable - length - coding and variable - length - decoding digital data divided into a block unit of a predetermined size which includes variable - length - coding each block data according to various scanning patterns , accumulating the various lengths of variable - length - coded data , selecting a scanning pattern corresponding to a minimum accumulated length , transmitting the variable - length - coded data according to the selected scanning pattern and scanning the transmitted data according to the same scanning pattern as applied to variable - length - coding process , thereby the scanned data being variable - length - decoded . as a result , data compression can be improved efficiently by means of utilizing an optimized scanning pattern for variable - length - coding and variable - length - decoding of the block data .