5#include "core/fxcrt/cfx_read_only_vector_stream.h"
9#include "core/fxcrt/cfx_read_only_span_stream.h"
10#include "third_party/base/containers/span.h"
12CFX_ReadOnlyVectorStream::CFX_ReadOnlyVectorStream(DataVector<uint8_t> data)
13 : data_(std::move(data)),
14 stream_(pdfium::MakeRetain<CFX_ReadOnlySpanStream>(data_)) {}
16CFX_ReadOnlyVectorStream::CFX_ReadOnlyVectorStream(
18 : fixed_data_(std::move(data)),
19 stream_(pdfium::MakeRetain<CFX_ReadOnlySpanStream>(fixed_data_)) {}
24 return stream_->GetSize();
29 return stream_->ReadBlockAtOffset(buffer, offset);
FX_FILESIZE GetSize() override
~CFX_ReadOnlyVectorStream() override
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override