Abstract: The present invention relates to a method for compressing a continuous data flow based on lossy compression. In real-time data compression, a series of data subsets acquired in a given period of time are treated as a regional data cube for the purpose of dividing a continuous series of data subsets into a plurality of data cubes. Reuse of existing codevectors is important in achieving high compression performance. For encoding spectral vectors on a subset-by-subset basis in a current region two types of codevectors are used, codevectors that have been newly trained for previous data subsets in the current region and codevectors trained for the previous region. The problem of a visible spatial boundary between two adjacent regions after decompression is overcome by reusing the codevectors trained from a previous region to encode the spectral vectors in the current region in order to attain a seamless conjunction of the two adjacent regions.