Skip to content

Commit e84a313

Browse files
committed
Add marks/sections to Lsb/MsbBitReader
1 parent c17eca8 commit e84a313

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Sources/LsbBitReader.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public final class LsbBitReader: BitReader {
7171
self.currentByte = byteReader.isFinished ? 0 : byteReader.data[byteReader.offset]
7272
}
7373

74+
// MARK: Bit reading methods
75+
7476
/**
7577
Advances a bit pointer by the specified amount of bits (the default value is 1).
7678

@@ -294,6 +296,8 @@ public final class LsbBitReader: BitReader {
294296
}
295297
}
296298

299+
// MARK: Byte reading methods
300+
297301
/**
298302
Reads a byte and returns it, advancing by one byte position.
299303

Sources/MsbBitReader.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public final class MsbBitReader: BitReader {
7171
self.currentByte = byteReader.isFinished ? 0 : byteReader.data[byteReader.offset]
7272
}
7373

74+
// MARK: Bit reading methods
75+
7476
/**
7577
Advances a bit pointer by the specified amount of bits (the default value is 1).
7678

@@ -211,7 +213,7 @@ public final class MsbBitReader: BitReader {
211213
- Precondition: Parameter `fromBits` must be in the `0...16` range.
212214
- Precondition: There must be enough data left.
213215
*/
214-
public func uint16(fromBits count: Int) -> UInt16 {
216+
public func uint16(fromBits count: Int) -> UInt16 {
215217
precondition(0...16 ~= count)
216218
precondition(bitsLeft >= count)
217219

@@ -297,6 +299,8 @@ public func uint16(fromBits count: Int) -> UInt16 {
297299
}
298300
}
299301

302+
// MARK: Byte reading methods
303+
300304
/**
301305
Reads a byte and returns it, advancing by one byte position.
302306

0 commit comments

Comments
 (0)