Contents of the BASEPACK.DOC file
by Lord Elric
BasePack is a program I wrote to pack my message bases down to size. For those who care, a slightly more technical description of how it works is at the end of this document, but for now, let me just say that BasePack can compress your message bases.
It is not a true compression algorithm, such as PKZIP or anything like that. All it does is remove the dead space from a message file which is no longer being used. For example, I used to have around 5.5 megs of hard drive space devoted to messages. Now, I am only using around 2.8 megs of space. I cannot guarantee you will see the same type of results, but you will see a difference!
To run BasePack, all you need to do is copy it to the main BBS directory and type
There are no command line options, no questions asked, no choices, and no way to back out of it. The only way to exit the program is to reboot, which is NOT recommended, since this will leave your message bases scrambled.
BasePack begins by reading CONFIG.DAT, which tells it where all your messages are being stored. Next, it reads SUBS.DAT, which tells it the name and number of all your message bases, plus some info about how they should be stored. Then it starts processing the message bases.
To process the message base, it reads in the appropriate data file for the message base. This tells BasePack how many messages there are and how each one actually is stored. If you have more messages in the base than the limit is set at (such as you just lowered the limit...WWIV will NOT delete messages for you to reach the new limit) BasePack will delete them for you starting with the first message and going on through as many as needed, skipping any marked undeletable. Then, it processes each remaining message individually, converting to a new type if needed. The screen at all times tells you exactly what is going on. For more details, see the technical notes at the end of this document.
That really is about all you need to know to run BasePack. Probably the first time you run it you will see some big savings, but after that not too much, depending on how often you use it. I run it every week or so, and usually free up 100-200K, depending on how busy the network has been.
by Lord Elric
Comments, Source Code, Registration
BasePack works. Take my word for it. However, you are a fool if you just blindly trust everything I tell you. Back up the hard drive before you try this, just in case something strange happens on your system.
No, the source code is not being released. I debated on this one for a long time, and decided it just was not worth the risk involved. Too much potential exists for blowing your message bases all to hell, which I did several times in the course of this. If you run into any problems, feel free to contact me through the BBS, but if you take the precautions of backing things up first, you can always recover. All I have is one stupid little 360K floppy, yet I faithfully back up all 60 megs (can you say 150 disks?) at LEAST once a month, and critical files more often than that.
There is no registration fee of such. Donations are always appreciated, I have a real nice job where I work at home programming at least 3 or 4 days a week, but my boss can tell when I have been working on his programs and when I have been writing mods...and since he pays me and you guys don't, well, I try to give him priority. (Not that I would suggest that making donations would encourage me to blow off work even more than I already do and write mods instead.) But, so many people have told me "I can't believe you aren't charging for these mods...I would gladly pay for them". Well, as usual, I am asking for nothing other than a short piece of email telling me you are using this program. Send it to 1@18251 Link, the net node is going to be history by the time I distribute this. But, if you start thinking about hard drive space costing around $10-$15 a meg, and figure I saved you $20 of space, feel free to send a check. I guess what I am saying is money would be just plain lovely, but I really expect to be able to count the donations on one hand with half the fingers cut off and the other half missing. Of course, on the other hand, if you start figuring how much those extra bases are taking up now that you are using my 64 base mod, maybe I owe you money. 🙂
1-812-877-3488 USR HST
RR 32 Box 376
Terre Haute, IN 47803
BasePack Version Info
05/07/90 1.0 Initial version Worked, but slower than all hell
06/10/90 2.0 Optimized to run faster. Unfortunatly, deleted all messages
except first one in base.
06/11/90 2.1 More goodies added. Now deletes ONLY first message in base
06/13/90 2.2 Deletes no message. Minor display bugs fixed. Docs written.
by Lord Elric
When you run BoardEdit, you are presented with many choices. The only ones which really affect BasePack are the filename and the storage type.
Storage Type 0
When storage type 0 is selected, each message is stored in its own separate file. WWIV gives each message on your BBS a unique ID number, for QSCAN purposes. The ID number is converted to a hex number, which in turn is the name used for the message.
Storage Type 1
Same as Storage Type 0, except instead of storing all these messages directly in the messages directory, it creates a sub-directory off the message directory with the name specified by the file name. So, if your message directory was C:\WWIV\MSGS, and you chose a file name of SAMPLE, the messages would be stored in C:\WWIV\MSGS\SAMPLE
(**NOTE: Storage Type 1 is not completely implemented in WWIV. The only REAL problem I have found so far is it fails to create the subdirectory specified, which in turn causes all the messages to disappear into the vapor since it cant find the directory they are supposed to be saved in.
However, BasePack DOES provide full support for storage type 1 message bases, including creating the directory if needed. BUT, I would not recommend using this storage type because:
1. It is not fully implemented.
2. It may or may not work on a networked base...I have no way of
telling, and don't really want to start experimenting with the
3. Since it is unofficial, it just might get deleted at any update,
which would leave you in a world of hurt.
So, the best thing I can tell you is to leave it alone.
Storage type 2
This is the default storage type, and probably the one 98% of you use, and in turn responsible for 98% of your space wastage. Actually, type 2 can be more efficient than type 0 or 1, if you use BasePack on a semi-regular basis.
Type 2 uses one big file to store the entire message base. The first 4096 bytes are a map telling how the messages are stored. The remainder of the file is divided into 512 byte blocks. In the data file for the base, each message has a pointer to the first block being used by that message. Then, the corresponding map element indicates the next block in the chain. A map element of -1 signals the last block. This gives you a possible file size of:
4096 + 2048 * 512 = 1052672, or 1028K
^ ^ ^
: : :
: : --Block size
: --Max Number of blocks
-Size of block map
With an upper limit of 32K per message, and an upper limit of 254 messages per base, this is actually not enough room to store the maximum, which would take 16256 of the 512 byte blocks, or in other words somewhere closer to 8160K, or a little over 8 megs. But, with so many 1 line messages, and lower security level people being restricted to much less, I wouldn't worry about this problem too much.
WWIV will start at the beginning of the file and search for the first available blocks, so if there are free blocks in the middle these will get used. However, if there are no free blocks, it starts adding blocks to the end of the file. If the file does not exist yet, it is created with an initial size of 79K (Might be 80, but what does it really matter?) or so, 4K for the map and 75K (76K?) of starting blocks. The problem comes when the message base starts to roll over. Say for example, someone had been posting a bunch of 20K excerpts from some book they were reading, or chunks of document files, or maybe (just for example) some really huge mods, like say the 64 base mod by that Elric guy (Me). Then, they move to the bottom of the base, and you get a bunch of one line posts saying "Neat book", "thanks for the documents", "the mod didn't work". Now you only have 8K of actual messages, but you have 376K of message file. Or, if you have a really slow base, it might only be taking 20 or 30K, but WWIV still has 80K allocated for it. Not to mention that now the files are mixed up all over the file. Ever try to read a message file?
BasePack creates a new temporary file, reads in all the messages one at a time, and writes them to this new temporary file. It then deletes the old one, and renames the new file to the correct name.
BasePack also takes care of converting bases from one format to another. If you started a base as a type 2, changed to type 0 to experiment, and now have decided to go back to type 2, no problem. BasePack will read in old messages in any format, and write them back out in the current format. No problem.