Sha256: 951e68a9c3d73d7806850d8bb8973e2420678734f1995ffd46bc869371fd4336

Contents?: true

Size: 479 Bytes

Versions: 9

Compression:

Stored size: 479 Bytes

Contents

class I2pStringData  < BinData::BasePrimitive
  
  def read_and_return_value(io)
    country_long = eval_parameter(:country_long)
    io.seekbytes(-4) if country_long
    file = io.instance_variable_get('@raw_io')
    addr = BinData::Uint32le.read(io)
    old_offset = file.tell
    country_long ? file.seek(addr + 3) : file.seek(addr)
    length = BinData::Uint8.read(file)
    res = BinData::String.new(:length => length).read(file)
    file.seek(old_offset)
    res
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ip2proxy_ruby-3.3.1 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-3.3.0 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-3.2.1 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-3.2.0 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-3.1.0 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-1.0.3 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-1.0.2 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-1.0.1 lib/ip2proxy_ruby/i2p_string_data.rb
ip2proxy_ruby-1.0.0 lib/ip2proxy_ruby/i2p_string_data.rb