Class: SwfUtil::PackedBitObj

Inherits:
Object
  • Object
show all
Defined in:
lib/swfheader/packed-bit-obj.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bitIndexObject

Returns the value of attribute bitIndex.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def bitIndex
  @bitIndex
end

#byteIndexObject

Returns the value of attribute byteIndex.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def byteIndex
  @byteIndex
end

#nextBitIndexObject

Returns the value of attribute nextBitIndex.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def nextBitIndex
  @nextBitIndex
end

#nextByteBoundaryObject

Returns the value of attribute nextByteBoundary.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def nextByteBoundary
  @nextByteBoundary
end

#nextByteIndexObject

Returns the value of attribute nextByteIndex.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def nextByteIndex
  @nextByteIndex
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/swfheader/packed-bit-obj.rb', line 3

def value
  @value
end