**How to reproduce**
Clickhouse Server 20.13
```
SELECT *
FROM url('https://storage.yandexcloud.net/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32')
LIMIT 2

Query id: 31d85b1f-cc2a-41c4-978d-1fb09840d7b7

┌─column1─┬─column2─┬─column3─┐
│       1 │       2 │       3 │
│       3 │       2 │       1 │
└─────────┴─────────┴─────────┘

SELECT *
FROM url('https://storage.yandexcloud.net/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32', auto)
LIMIT 2

Query id: 34742713-7a41-49ba-a2dd-713e6ddbbc00

┌─column1─┬─column2─┬─column3─┐
│       1 │       2 │       3 │
│       3 │       2 │       1 │
└─────────┴─────────┴─────────┘

SELECT *
FROM s3('https://storage.yandexcloud.net/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32', auto)
LIMIT 2

Query id: 6d3975a2-07d6-48fc-8c22-5293eb42c380


Received exception from server (version 20.13.1):
Code: 27. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse input: expected ',' before: '�\b\bpg�_\0data.csv\03�1�1�2��\\f:@�e��\\\0�V>�\0\0\0'{}:
Row 1:
Column 0,   name: column1, type: UInt32, ERROR: text "<0x1F>�<BACKSPACE><BACKSPACE>pg�_<ASCII NUL><0x03>" is not like UInt32

: While executing S3.


SELECT *
FROM s3('https://storage.yandexcloud.net/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32')
LIMIT 2

Query id: 5fbb23a1-9893-4b1a-a4b0-ffa36225e8bb


Received exception from server (version 20.13.1):
Code: 27. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse input: expected ',' before: '�\b\bpg�_\0data.csv\03�1�1�2��\\f:@�e��\\\0�V>�\0\0\0'{}:
Row 1:
Column 0,   name: column1, type: UInt32, ERROR: text "<0x1F>�<BACKSPACE><BACKSPACE>pg�_<ASCII NUL><0x03>" is not like UInt32

: While executing S3.


SELECT *
FROM s3('https://storage.yandexcloud.net/my-test-bucket-768/data.csv.gz', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32', gz)
LIMIT 2

Query id: 7ce193ce-fd55-4369-be85-d59c83b0dfa8

┌─column1─┬─column2─┬─column3─┐
│       1 │       2 │       3 │
│       3 │       2 │       1 │
└─────────┴─────────┴─────────┘

```

**Expected behavior**
s3 table function would recognize compression from file extension.

**Additional context**
https://github.com/ClickHouse/ClickHouse/pull/7840#issuecomment-570837458

}
    private:
        String name;
        std::unique_ptr<ReadBuffer> read_buf;
        BlockInputStreamPtr reader;
        bool initialized = false;
        bool with_file_column = false;
        bool with_path_column = false;
        String file_path;
    };
    class StorageS3BlockOutputStream : public IBlockOutputStream
    {
    public:
        StorageS3BlockOutputStream(
            const String & format,
            const Block & sample_block_,
            const Context & context,
            const CompressionMethod compression_method,
            const std::shared_ptr<Aws::S3::S3Client> & client,
            const String & bucket,
            const String & key,
            size_t min_upload_part_size,
            size_t max_single_part_upload_size)
            : sample_block(sample_block_)
        {
            write_buf = wrapWriteBufferWithCompressionMethod(
                std::make_unique<WriteBufferFromS3>(client, bucket, key, min_upload_part_size, max_single_part_upload_size), compression_method, 3);
            writer = FormatFactory::instance().getOutputStream(format, *write_buf, sample_block, context);
        }
        Block getHeader() const override