FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JSON-java/zip/BitWriter.java at master · aspros18/JSON-java · GitHub
aspros18
/
JSON-java
Public
forked from
stleary/JSON-java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JSON-java
/
zip
/
BitWriter.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (45 loc) · 1.3 KB
Breadcrumbs
JSON-java
/
zip
/
BitWriter.java
Copy path
File metadata and controls
51 lines (45 loc) · 1.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package
org
.
json
.
zip
;
import
java
.
io
.
IOException
;
/**
* A bitwriter is a an interface that allows for doing output at the bit level.
* Most IO interfaces only allow for writing at the byte level or higher.
*/
public
interface
BitWriter
{
/**
* Returns the number of bits that have been written to this bitwriter.
*/
public
long
nrBits
();
/**
* Write a 1 bit.
*
* @throws IOException
*/
public
void
one
()
throws
IOException
;
/**
* Pad the rest of the block with zeros and flush.
*
* @param factor
* The size in bits of the block to pad. This will typically be
* 8, 16, 32, 64, 128, 256, etc.
* @return true if the block was zero padded, or false if the the padding
* contains any one bits.
* @throws IOException
*/
public
void
pad
(
int
factor
)
throws
IOException
;
/**
* Write some bits. Up to 32 bits can be written at a time.
*
* @param bits
* The bits to be written.
* @param width
* The number of bits to write. (0..32)
* @throws IOException
*/
public
void
write
(
int
bits
,
int
width
)
throws
IOException
;
/**
* Write a 0 bit.
*
* @throws IOException
*/
public
void
zero
()
throws
IOException
;
}
Back
|
FazBrowse Home
|
New Git URL