Skip to content

Commit 587dd47

Browse files
committed
copyedit
1 parent cb453d9 commit 587dd47

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ of terms of different frequencies all small.
9696
- What's currently there is just a null encoder that takes docIDs as int's and
9797
writes bytes.
9898

99-
### Some reminders/teachings
99+
### Some reminders/teachings on bytes and bitwise operations
100100

101-
You may not have every seen or used much stuff to do byte or bit level
102-
processing in Java. So here are a few pointers:
101+
You may not have ever seen or used much operations in Java for byte or bit level
102+
processing. So here are a few pointers.
103103

104104
Java supports hexadecimal and binary constants: `0xFC` or `0b1100`.
105105

@@ -119,7 +119,7 @@ will treat a `byte` as unsigned, e.g. `Byte.toUnsignedInt(byte)`.
119119
Java has bit manipulation operators basically like C, which operate on
120120
the primitive types. That is, you have &, |, ^, and ~ for bitwise and,
121121
or, xor, and binary ones complement. There are also bit shift operators: <<, >>,
122-
and >>> for left shift, right shift, and a zero filling right shift
122+
and >>> for left shift, right shift, and a zero-filling right shift
123123
respectively. The & operator is especially
124124
useful for masking (selecting out part of a byte or int and the |
125125
operator is especially useful for combining two numbers that each
@@ -129,12 +129,12 @@ place bytes in the right place in a number. Something like:
129129

130130
There are also a few other classes that are highly useful:
131131

132-
* The `BitSet` class efficiently stores an arbitrarily size array of
132+
* The `BitSet` class efficiently stores an arbitrary-size array of
133133
bits. It's very convenient for working with bits and you can then
134134
output what you build as a native Java array.
135135
* A `byte[]` is the basic structure for having an array of bytes that
136136
you work with by yourself.
137-
* A `ByteArrayOutputStream` will allow you to write date using I/O
137+
* A `ByteArrayOutputStream` will allow you to write data using I/O
138138
methods that is written to a growable byte array. You can get that
139139
array at the end of writing with the `toByteArray()` method.
140140
* The reverse is a `ByteArrayInputStream`, which you initialize with a

0 commit comments

Comments
 (0)