Upload and mod_zip

Hi,
I’m testing a configuration using Upload module and mod_zip. And found
that in Upload module would be very usefull to have a
upload_aggregate_form_field for CRC32, CRC32 value is used in mod_zip to
compress the downloading zip file.
Now i’m doing the CRC32 calculation in PHP. But It should be faster
inside the module.

Tuqui

There are good ways to calculate the crc32 in php if you look at the
php.net documentation comments. Plus, you only have to calculate it
once, and store it in a database, which would help greatly if you’re
not doing that currently.

I know that the old version of mod_zip used to do the crc calculations
for you (it no longer does so that it can properly support resuming
downloads and byte ranges), perhaps that bit of code could be ripped
out and put into the upload module?

Valery

It runs perfect!.

How can you did that fast, are you competing for a New World Record?.
Man you are faster than a Jamaican runner!

I just put my php function in the trash can.

Thanks of lot.

Tuqui

Valery K. さんは書きました:

Try attached patch. Variable name is $upload_file_crc32

Adding CRC32 support was quite trivial.

It runs perfect!.

How can you did that fast, are you competing for a New World Record?.

Well, I’ve been training a lot in the past on ZX Spectrum computer.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs