Flat code has a simple structure which makes fast decoding, but the compression efficiency is poor. A minimum-redundancy code, on the other hand, is slower to decode then a flat code, but the compressed file size is minimized. This paper discusses the algorithm for constructing the hybrid code which exhibits the simple structure of a flat code and retains much of the compression effectiveness of a minimum-redundancy code.