2011-10-24 12:10:59 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <DB/DataStreams/IBlockInputStream.h>
|
|
|
|
|
#include <DB/DataStreams/IBlockOutputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/** Позволяет создать IBlockInputStream или IBlockOutputStream по названию формата.
|
2011-10-30 05:19:41 +00:00
|
|
|
|
* Замечание: формат и сжатие - независимые вещи.
|
2011-10-24 12:10:59 +00:00
|
|
|
|
*/
|
|
|
|
|
class FormatFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
BlockInputStreamPtr getInput(const String & name, ReadBuffer & buf,
|
2015-07-27 15:51:37 +00:00
|
|
|
|
const Block & sample, size_t max_block_size) const;
|
2015-05-28 03:49:28 +00:00
|
|
|
|
|
2011-10-24 12:10:59 +00:00
|
|
|
|
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
|
2015-07-27 15:51:37 +00:00
|
|
|
|
const Block & sample) const;
|
2011-10-24 12:10:59 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|