Skip to content

miyako/LegacyZip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version platform license downloads

LegacyZip

dependencies.json

{
   "dependencies": {
   	"LegacyZip": {
   		"github": "miyako/LegacyZip",
   		"version": "^1.0.0"
   	}
   }
}
var $LegacyZip : cs.LegacyZip

$LegacyZip:=cs.LegacyZip.new()

$src:=Folder(fk desktop folder).folder("test")
If ($src.exists)
	$src.delete(Delete with contents)
End if 
$src.create()
$src.file("あいうえお.txt").setText("あいうえお")
$src.folder("かきくけこ").create()

$dst:=Folder(fk desktop folder).file("test.zip")
If ($dst.exists)
	$dst.delete()
End if 

$options:={cp932: True; method: "deflate"; password: "dddd"; encryption: "zipcrypto"}
$worker:=$LegacyZip.zip($src; $dst; $options)
$worker.wait()
ALERT($LegacyZip.data.join("\r"))

$src:=$dst
$dst:=Folder(fk desktop folder).folder("zipcrypto")
$dst.create(Delete with contents)

$worker:=$LegacyZip.unzip($src; $dst; $options)
$worker.wait()
ALERT($LegacyZip.data.join("\r"))

objective

  • support legacy Windows XP ZipCrypto archives in ShiftJIS

encryption

Go Build

GOOS=darwin GOARCH=arm64 go build -o zip-arm main.go
GOOS=darwin GOARCH=amd64 go build -o zip-amd main.go
lipo -create zip-arm zip-amd -output uuid
GOOS=windows GOARCH=amd64 go build -o zip.exe main.go

CLI

zip -src "path.zip" \
    -dst "path" \
    -cp932 \
    -password "password"\
    -unzip \
    -encryption zipcrypto \
    -method deflate
flag default other
cp932 false true
unzip false true
src
dst
password
encryption (requires password) zipcrypto aes128 aes192 aes256
method deflate store