ChunkedStream.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * ChunkedStream.h
8  *
9  * @author Slavey Karadzhov <slaff@attachix.com>
10  *
11  ****/
12 
13 #pragma once
14 
15 #include <Data/StreamTransformer.h>
16 
25 {
26 public:
27  ChunkedStream(IDataSourceStream* stream, size_t resultSize = 512);
28 
29 protected:
30  size_t transform(const uint8_t* source, size_t sourceLength, uint8_t* target, size_t targetLength) override;
31 };
Read-only stream to obtain data using HTTP chunked encoding.
Definition: ChunkedStream.h:24
Base class for read-only stream.
Definition: DataSourceStream.h:45
size_t transform(const uint8_t *source, size_t sourceLength, uint8_t *target, size_t targetLength) override
Inherited class implements this method to transform a block of data.
ChunkedStream(IDataSourceStream *stream, size_t resultSize=512)
Class that can be used to transform streams of data on the fly.
Definition: StreamTransformer.h:21