Grok
7.6.2
src
lib
jp2
codestream
IBitIO.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016-2020 Grok Image Compression Inc.
3
*
4
* This source code is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Affero General Public License, version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This source code is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Affero General Public License for more details.
12
*
13
* You should have received a copy of the GNU Affero General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
#pragma once
17
18
#include <cstdint>
19
20
namespace
grk
{
21
25
class
IBitIO
{
26
27
public
:
28
29
virtual
~IBitIO
() {
30
}
31
36
virtual
size_t
numbytes
()=0;
37
43
virtual
bool
write
(uint32_t v, uint32_t n)= 0;
49
virtual
void
read
(uint32_t *bits, uint32_t n)= 0;
54
virtual
bool
flush
()= 0;
58
virtual
void
inalign
()= 0;
59
60
};
61
62
}
63
grk::IBitIO::inalign
virtual void inalign()=0
Passes the ending bits (coming from flushing)
grk::IBitIO::write
virtual bool write(uint32_t v, uint32_t n)=0
Write bits.
grk::IBitIO::flush
virtual bool flush()=0
Flush bits.
grk
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition:
BitIO.cpp:23
grk::IBitIO::numbytes
virtual size_t numbytes()=0
Number of bytes written.
grk::IBitIO::~IBitIO
virtual ~IBitIO()
Definition:
IBitIO.h:29
grk::IBitIO
Bit input/output.
Definition:
IBitIO.h:25
grk::IBitIO::read
virtual void read(uint32_t *bits, uint32_t n)=0
Read bits.
Generated by
1.8.20