Sha256: dad95a7116b05d3bb18f6ba37cb48213681a0945e3212657a504daf4965f0a64
Contents?: true
Size: 740 Bytes
Versions: 2
Compression:
Stored size: 740 Bytes
Contents
module DBF module Memo class Foxpro < Base FPT_HEADER_SIZE = 512 def build_memo(start_block) # :nodoc: @data.seek offset(start_block) memo_type, memo_size, memo_string = @data.read(block_size).unpack('NNa*') return nil unless memo_type == 1 && memo_size > 0 if memo_size > block_content_size memo_string << @data.read(content_size(memo_size)) else memo_string = memo_string[0, memo_size] end memo_string rescue nil end private def block_size # :nodoc: @block_size ||= begin @data.rewind @data.read(FPT_HEADER_SIZE).unpack('x6n').first || 0 end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dbf-3.1.3 | lib/dbf/memo/foxpro.rb |
dbf-3.1.2 | lib/dbf/memo/foxpro.rb |