Added initial implementation of spiht encoder.