yEnc 0.0.26 → 0.0.27
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/lib/y_enc.rb +9 -2
- metadata +1 -1
data/lib/y_enc.rb
CHANGED
@@ -20,6 +20,7 @@ class YEnc
|
|
20
20
|
next
|
21
21
|
end
|
22
22
|
if line.include?("=yend")
|
23
|
+
breakdown_endline line
|
23
24
|
begin_read=false
|
24
25
|
break #stop looking through the file we are done
|
25
26
|
end
|
@@ -60,7 +61,10 @@ class YEnc
|
|
60
61
|
|
61
62
|
#Does this pass the crc32 check
|
62
63
|
def pass_crc32?
|
63
|
-
|
64
|
+
f = nil
|
65
|
+
File.open(@outputpath + @filename, "rb") { |h| f = h.read }
|
66
|
+
crc32 = Zlib.crc32(f,0).to_s(16)
|
67
|
+
crc32.eql?(@crc32.downcase.strip)
|
64
68
|
end
|
65
69
|
|
66
70
|
private
|
@@ -80,4 +84,7 @@ class YEnc
|
|
80
84
|
@new_file = File.new(@outputpath + @filename, "wb")
|
81
85
|
end
|
82
86
|
|
83
|
-
end
|
87
|
+
end
|
88
|
+
|
89
|
+
#y = YEnc.new("/Users/scontapay/yenc.txt", "/Users/scontapay/")
|
90
|
+
#y.decode
|