The present invention provides method of a variable length coding for data compression. The first coding algorithm is applied to encode the data with the value less than half of the calculated divider and another coding algorithm encoding the subtracted value of the data. Another algorithm applies at least two predetermined “marker bits” to indicate the range of data with concatenated binary code encoding the shifted value of the data. Another algorithm deciding the boundary separating the first range and other ranges of the data and encode the data by applying at least two different algorithms accordingly.