Image and Video Compression using Generative Sparse Representation with Fidelity Controls