All Projects → BuzonIO → Zipfly

BuzonIO / Zipfly

Licence: mit
Writing large ZIP archives without memory inflation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Zipfly

Gozstd
go wrapper for zstd
Stars: ✭ 275 (-24.24%)
Mutual labels:  streaming, compression
Akka Grpc
Akka gRPC
Stars: ✭ 361 (-0.55%)
Mutual labels:  streaming
Gb28181.solution
Linux/Win/Docker/kubernetes/Chart/Kustomize/GB28181/SIP/RTP/SDP/WebRTC/作为上下级域/平台级联互联
Stars: ✭ 323 (-11.02%)
Mutual labels:  streaming
Rxgo
Reactive Extensions for the Go language.
Stars: ✭ 3,907 (+976.31%)
Mutual labels:  streaming
Xz
Pure golang package for reading and writing xz-compressed files
Stars: ✭ 330 (-9.09%)
Mutual labels:  compression
Engine
Monibuca 核心引擎,包含流媒体核心转发逻辑,需要配合功能插件一起组合运行
Stars: ✭ 340 (-6.34%)
Mutual labels:  streaming
Ping Play
BigPipe streaming for the Play Framework
Stars: ✭ 315 (-13.22%)
Mutual labels:  streaming
Tribler
Privacy enhanced BitTorrent client with P2P content discovery
Stars: ✭ 3,915 (+978.51%)
Mutual labels:  streaming
Kanzi Go
Lossless data compression in Go
Stars: ✭ 361 (-0.55%)
Mutual labels:  compression
Divans
Building better compression together
Stars: ✭ 337 (-7.16%)
Mutual labels:  compression
Caffe
Caffe for Sparse and Low-rank Deep Neural Networks
Stars: ✭ 339 (-6.61%)
Mutual labels:  compression
Tchaik
Music organisation and streaming system in Go
Stars: ✭ 331 (-8.82%)
Mutual labels:  streaming
Machine
Machine is a zero dependency library for highly concurrent Go applications. It is inspired by errgroup.Group with extra bells & whistles
Stars: ✭ 346 (-4.68%)
Mutual labels:  streaming
Zoonavigator
Web-based ZooKeeper UI / editor / browser
Stars: ✭ 326 (-10.19%)
Mutual labels:  compression
Instagramlive Php
A PHP script that allows for you to go live on Instagram with any streaming program that supports RTMP!
Stars: ✭ 362 (-0.28%)
Mutual labels:  streaming
Compress
Collection of compression related Go packages.
Stars: ✭ 319 (-12.12%)
Mutual labels:  compression
Compress Images
Minify size your images. Image compression with extension: jpg/jpeg, svg, png, gif. NodeJs
Stars: ✭ 331 (-8.82%)
Mutual labels:  compression
Mango
mango fun framework
Stars: ✭ 343 (-5.51%)
Mutual labels:  compression
Radiodroid
radio browser app that uses www.radio-browser.info on android
Stars: ✭ 362 (-0.28%)
Mutual labels:  streaming
Flink Training Course
Flink 中文视频课程(持续更新...)
Stars: ✭ 3,963 (+991.74%)
Mutual labels:  streaming

Build Status GitHub release (latest by date) Downloads

Buzon - ZipFly

ZipFly is a zip archive generator based on zipfile.py. It was created by Buzon.io to generate very large ZIP archives for immediate sending out to clients, or for writing large ZIP archives without memory inflation.

Requirements

Python 3.6+

Install

pip3 install zipfly

Basic usage, compress on-the-fly during writes

Using this library will save you from having to write the Zip to disk. Some data will be buffered by the zipfile deflater, but memory inflation is going to be very constrained. Data will be written to destination by default at regular 32KB intervals.

ZipFly defaults attributes:

  • paths: [ ]
  • mode: (write) w
  • chunksize: (bytes) 32768
  • compression: Stored
  • allowZip64: True
  • compresslevel: None
  • storesize: (bytes) 0
  • encode: utf-8

paths list of dictionaries:

.
fs Should be the path to a file on the filesystem
n (Optional) Is the name which it will have within the archive
(by default, this will be the same as fs)

    import zipfly

    paths = [
        {
            'fs': '/path/to/large/file'
        },
    ]

    zfly = zipfly.ZipFly(paths = paths)

    generator = zfly.generator()
    print (generator)
    # <generator object ZipFly.generator at 0x7f74d52bcc50>


    with open("large.zip", "wb") as f:
        for i in generator:
            f.write(i)

Examples

Streaming multiple files in a zip with Django or Flask Send forth large files to clients with the most popular frameworks

Create paths Easy way to create the array paths from a parent folder.

Predict the size of the zip file before creating it Use the BufferPredictionSize to compute the correct size of the resulting archive before creating it.

Streaming a large file Efficient way to read a single very large binary file in python

Set a comment Your own comment in the zip file

Maintainer

Santiago Debus (@santiagodebus.com)

License

This library was created by Buzon.io and is released under the MIT. Copyright 2021 Cardallot, Inc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].