Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
flatemodule.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FXCODEC_FLATE_FLATEMODULE_H_
8#define CORE_FXCODEC_FLATE_FLATEMODULE_H_
9
10#include <stdint.h>
11
12#include <memory>
13
14#include "core/fxcrt/data_vector.h"
15#include "core/fxcrt/fx_memory_wrappers.h"
16#include "third_party/base/containers/span.h"
17
18namespace fxcodec {
19
20class ScanlineDecoder;
21
23 public:
25 pdfium::span<const uint8_t> src_span,
26 int width,
27 int height,
28 int nComps,
29 int bpc,
30 int predictor,
31 int Colors,
32 int BitsPerComponent,
33 int Columns);
34
35 static uint32_t FlateOrLZWDecode(
36 bool bLZW,
37 pdfium::span<const uint8_t> src_span,
38 bool bEarlyChange,
39 int predictor,
40 int Colors,
41 int BitsPerComponent,
42 int Columns,
43 uint32_t estimated_size,
44 std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
45 uint32_t* dest_size);
46
47 static DataVector<uint8_t> Encode(pdfium::span<const uint8_t> src_span);
48
49 FlateModule() = delete;
50 FlateModule(const FlateModule&) = delete;
51 FlateModule& operator=(const FlateModule&) = delete;
52};
53
54} // namespace fxcodec
55
56using FlateModule = fxcodec::FlateModule;
57
58#endif // CORE_FXCODEC_FLATE_FLATEMODULE_H_
int GetIntegerFor(const ByteString &key) const
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
bool WriteDictTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const
pdfium::span< const uint8_t > GetSpan() const
CPDF_FlateEncoder(RetainPtr< const CPDF_Stream > pStream, bool bFlateEncode)
void UpdateLength(size_t size)
static DataVector< uint8_t > Encode(pdfium::span< const uint8_t > src_span)
static std::unique_ptr< ScanlineDecoder > CreateDecoder(pdfium::span< const uint8_t > src_span, int width, int height, int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns)
static uint32_t FlateOrLZWDecode(bool bLZW, pdfium::span< const uint8_t > src_span, bool bEarlyChange, int predictor, int Colors, int BitsPerComponent, int Columns, uint32_t estimated_size, std::unique_ptr< uint8_t, FxFreeDeleter > *dest_buf, uint32_t *dest_size)
FlateModule & operator=(const FlateModule &)=delete
FlateModule(const FlateModule &)=delete