7#ifndef CORE_FXCRT_CFX_READ_ONLY_SPAN_STREAM_H_
8#define CORE_FXCRT_CFX_READ_ONLY_SPAN_STREAM_H_
10#include "core/fxcrt/fx_stream.h"
11#include "core/fxcrt/retain_ptr.h"
12#include "third_party/base/containers/span.h"
24 explicit CFX_ReadOnlySpanStream(pdfium::span<
const uint8_t> span);
27 const pdfium::span<
const uint8_t> span_;
static std::unique_ptr< CFDF_Document > CreateNewDoc()
const CPDF_Dictionary * GetRoot() const
static std::unique_ptr< CFDF_Document > ParseMemory(pdfium::span< const uint8_t > span)
RetainPtr< CPDF_Dictionary > GetMutableRoot() const
~CFDF_Document() override
ByteString WriteToString() const
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
FX_FILESIZE GetSize() override
~CFX_ReadOnlySpanStream() override
bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum, RetainPtr< CPDF_Object > pObj)
static constexpr int kFileBufSize
RetainPtr< CPDF_Object > GetIndirectObject(CPDF_IndirectObjectHolder *pObjList, ParseType parse_type)
static std::unique_ptr< CPDF_SyntaxParser > CreateForTesting(RetainPtr< IFX_SeekableReadStream > pFileAccess, FX_FILESIZE HeaderOffset)
bool BackwardsSearchToWord(ByteStringView word, FX_FILESIZE limit)
RetainPtr< CPDF_ReadValidator > GetValidator() const
ByteString PeekNextWord()
void RecordingToNextWord()
CPDF_SyntaxParser(RetainPtr< IFX_SeekableReadStream > pFileAccess)
void SetReadBufferSize(uint32_t read_buffer_size)
FX_FILESIZE FindTag(ByteStringView tag)
FX_FILESIZE GetPos() const
ByteString ReadHexString()
FX_FILESIZE GetDocumentSize() const
CPDF_SyntaxParser(RetainPtr< CPDF_ReadValidator > pValidator, FX_FILESIZE HeaderOffset)
bool GetNextChar(uint8_t &ch)
bool ReadBlock(pdfium::span< uint8_t > buffer)
void SetPos(FX_FILESIZE pos)
RetainPtr< CPDF_Object > GetObjectBody(CPDF_IndirectObjectHolder *pObjList)
void SetTrailerEnds(std::vector< unsigned int > *trailer_ends)
bool GetCharAt(FX_FILESIZE pos, uint8_t &ch)
#define CONSTRUCT_VIA_MAKE_RETAIN