Lossless file size optimizations