home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UTILITY / ELRIC39.ARJ / BASEPACK.DOC next >
Text File  |  1990-06-13  |  10KB  |  111 lines

  1.  
  2.  
  3.  
  4.                                 BasePack V2.2
  5.                                 by Lord Elric
  6.                                    6/13/90
  7.  
  8.  
  9.    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. 
  10.  
  11.    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!
  12.  
  13.    To run BasePack, all you need to do is copy it to the main BBS directory and type
  14.  
  15.    BASEPACK
  16.  
  17.    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.
  18.  
  19.    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.
  20.  
  21.    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.
  22.  
  23.    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.
  24.  
  25.  
  26.  
  27.                                 BasePack V2.2
  28.                                 by Lord Elric
  29.                      Comments, Source Code, Registration
  30.  
  31.  
  32.    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.
  33.  
  34.  
  35.    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.
  36.  
  37.  
  38.    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. :)
  39.  
  40.  
  41. Lord Elric
  42. 1-812-877-3488 USR HST
  43.  
  44. Wayne McDaniel
  45. RR 32 Box 376
  46. Terre Haute, IN 47803
  47.  
  48.  
  49.  
  50.  
  51. BasePack Version Info
  52. 05/07/90  1.0  Initial version  Worked, but slower than all hell
  53. 06/10/90  2.0  Optimized to run faster. Unfortunatly, deleted all messages
  54.                 except first one in base.
  55. 06/11/90  2.1  More goodies added. Now deletes ONLY first message in base
  56. 06/13/90  2.2  Deletes no message. Minor display bugs fixed. Docs written.
  57.                Released 6/13/90
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                 BasePack V2.2
  65.                                 by Lord Elric
  66.                                Technical Notes
  67.  
  68.  
  69. When you run BoardEdit, you are presented with many choices. The only ones which really affect BasePack are the filename and the storage type.
  70.  
  71. Storage Type 0
  72.   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.
  73.  
  74. Storage Type 1
  75.    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
  76. (**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. 
  77.    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:  
  78.  
  79.        1. It is not fully implemented.
  80.        2. It may or may not work on a networked base...I have no way of
  81.           telling, and don't really want to start experimenting with the
  82.            net software.
  83.        3. Since it is unofficial, it just might get deleted at any update, 
  84.           which would leave you in a world of hurt.
  85.  
  86.    So, the best thing I can tell you is to leave it alone.
  87.  
  88. Storage type 2
  89.    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.
  90.  
  91.    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:
  92.  
  93.     4096 + 2048 * 512 = 1052672, or 1028K
  94.     ^      ^      ^
  95.     :      :      :
  96.     :      :      --Block size
  97.     :      :
  98.     :      --Max Number of blocks
  99.     :
  100.     -Size of block map
  101.  
  102.    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.
  103.  
  104.    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?
  105.  
  106.    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.
  107.  
  108.  
  109.    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.
  110.  
  111.