Variable-length Codes for Data Compression