Entropy encoder for low-power low-resources high-quality CFA image compression