Implement `quickEncode` and test