SPO600 Project - Stage 1
This stage in the project was'nt all too difficult. The hardest part in
my opinion was finding a right project. For this project I had to
options.An open source project named density or a different project that
was referred to b y a friend called Zopfli; both were compression
algorithms.The first one I tried was density was extremely easy to
build, just just 2 or 3 commands I built it and it ran beautifully. But
there was only one problem; it was quick, too quick. For the project we
were supposed to make a test case that took at least 4 minutes to run,
but density was designed to be as fast as possible. The tester file it
came with took only 10 seconds to run algorithm and I could'nt figure
out how to make it longer due to the complex code. I was stumped for a
while so I had no choice but to move onto a different project.
And there it was, the perfect project for me. Unlike density which was extremely fast, Zopfli was designed to be slow to it can get bet compression on a file. Finally, something that met the 4 minute quota. But this was extremely tedious, unfortunately I didn't now how slow it was. The first thing I did was create a 1gb file which took over 20 minutes to run, and due to a grueling experiences of trial and error I got it down to roughly 4 minutes. Zopfli was recommended to me by a group of friends I met on discord. After compiling it realized I a lot of other people in the class were doing the exact same project, so I really hope its okay if multiple people have the same project.
Now for the actual project. Zopfli took a bit to figure out how to build because the documentation was extremely confusing. After some trial and error I got it to run on my home computer using putty.
So here are the steps I did to build the project in an x86_64 system.
After logging into Matrix and going to the right directory the first thing I had to was clone the repository using the command
git clone https://github.com/google/zopfli.git
once everything was copied over I ran the make command. when this command was run it created an executable file named Zopfli.
The next step was creating a file that I can compress and use for testing. In order for me to create a file
dd if=/dev/urandom of=file.txt bs=2048 count=4000
This command creates a 86mb file(called file.txt) that was filled with random characters.
Next I ran the final command
time zopfli file.txt
This command starts to compress the file and time it for us.
All tests were done 3 times with multiple files, and the timings provided below were the averages.
There will be 3 different times the system gives us depending on the build option we select. The 3 build options are -01, -02, and -03, -03 being documented as the fastest and the default build option.
For 01 I took 4 minutes and 36 seconds, for 02 it took 4 minutes 27 seconds, for 03 it took 4 minutes and 10 seconds. With 03 being the fastest build option, its the preferred method for x86_64 systems
Density can be found at https://github.com/centaurean/density
Zopfli can be found at https://github.com/google/zopfli
And there it was, the perfect project for me. Unlike density which was extremely fast, Zopfli was designed to be slow to it can get bet compression on a file. Finally, something that met the 4 minute quota. But this was extremely tedious, unfortunately I didn't now how slow it was. The first thing I did was create a 1gb file which took over 20 minutes to run, and due to a grueling experiences of trial and error I got it down to roughly 4 minutes. Zopfli was recommended to me by a group of friends I met on discord. After compiling it realized I a lot of other people in the class were doing the exact same project, so I really hope its okay if multiple people have the same project.
Now for the actual project. Zopfli took a bit to figure out how to build because the documentation was extremely confusing. After some trial and error I got it to run on my home computer using putty.
So here are the steps I did to build the project in an x86_64 system.
After logging into Matrix and going to the right directory the first thing I had to was clone the repository using the command
git clone https://github.com/google/zopfli.git
once everything was copied over I ran the make command. when this command was run it created an executable file named Zopfli.
The next step was creating a file that I can compress and use for testing. In order for me to create a file
dd if=/dev/urandom of=file.txt bs=2048 count=4000
This command creates a 86mb file(called file.txt) that was filled with random characters.
Next I ran the final command
time zopfli file.txt
This command starts to compress the file and time it for us.
All tests were done 3 times with multiple files, and the timings provided below were the averages.
There will be 3 different times the system gives us depending on the build option we select. The 3 build options are -01, -02, and -03, -03 being documented as the fastest and the default build option.
For 01 I took 4 minutes and 36 seconds, for 02 it took 4 minutes 27 seconds, for 03 it took 4 minutes and 10 seconds. With 03 being the fastest build option, its the preferred method for x86_64 systems
Density can be found at https://github.com/centaurean/density
Zopfli can be found at https://github.com/google/zopfli
Comments
Post a Comment