Don't use raw numbers for Entry compression types.

Constants for Store and Deflate are already available, so use them. It
might be sensible to remove these local versions, but they do have their
uses as a shortened form.
This commit is contained in:
Robert Haines 2020-06-20 16:03:46 +01:00
parent 156b0f3dee
commit 0620fba13d
1 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,9 @@
require 'pathname' require 'pathname'
module Zip module Zip
class Entry class Entry
STORED = 0 STORED = ::Zip::COMPRESSION_METHOD_STORE
DEFLATED = 8 DEFLATED = ::Zip::COMPRESSION_METHOD_DEFLATE
# Language encoding flag (EFS) bit # Language encoding flag (EFS) bit
EFS = 0b100000000000 EFS = 0b100000000000