Collin Smith
cafe8679b4
Added support for marking read position for debugging
2020-08-12 17:22:55 -07:00
Collin Smith
d70668d11d
Added InvalidFormat
...
Added deprecated constructor for InvalidFormat with a null ByteInput for temp back compat
2020-08-12 15:05:10 -07:00
Collin Smith
088cde3b9e
Ranamed SafeUnsigned to UnsafeNarrowing
2020-08-11 17:56:40 -07:00
Collin Smith
d8679e34e1
Committing BitUtils and SafeUnsigned
2020-08-11 01:07:35 -07:00
Collin Smith
e3fc03f240
Adjusted documentation and added ByteInput#readString(int,boolean)
2020-08-11 01:03:05 -07:00
Collin Smith
efce34ef8a
Renamed len to maxLen
2020-08-11 00:55:04 -07:00
Collin Smith
8b31ee02a1
Bugfix
2020-08-11 00:28:59 -07:00
Collin Smith
e7ab37c01c
Added methods to safely read unsigned values in their java signed limits
2020-08-11 00:24:53 -07:00
Collin Smith
871cadaa2b
Moved BitConstraints#isUnsigned to BitUtils
2020-08-10 21:22:26 -07:00
Collin Smith
90564f39a3
Committing JUnit tests for BitOutput and interoperability
2020-08-10 18:43:01 -07:00
Collin Smith
9b0a3cf498
Filled remaining methods and changed write methods to support chaining
2020-08-10 18:35:45 -07:00
Collin Smith
8941ceee6e
Implemented BitOutput#skipBits(long) and ByteOutput#skipBytes(int)
2020-08-10 18:34:54 -07:00
Collin Smith
984a0864ea
Implemented writeString(CharSequence,int)
2020-08-10 18:34:12 -07:00
Collin Smith
2433fac1fe
Implemented writeBoolean(boolean) and write1(int) methods to write a single bit
2020-08-10 18:33:40 -07:00
Collin Smith
4a00f0207f
Relaxed requirements to allow writing 0 bits (a no-op)
2020-08-10 18:32:57 -07:00
Collin Smith
043e032ec5
Added getter for ByteInput ByteBuf for testing
2020-08-10 18:32:13 -07:00
Collin Smith
43b2eda1c6
Added method chaining support
2020-08-10 17:35:22 -07:00
Collin Smith
74d980319a
Cleaned up flush and align methods
...
flush write cache and then erases it
align performs a flush and returns ByteOutput view
Reduced visibility of writeSigned and writeUnsigned
Implemented write signed methods
Implemented writeRaw method
Added getters for bitsCached and cache fields with package visibility
2020-08-10 01:49:36 -07:00
Collin Smith
66840f94d7
Refactored _writeUnsigned with _writeRaw with unsigned bit limits
2020-08-09 23:11:48 -07:00
Collin Smith
f901989e14
Implemented _writeRaw(long,int)
2020-08-09 23:05:38 -07:00
Collin Smith
11555397e3
Created ByteOutput and BitOutput
2020-08-09 20:06:06 -07:00
Collin Smith
4e2cd665cd
Made bitsToAdd final
2020-08-09 20:05:44 -07:00
Collin Smith
f62c038ffe
Added BYTE_MASK const (0xFF)
2020-08-09 20:05:31 -07:00
Collin Smith
97ebbb1dbb
Additional assertion to validate invariants
2020-08-09 12:51:02 -07:00
Collin Smith
1b51043d7d
Moved UBITS consts to BitConstants
2020-08-09 12:48:33 -07:00
Collin Smith
a9d33c2de8
Pulled unsigned masks out to BitConstants class
2020-08-08 23:06:36 -07:00
Collin Smith
c2ce0a3179
Added string reason for shift assertion failure
2020-08-08 17:53:50 -07:00
Collin Smith
7ed92b1f49
Replaced com.riiablo.io classes with com.riiablo.io.nio classes
2020-08-08 14:49:23 -07:00
Collin Smith
c8b74fccbf
Commented out comments -- linter was thinking this class was deprecated
2020-08-08 14:46:32 -07:00
Collin Smith
acdbace5ea
Deprecated and removed multi-byte read methods from BitInput
...
Unaligned multi-byte read operations shouldn't align stream
Implementing unaligned multi-byte read support is required
2020-08-08 14:40:11 -07:00
Collin Smith
7006ce9dc0
Added ByteBuf read-only invariant
2020-08-08 14:29:33 -07:00
Collin Smith
683d592c55
Created placeholder documentation to document relationship between input classes
2020-08-08 14:26:25 -07:00
Collin Smith
83ead2a990
Reduced #bitInput() method visibility -- unalign should be used instead outside of package
2020-08-08 14:24:47 -07:00
Collin Smith
f7a38d5e15
Documented ByteInput#bitInput(BitInput) invariants
2020-08-08 14:18:33 -07:00
Collin Smith
75ac29d698
Created bitInput() accessor to manage BitInput initialization and access
2020-08-08 14:15:51 -07:00
Collin Smith
20ae623fe7
Tightened up field visibility
...
Tightened up field visibility
ByteInput#bitInput set via bitInput(BitInput) which enforces invariants
2020-08-08 14:08:26 -07:00
Collin Smith
afd7bafa12
Fixed skipBits multi-byte using unaligned bit stream
2020-08-08 13:17:59 -07:00
Collin Smith
e62d3ec383
ByteInput#skipBytes now increments bitsRead
2020-08-08 12:04:51 -07:00
Collin Smith
99f0c11064
Created static factory method for constructing a BitInput from a byte array
2020-08-08 11:50:59 -07:00
Collin Smith
a244fbd09d
Changed access to private
2020-08-08 11:48:01 -07:00
Collin Smith
f5ababed84
Renamed discard methods to skip
2020-08-08 11:45:37 -07:00
Collin Smith
f71d32bc51
Removed interfaces and added documentation to BitInput and ByteInput directly
2020-08-08 11:44:26 -07:00
Collin Smith
3e31869417
Fixed NPE caused by lazily initializing BitInput
2020-08-08 10:51:50 -07:00
Collin Smith
1868a8c089
Renamed discard methods to more explicit ByteInput#discardBytes and BitInput#discardBits
2020-08-08 03:49:36 -07:00
Collin Smith
3e6e2c05ce
Changed ByteInput to lazily allocate BitInput object
...
BitInput not always required, mostly only ByteInput is used
Removed specialized BitInput constructors from ByteInput
ByteInput#unalign will allocate a BitInput of readableBytes size
BitInput#readSlice will allocate a BitInput of specified size
2020-08-08 03:47:36 -07:00
Collin Smith
673b437c61
Committing com.riiablo.io.nio experiment
...
Replaces com.riiablo.io if I decide to go this route
2020-08-08 01:07:28 -07:00
Collin Smith
dd1444ad9a
Created com.riiablo.io with BitInput
...
Version 1 without full functionality
2020-08-07 12:17:54 -07:00
Collin Smith
cfb2850d92
Created more robust BitStream implementation
...
Pending validation, will deprecate and replace com.riiablo.codec.util.BitStream
2020-08-05 19:57:54 -07:00
Collin Smith
84748c56a3
Implemented skipUntil function to allow recovery attempts
...
skipUntil will align the bit stream to next byte and search for a 2 byte signature
2020-08-03 20:21:46 -07:00
Collin Smith
294f74dde3
Added warnf without Throwable arg
2020-08-03 20:17:28 -07:00