Class: PEdump::StringFileInfo
Class Method Summary collapse
Class Method Details
.read(f, size = SIZE) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/pedump/version_info.rb', line 75 def self.read f, size = SIZE pos0 = f.tell super.tap do |x| x.szKey.force_encoding('UTF-16LE').encode!('UTF-8').sub!(/\u0000$/,'') rescue nil x.Padding = f.tell%4 > 0 ? f.read(4 - f.tell%4) : nil x.Children = [] while !f.eof? && f.tell < pos0+x.wLength x.Children << StringTable.read(f) end end end |