Fast Codes for Large Alphabet Sources and Its Application to Block Encoding