Qbasicnews.com

Full Version: QBNZ Challenge 0303: File Packer!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
QBasic New Zealand started yesterday with a new challenge! Anyone who thinks he's able to tackle the problem, please participate! Let's make a nice contest of it!

For info about the challenge, look here: http://qbnz.com/pages/challenges/current.html
To submit an entry, click here: http://mailto:webmaster@qbnz.com?subject...enge entry

Or if you just want to visit QBNZ, click here: http://www.qbnz.com

Anyway, here are the rules:

Quote:The new challenge is now open for competition! The contest? Make a file packer for QBasic. This competition idea was submitted by Neo. The competition goes until the 12th of October, 2003. Here are the rules:

This challenge is sub-divided into two classes of challenges. This is to improve accessibility to the challenge. There is an easy class, which the intermediate programmer can participate in. Secondly there is a hard class, which expert coders can compete in. Both classes will be described thoroughly, of course. However, both classes have the same goal program.

GOAL: Create a file-archiver

GENERAL RESTRICTIONS:

- No CALL ABSOLUTE or loopholes.
- No library usage.
- Source must be under 64 kB
- (easy) 0 external files allowed
- (hard) 2 external files allowed


EASY CLASS

Goal is to create a file-archiver which is able to pack multiple files into one file. The program must be able to unpack the files too.

POINTS: Points will be awarded for speed, (g)ui, understandability (USA) & any special features according to the following scheme:

SPEED (60%), 0 to 100 points
(G)UI (10%), 0 to 100 points
UNDERSTANDABILITY (25%), 0 to 100 points
SPECS (5%), 0 to 100 points
Total number of points = SPEED * 0.6 + GUI * 0.1 + USA * .25 + SPECS * .05

NOTE: special features which apply to the Easy Class are:

- Compression


- Mouse


- Directory box


- File box


HARD CLASS

Goal is to create a file-archiver which is able to pack multiply filies into one file and is able to unpack them again. A MUST in this hard class is that the file archiver MUST be able to create a self-extracting EXE file. This option must of course be optional. You must also supply QB Routines for reading and extracting the package. You can have 1 Main Source file, 1 QB Routines file and 1 external file.

POINTS: Points will be awarded for speed, gui, exefile, and specials, according to the following scheme:

SPEED (25%), 0 to 100 points
SFX (50%), 0 to 100 points
GUI (20%), 0 to 100 points
SPECS (5%) , 0 to 100 points
Total points = SPEED * 0.25 + SFX * .5 + GUI * 0.2 + SPECS * 0.05

NOTE: special features which apply to the Hard Class are:

- Compression

If you would like more information about any of these rules, or some help with your entry, you can sign up to the forums and post in the official challenge thread.
Neo, this sounds like an interesting challenge. I hope there's participation.

A couple of comments/questions.

1. It'd be real easy to make a file concatinator(sp?) that didn't compress. Are you more interested in getting multiple files into 1 file, or are you more interested in the compression aspect?

2. What type of file will be tested for compression? This is very important. For example, a very different approach would be needed for text, vs analogue (non-compressed) music files.

2a) It's important that what ever type of file is used is not already in an efficient format. For example, trying to compress a jpeg, or an encrypted file, or an MP3, or a Zip file would be a lesson in futility.

3) Do you want submissions that are QB implementations of other well-known methods, or do you want compression schemes that are concieved without knowledge of what is currently done in other packages?

Anyway, I might be interested in throwing some code together for this one.
Here are some answers to your questions:

1. As you can see in the 'POINTS' section of each class, only 5% of the total amount of points comes from special implements, like Compression. So yes, I'm more interested in that the program can pack multiple files into one package.

2. I will test your submission thoroughly, and I can most commonly see what kind of compression you used by inputting different files. And no, I will not input already compression files like MP3 or ZIP. Just some most common type of files are tested: text & exes & raw data files.

3. As I already said, compression is not the most heavy weighing point. If you just use some RLE or LZW you probably get 100 points already at this point. And please NO LOSSY compressions. Wink Now to really answer your question, I'd like everyone to make what he/she CAN make. So please don't copy paste supercompression code from the internet.

Anyway, I hope this answered your questions. Also, I hope you participate! Good luck! Smile
How to make a self extracting EXE (for those who've never done it before but want to try it):
It's a lot easier than you might think. First you simply append some data to the EXE. This doesn't affect the EXE at all - it still loads and runs normally. When the EXE is run, the data you appended doesn't get loaded into memory. All you have to do is program the EXE to open itself (the .EXE file) and find the appended data.

Or at least I gather as much from this tutorial... (I've never tried it before either, but I've got the general idea and I'm sure I won't have any trouble with it)

Good luck everyone! I hope I get some competition in the hard class.

Neo/Oracle: Does it need to be able to preserve directory structure, or are you not expecting/requiring that?
Ask neo Wink Maybe it can be part of the "hard" challenge.

And note, as posted on the challenge thread: If You Submit An Entry To One Difficulty You May Not Submit An Entry To The Other Difficulty Mode Unless You Ask For Your Other Entry To Become Void!
Quote:How to make a self extracting EXE
Wink lol Correct at once! Anyway, why did you tell that... Wink You've given away the clue people had to find out... Wink Never mind Smile

Quote:Neo/Oracle: Does it need to be able to preserve directory structure, or are you not expecting/requiring that?
Let's make a special feature of that, ok? So it counts for only 5%.
Moneo, where are you? This should be right up your alley Wink
That sounds interesting....how long are we able to work on it???
A month Smile
Ok...maybe I'll join this challenge
Pages: 1 2 3