evadne

evadne

Packmatic — On-the-fly Zip Generation

Packmatic generates Zip Streams by aggregating File or URL Sources.

Hex / GitHub

By using a Stream, the caller can compose it within the confines of Plug’s request/response model and serve the content of the resultant Zip acrhive in a streaming fashion. This allows fast delivery of a Zip archive consisting of many disparate parts hosted in different places, without having to first spool all of them to disk. The generated archive uses Zip64, and works with individual files that are larger than 4GB.

The Documentation contains a more detailed explanation of why it was built.

Most Liked

evadne

evadne

Packmatic 1.1.1 has been released. Now it is possible to construct your archive with streams…

Added

  • Added Packmatic.Source.Stream.
    • Added support for Streams that output IO Lists.
  • Updated Packmatic.Source.
    • Added ability for any Source to use any data type as its Source State.
    • Added ability for any Source to return an updated Source State with new data.

Changed

  • Revised Packmatic.Source.Dynamic.
    • Removed custom resolver; any entry notation now accepted.
  • Updated development & test dependencies.
evadne

evadne

Hi all, Packmatic 1.2.0 is out, replacing ibrowse with hackney, and tested against more modern OTP versions.

evadne

evadne

Packmatic 1.1.0 has been released:

  • Added support for custom Sources.

    • Any module which implements Packmatic.Source can be used as a Source.
  • Added support for Encoder Events.

    • Added the on_event option to the Encoder which can be used to receive events.
    • See documentation for Packmatic.Event.
  • Revised Packmatic.Source.

    • Added callback validate/1 for entry validation.
  • Revised Packmatic.Manifest.Entry.

    • Moved validation of Initialisation Arguments to Sources.
  • Revised Packmatic.Source.File.

    • Added explicit cleanup logic.
  • Revised Packmatic.Source.URL.

    • Added explicit cleanup logic.
  • Revised Packmatic.Encoder.

    • Fixed acceptance of IO Lists, in case of custom Sources returning these instead of binaries.

An upcoming version will add ability to consume IO Lists from Streams.

evadne

evadne

:information_source: Packmatic 1.0.0 is now released. This release includes ahead-of-time verification enhancements for the Manifest, among other things. Changelog has been updated.

sorentwo

sorentwo

Oban Core Team

I had some similar requirements a few months ago:

  1. UTF8 file names
  2. Stream file input
  3. Stream archive output

For our specific use case we needed to generate very large zips of video data without worrying about disk space. The goal was to create a multi part upload in S3 as the zip was created and to avoid disk writes altogether. The goal was to limit memory use to that of the largest video file. This was an unusual enough use case that I created a new library for it: zap.

Due to the specifics of the use case it doesn’t compress at all (though it could quite easily). Through the use of streams it accumulates inputs and periodically emits chunks of output suitable for S3. Since switching to zap we haven’t had any disk space issues.

Edit: I’m sharing in this thread in case others find themselves in a similar situation. Zap has a specific use case that is much narrower than packmatic, but we probably could have made packmatic work for our needs.

Where Next?

Popular in Libraries Top

RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 11851 134
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
Qqwy
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Th...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Sub Categories:

We're in Beta

About us Mission Statement