Sha256: 09e831da57e78084c4fb3b7a657442979e4b379625a26175b6771e51ca7a3641
Contents?: true
Size: 841 Bytes
Versions: 15
Compression:
Stored size: 841 Bytes
Contents
module Fontist module Import module Extractors class CabExtractor < Extractor def extract dir = Dir.mktmpdir extract_exe(@archive, dir) dir end def format File.extname(@archive) == ".exe" ? "exe" : "cab" end private def extract_exe(archive, dir) opened = decompressor.search(archive) file = opened.files while file path = File.join(dir, file.filename) decompressor.extract(file, path) file = file.next end end def decompressor @decompressor ||= begin require "libmspack" LibMsPack::CabDecompressor.new end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems