
    History
    -------


    -------------------
    ««« Sploin 1.61 »»»
    -------------------
    - Yves Perrenoud --
    - 20.04.1992 ------
    -------------------


------------------------------------------------------------------------------
-  V1.0  :  Base version, which only lets you extract and not really split,  -
-           no bugs found.                                                   -
------------------------------------------------------------------------------
-  V1.1  :  Added the option to split the file in x parts of a size          -
-           specified by the user, or in a specified number of parts.        -
------------------------------------------------------------------------------
-  V1.2  :  Added multi file join.                                           -
------------------------------------------------------------------------------
-  V1.3  :  Added an option which tells Sploin to use an input file          -
-           containing the names of files to join together. Removed a few    -
-           little bugs.                                                     -
------------------------------------------------------------------------------
-  V1.4  :  Wildcards are now supported. You can specify an destination dir. -
-           when splitting in several parts.                                 -
------------------------------------------------------------------------------
-  V1.45 :  Fixed an ugly bug which didn't accept subdirectories in the      -
-           original path when using the -d option.                          -
------------------------------------------------------------------------------
-  V1.5  :  Changed the program so it would no longer use the arp library    -
-           for pattern matching and for break detection, but DICE routines  -
-           instead. Also changed everything to Ansi-C (increased the binary -
-           by 6k). Removed stupid options. Found bugs in the removed        -
-           options (Hey hey!)                                               -
------------------------------------------------------------------------------
-  V1.6  :  Added an option to reconstruct a previously split file.          -
-           Corrected a bug in the input file option. Can now be compiled    -
-           under UNIX.                                                      -
------------------------------------------------------------------------------
-  V1.61 :  Fixed an Enforcer hit!                                           -
------------------------------------------------------------------------------




                              Sploin Version 1.61
                          Written by Yves Perrenoud
                              Copyright (c) 1992
                             All Rights Reserved.




    Disclaimer :
    ------------

    I am NOT responsible for anything this program does; you are using it
    enterily at your own risk.

    This program is freely distributable for non-commercial use, provided a
    small credit note or a thank-you is included in the readme file.

    Description :
    -------------

    This program lets you split a file in several different ways or join
    several files together.

    So here is a descripiton of the spliting facility :

    - You can extract a specified amount of bytes anywhere in a file and
      optionaly save what rests.
    
    - Split a file in two parts and only specify the size of the first
      chunk.
    
    - Extract a certain amount of bytes from the beginning of the file.
    
    - Split a file in a certain amount of parts or in chunks of a specified
      size. The resulting files will have the "_n" extension added to the
      original name.

    And here is a description of the joining facility :

    - You can join several files together, just like the command "join". Of
      course wildcards are supported.

    - Use an input file to specify the files to join together. This lets
      you join an ilimited number of files together, or use the output of
      another program to prepare a list of files (i.e. list, ARexx, etc..).

    - You can reconstruct a file which was previously split with Sploin.
      Let me get this clearer: you have FTPed a big archive (2.5Mb), and
      you won't to bring it back to your amiga at home. Well you split the
      file in chunks of 700'000 bytes, transfer them to disk, and then
      when you get home, you reconstruct the archive with Sploin using the
      "-g" option.


    Detailled description :
    -----------------------
    
    The command is invoked as follows :
    
        Sploin <Mainfile> {<FileN>} [<options>]
    
    <Mainfile>, is the file you will be spliting or the joined file. The
    fact it must be the first filename on the command line is quite obvious
    when you use the split option, but when joining this can be at first a
    bit confusing; it's just a question of habit.

    {<FileN>}, are either the files you are going to join, in which case
    you are only limited by the length of the command line, or the
    resulting files from the split. Wildcards are supported.

    [<options>], here is a list of them :

    
        The mode you are going to use :

            -j      : join mode (default).
            -sN     : split mode.

        The actual options :

            -b      : buffer size.
            -o      : offset (split only).
            -n      : size to split in bytes (split only).
            -r      : save rest (split only).
            -i      : input file.
            -g      : reconstruct mode, opposite of -sN (join only).
            -d      : destination directory (split only).




    Spliting files :
    ----------------
    
    Buffering :
    
    With "-b" followed by a value in bytes, you will set the buffer to the
    desired size. The default size is 50'000 bytes.
    
    Exctracting :
    
    "-n" : specifies the amount of bytes to exctract.
    "-o" : is the offset at which the program should start exctracting.
    "-r" : is an option which will save what is rest of the file after the
           exctraction.

    So lets say you want to strip the first 2000 bytes of a file called
    "Filename" into a destination file called "DestFile", you would type :

    "Sploin -s Filename DestFile -n2000".
    

    Now, you want to extract from a sample which is 1.5mb long, 450'000
    bytes starting at the 800'000th byte. You simply type :

    "Sploin Sample Speech -s -n450000 -o800000".
    
    
    Next, you want to separate the sample in two chunks : one of 76'000
    bytes and the rest which is (1.5mb - 76'000) 972'576; you type :

    "Sploin Sample -s -n76000 -r Introduction MainSequence"
    
    
    And finaly, you have a file which is 32000 bytes long, you want to
    extract 5'000 from the 12'000th byte and save the 15'000 remaining,
    you type :

    "Sploin -s Messages.txt -n5000 -r Description.txt -o12000 Details"
    
    
    
    Spliting files in several parts :
    ---------------------------------
    
    For this you, use the -sN option, where N is either the amount of
    smaller files you want to output or if you add a '$' it will be the
    size of the different files. A "_n" extension will be added to the name
    of the file you are spliting for each splited file. If you don't want
    the files saved to the same directory as the original file's, you use
    the "-d" option.

    
    Spliting a file called "Garfield.IFF" which is 83'237 bytes long into 5
    different files will be done as follows :

    "Sploin -s5 Garfield.IFF"
    
    "Garfield.IFF"  83'237 bytes   --->   "Garfield.IFF_1"  16'648 bytes
                                          "Garfield.IFF_2"  16'648 bytes
                                          "Garfield.IFF_3"  16'648 bytes
                                          "Garfield.IFF_4"  16'648 bytes
                                          "Garfield.IFF_5"  16'645 bytes

    Spliting a file called "Sample" which is 3'000'000 bytes long on the
    volume dh0: into several chunks of 850'000 bytes long on the volume
    dh1:

    "Sploin dh0:Sample -s#850000 -ddh1:"
    
    Volume dh0:                            Volume dh1:

    "Sample"  3'000'000 bytes      --->    "Sample_1"  850'000 bytes
                                           "Sample_2"  850'000 bytes
                                           "Sample_3"  850'000 bytes
                                           "Sample_4"  450'000 bytes


    Note : On UNIX, replace "dh0:" by "/" and "dh1:" by "~/".
    ----

    This is a perfect example of the use of Sploin, divide a huge file in a
    certain number of smaller files which will fit on a disk. You can then
    reassemble the smaller files into the huge file automatically using the
    join "-g" option (see example below).

    



    Joining files together :
    ------------------------

    When you are in join mode, the only options availiable are "-b -i -g".
    To join several files together you simply type Sploin followed by the
    name of the destination file, and then you type the name of the
    different files you which to join together. there must be at least one
    file, in which case Sploin will simply copy the file.

    Note : If a file which will be created with Sploin already exists, the
    ----   program will ask you for a confirmation before replacing the
           file.

    Here is an example of a join :
    
        Sploin messages_1_250 messages_1_119 messages_120_250
        
        or
        
        Sploin -j messages_1_250 messages_1_119 messages_120_250

    The two are exactly the same since the "-j" is the default. Now a
    multiple file join :

        Sploin 4Months January February March April
    
    Would join January, February, March and April as 4Months.


    An other example, we want to join all the files ending in ".txt" :
    
        Sploin all.txt #?.txt       (AmigaDOS)

        Sploin all.txt *.txt        (UNIX)
    
    
    An input file can be specified with "-i", which will contain the names
    of the files to join. This lets you have an ilimited number of files
    to join togeter, because with a program like join, if you have more
    files than the command line, you must proceed in several passes.
    
    An interesting thing about this option is you can redirect the output
    of a program like list (or ls on UNIX), or use a script (ARexx on the
    Amiga) to specify the file names.


    Here is an example : you wich to join all the files with the .c suffix
    together in a file called "all.c" (this is the same as the previous
    example).

        List #?.c lformat "%s" >ram:files
        
            then you invoke Sploin :                    (AmigaDOS)
        
        Sploin all.c -iram:files
        
        
        ls *.c > ~/files
        
            then you invoke Sploin :                    (UNIX)
            
        Sploin all.c -i~/files


    Reconstruction mode :
    ---------------------
    
    To reconstruct a file you use the "-g" option. This is the opposite of
    "-sN". This means you join all the files which match "<filename>_n",
    where <filename> is the file to be reconstructed.
    
    You might ask, "but why use -g when you can use wildcards?". The
    answer is quite simple, with wildcards you are not guarented the files
    will be in the right order!
    
    Here is an example : you want to reassemble an previously split
    archive.
    
        "Sploin Radiance.lzh -g"
        
    "Radiance.lzh_1" 700'000 bytes   --->   "Radiance.lzh" 2'723'467 bytes
    "Radiance.lzh_2" 700'000 bytes
    "Radiance.lzh_3" 700'000 bytes
    "Radiance.lzh_4" 623'467 bytes




    Conclusion :
    ------------
    
    The program was developed on an Amiga 3000 with 4mb of RAM and tested
    on a non accelerated Amiga 2000 with 5mb of RAM and 512k of chip. The
    program was also tested on Sun Sparc 1, running SunOS 4.1.2.

    Well this is just about it, I don't know what else I could say about
    the program. If you have any suggestions, ideas or simply if you find a
    bug, contact me in one of the ways decribed below. If you like this
    program or find it useful, you could send me a postcard or something so
    I'll know where my program is being used.


    - The BBSs I use the most frequently :

        AUGL  : +41 75 2 1587
        AUGS  : +41 62 4 327
        MAGIC : +41 61 98 6843

    I will be under Yves Perrenoud.

    - On Fidonet 2:302/906 (Yves Perrenoud)

    - USENET : pyves@nuga.imp.com



    If you don't live in Switzerland, I advise that you use Usenet to
    contact me or eventually Fidonet. Otherwise leave me a message on AUGL
    (Yves Perrenoud), MAGIC (Yves Perrenoud) or one of the BBSs mentionned
    above. Of course you can send me normal mail, see the address below.


        Yves Perrenoud,
        Traversière 29,
        CH-2013 Colombier,
        Switzerland.
