hflr 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/hflr.gemspec +1 -1
- data/lib/hflr/fl_record_file.rb +8 -8
- metadata +1 -1
data/hflr.gemspec
CHANGED
data/lib/hflr/fl_record_file.rb
CHANGED
@@ -31,12 +31,12 @@ class FLRFile
|
|
31
31
|
end
|
32
32
|
if @fast
|
33
33
|
@width = get_record_width_from_file
|
34
|
-
|
34
|
+
|
35
35
|
|
36
36
|
records_to_take = 100000000 / @width
|
37
37
|
|
38
38
|
@buffer_size = @width * records_to_take
|
39
|
-
|
39
|
+
|
40
40
|
|
41
41
|
@position=0
|
42
42
|
@current_buffer=nil
|
@@ -102,25 +102,25 @@ def fast_get_next_known_line_type
|
|
102
102
|
unless @current_buffer.nil? && (@offsets.nil? || @offsets.empty?)
|
103
103
|
if @current_buffer.nil?
|
104
104
|
chunk = @offsets.shift
|
105
|
-
|
105
|
+
|
106
106
|
|
107
107
|
@file.pos = chunk.pos
|
108
108
|
@current_buffer=@file.read(chunk.width)
|
109
|
-
|
109
|
+
|
110
110
|
record= @current_buffer.slice(@position,@width)
|
111
|
-
|
111
|
+
|
112
112
|
|
113
113
|
@position += @width
|
114
|
-
|
114
|
+
|
115
115
|
if @position >= @current_buffer.size
|
116
|
-
|
116
|
+
|
117
117
|
@current_buffer = nil
|
118
118
|
@position=0
|
119
119
|
end
|
120
120
|
return record
|
121
121
|
else
|
122
122
|
record= @current_buffer.slice(@position,@width)
|
123
|
-
|
123
|
+
|
124
124
|
@position += @width
|
125
125
|
if @position>=@current_buffer.size
|
126
126
|
@position=0
|