Support pre-compressed files

Closes #1126