refactored getcompression and getresolution callback and errors