A method for data compression, the method comprising: for each pixel of a plurality of pixels, the plurality of pixels being pixels of a tile of an image other than an initial pixel, performing, by an electronic device: calculating errors for components of the each pixel relative to components of a preceding pixel; calculating reversible color transformations of the errors to obtain transformed errors; interleaving absolute values of the transformed errors to generate an interleaved error by interleaving bits of the absolute values of the transformed errors; encoding the interleaved error with variable length coding to generate a first symbol portion and, if the first symbol portion doesn't encode for the entire interleaved error, generating a second symbol portion, each having a fixed length and encoding at least a portion of the interleaved error; if the first and second symbol portions do not encode the entire interleaved error, generating a third portion encoding a least significant portion of the interleaved error; and streaming the first and second symbol portions, any third portion, and signs of any of the errors that are not equal to zero, wherein streaming the first and second symbol portions, any third symbol portion, and signs of any of the errors that are not equal to zero further comprises: streaming the first symbol portions of the plurality of pixels as a first contiguous segment; streaming the second symbol portions of the plurality of pixels as a second contiguous segment; obtaining a third contiguous segment including any third symbol portions; if a length of the third contiguous segment is odd, moving one bit of the third contiguous segment to the second contiguous segment; and streaming the signs of the errors as a fourth contiguous segment.. for each pixel of a plurality of pixels, the plurality of pixels being pixels of a tile of an image other than an initial pixel, performing, by an electronic device: calculating errors for components of the each pixel relative to components of a preceding pixel; calculating reversible color transformations of the errors to obtain transformed errors; interleaving absolute values of the transformed errors to generate an interleaved error by interleaving bits of the absolute values of the transformed errors; encoding the interleaved error with variable length coding to generate a first symbol portion and, if the first symbol portion doesn't encode for the entire interleaved error, generating a second symbol portion, each having a fixed length and encoding at least a portion of the interleaved error; if the first and second symbol portions do not encode the entire interleaved error, generating a third portion encoding a least significant portion of the interleaved error; and streaming the first and second symbol portions, any third portion, and signs of any of the errors that are not equal to zero, calculating errors for components of the each pixel relative to components of a preceding pixel; calculating reversible color transformations of the errors to obtain transformed errors; interleaving absolute values of the transformed errors to generate an interleaved error by interleaving bits of the absolute values of the transformed errors; encoding the interleaved error with variable length coding to generate a first symbol portion and, if the first symbol portion doesn't encode for the entire interleaved error, generating a second symbol portion, each having a fixed length and encoding at least a portion of the interleaved error; if the first and second symbol portions do not encode the entire interleaved error, generating a third portion encoding a least significant portion of the interleaved error; and streaming the first and second symbol portions, any third portion, and signs of any of the errors that are not equal to zero, wherein streaming the first and second symbol portions, any third symbol portion, and signs of any of the errors that are not equal to zero further comprises: streaming the first symbol portions of the plurality of pixels as a first contiguous segment; streaming the second symbol portions of the plurality of pixels as a second contiguous segment; obtaining a third contiguous segment including any third symbol portions; if a length of the third contiguous segment is odd, moving one bit of the third contiguous segment to the second contiguous segment; and streaming the signs of the errors as a fourth contiguous segment.. streaming the first symbol portions of the plurality of pixels as a first contiguous segment; streaming the second symbol portions of the plurality of pixels as a second contiguous segment; obtaining a third contiguous segment including any third symbol portions; if a length of the third contiguous segment is odd, moving one bit of the third contiguous segment to the second contiguous segment; and streaming the signs of the errors as a fourth contiguous segment..