15 lines
514 B
C++
15 lines
514 B
C++
#pragma once
|
|
#include "Error.h"
|
|
#include "fs/Api.h"
|
|
#include "tl/result.h"
|
|
|
|
namespace fs
|
|
{
|
|
class IStreamSource;
|
|
|
|
typedef tl::result<void, Error> ProcessStreamResult;
|
|
typedef tl::function<void(tl::span<const uint8_t> data)> ProcessDataCallback;
|
|
// This API Reads the provided stream and pipes it through the provided data callback to allow implementation of custom filters/encodings.
|
|
FS_API ProcessStreamResult processStream(IStreamSource& source, const ProcessDataCallback& dataCallback, size_t bufferSize = 0);
|
|
}
|