GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wynlang/zip

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
wyn.toml
wyn.toml
 
 

Repository files navigation

zip - Official Wyn Package

ZIP archive utilities for Wyn: archive detection, size estimation, and formatting. Pure Wyn, no system dependency. (Create/extract via C bindings is future work.)

Install

wyn pkg install github.com/wynlang/zip

Usage

import zip

// Archive detection
print(zip.zip_is_archive("backup.zip"))          // true
print(zip.zip_is_archive("backup.tar"))          // false

// Rough entry count estimate from archive size
print(zip.zip_entry_count_estimate(524288))      // 512

// Compression ratio as a percentage (compressed/original)
print(zip.zip_compression_ratio(1000, 250))      // 25

// Human-readable sizes
print(zip.zip_human_size(512))                   // 512 B
print(zip.zip_human_size(2560))                  // 2.5 KB

API

Function Description
zip_is_archive(path) True if the path ends in .zip
zip_entry_count_estimate(file_size) Rough entry count (1 per KB)
zip_compression_ratio(original, compressed) Compressed size as % of original
zip_human_size(bytes) Format bytes as "N B" / "N.M KB"

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.