| 441 | }; |
| 442 | |
| 443 | CompressionCodecPtr makeCodec(const std::string & codec_string, const DataTypePtr data_type) |
| 444 | { |
| 445 | const std::string codec_statement = "(" + codec_string + ")"; |
| 446 | Tokens tokens(codec_statement.begin().base(), codec_statement.end().base()); |
| 447 | IParser::Pos token_iterator(tokens, 0, 0); |
| 448 | |
| 449 | Expected expected; |
| 450 | ASTPtr codec_ast; |
| 451 | ParserCodec parser; |
| 452 | |
| 453 | parser.parse(token_iterator, codec_ast, expected); |
| 454 | |
| 455 | return CompressionCodecFactory::instance().get(codec_ast, data_type); |
| 456 | } |
| 457 | |
| 458 | template <typename Timer> |
| 459 | void testTranscoding(Timer & timer, ICompressionCodec & codec, const CodecTestSequence & test_sequence, |