Files
FS/include/fs/ProcessStream.h
T
jeanlemotan b344afa9fe First
2024-07-02 18:12:23 +02:00

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);
}