Class: Swiff::PackedBits
- Inherits:
-
Object
- Object
- Swiff::PackedBits
- Defined in:
- lib/swiff/packed_bits.rb
Instance Attribute Summary collapse
-
#bitIndex ⇒ Object
Returns the value of attribute bitIndex.
-
#byteIndex ⇒ Object
Returns the value of attribute byteIndex.
-
#nextBitIndex ⇒ Object
Returns the value of attribute nextBitIndex.
-
#nextByteBoundary ⇒ Object
Returns the value of attribute nextByteBoundary.
-
#nextByteIndex ⇒ Object
Returns the value of attribute nextByteIndex.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(bitMarker, byteMarker, decimalValue) ⇒ PackedBits
constructor
A new instance of PackedBits.
Constructor Details
#initialize(bitMarker, byteMarker, decimalValue) ⇒ PackedBits
Returns a new instance of PackedBits.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/swiff/packed_bits.rb', line 6 def initialize(bitMarker,byteMarker,decimalValue) @bitIndex = bitMarker; @byteIndex = byteMarker; @value = decimalValue; @nextBitIndex = bitMarker; if ( bitMarker <= 7 ) @nextBitIndex+=1 @nextByteIndex =byteMarker @nextByteBoundary = (byteMarker+=1) else @nextBitIndex = 0 @nextByteIndex+=1 @nextByteBoundary = @nextByteIndex; end end |
Instance Attribute Details
#bitIndex ⇒ Object
Returns the value of attribute bitIndex.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def bitIndex @bitIndex end |
#byteIndex ⇒ Object
Returns the value of attribute byteIndex.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def byteIndex @byteIndex end |
#nextBitIndex ⇒ Object
Returns the value of attribute nextBitIndex.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def nextBitIndex @nextBitIndex end |
#nextByteBoundary ⇒ Object
Returns the value of attribute nextByteBoundary.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def nextByteBoundary @nextByteBoundary end |
#nextByteIndex ⇒ Object
Returns the value of attribute nextByteIndex.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def nextByteIndex @nextByteIndex end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/swiff/packed_bits.rb', line 4 def value @value end |