Class: SwfUtil::PackedBitObj
- Inherits:
-
Object
- Object
- SwfUtil::PackedBitObj
- Defined in:
- lib/swfheader/packed-bit-obj.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) ⇒ PackedBitObj
constructor
A new instance of PackedBitObj.
Constructor Details
#initialize(bitMarker, byteMarker, decimalValue) ⇒ PackedBitObj
Returns a new instance of PackedBitObj.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/swfheader/packed-bit-obj.rb', line 4 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.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def bitIndex @bitIndex end |
#byteIndex ⇒ Object
Returns the value of attribute byteIndex.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def byteIndex @byteIndex end |
#nextBitIndex ⇒ Object
Returns the value of attribute nextBitIndex.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def nextBitIndex @nextBitIndex end |
#nextByteBoundary ⇒ Object
Returns the value of attribute nextByteBoundary.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def nextByteBoundary @nextByteBoundary end |
#nextByteIndex ⇒ Object
Returns the value of attribute nextByteIndex.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def nextByteIndex @nextByteIndex end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/swfheader/packed-bit-obj.rb', line 3 def value @value end |