⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme4.3

📁 和Unix的compress/uncompress兼容的压缩/解压算法16位程序
💻 3
📖 第 1 页 / 共 2 页
字号:
redirection.  You can still use -h or -? to view the command options.

Also, the input files are now unlinked, as expected on the unix system. This
is done on successful completion of compress and uncompress. On Zcat, no
unlinking takes place.

Other changes have been in the makefile and fine tuning the header and source
to be more compatible with more compilers. Some errant casts have been taken
care of.

Compress version 4.1d improvements:

        o Improved the interface some more. Some files were being unlinked
          when errors were discovered. Changed testing for enough memory for
          expansion/compression.

        o The compressed files are totally compatible with the existing
          implementation of compress v.4 joe release.

Note, the header file and the make files need some work for other compilers
and operating systems. Please leave me a messsage via the contact information
at the end of this file. I need to know specific system dependent functions
and header files to make compiling easier.

COMPRESS file compression utility for various computer operating systems. This
version of the source code keeps to the existing program calling conventions
of the Unix version, generates compatible compressed files and will uncompress
Unix files up to 16 bit compression. The reason for this project was first to
port to the MSDOS environment.

Later on, Lyle Rains worked on the compression and decompression routines. Not
only did he optimize them a great deal, it now is able to keep tables in 64K
chunks. This is essential on segmented address machines, both to keep the use
of huge pointers out of the program and eliminate the need for 32 bit
arithmetic. Another effect of these changes is that the limitation on bits is
not dependent on 16 bit cpu's.

Finally, this code is released with the expectation that it will compile on
any platform that uses a C language compiler. However, during testing, we
only had access to some systems. We would appreciate any comments regarding
changes needed to compile properly on different operating system platforms.

The philosophy behind splitting up the source code as it is, is to make
porting and upgrading more easily done. The main logic involved in the
utility is in compress.c, this also tests all the files and options, and opens
any needed files by freopens() to stdin and stdout.  The initial reads or
writes are done to the file, and the files are passed to the API for the
actual compression and decompression.  The compusi.c module is support for the
interupt routines and the various functions to deal with file naming
conventions.

Modified atob.c btoa.c source code is included. The original did not cast
constants to longs and thus had bad code output with some compilers. Now
fixed. Also, on some operating systems, you can not unlink a file and continue
to use the file. This would cause lost clusters. The unlinking of the temp
file is now done at the end of the program.

You should look closely at the COMPRESS.H file to see what defines you will
need for your system.  The COMPAPI.C file is fairly standard and should have
no problems with most current compilers.  There are two User System Interface
files:

        COMPUSI.UNI is for unix/xenix system and compiler. Since it is a unix
        like operating system, that is the file that should be renamed to
        compusi.c for compiling. The major things to check for on this port
        are the signal calls, to make sure they are appropriate for your
        system.

        COMPUSI.DOS is for the MS/PCDOS operating system. The system's
        path and naming conventions are the particular concern here. Also
        check on the signal() calls. Microsoft C version 5.1 was the
        compiler it was written for. In version 4.0, one of the signal
        defines is not supported. Please check your compiler's documentation
        for compatibility. The other problem may be some of the string
        routines. They are ANSI compatible and the compilers we used to
        test it supported them. However, you may have to rewrite the
        functions. Atari ST, with the Mark Williams Compiler support was
        added.

For the most part, COMPRESS.C uses very standard library functions, or
calls system specific functions from the compusi.c file.  You should read the
header file to decide which defines your system needs. Also rename either
compusi.uni or compusi.dos as a starting point. The major differences is their
support of operating system directory naming conventions. You may have to
change some of the code.  If you port the compusi.xxx to another operating
system, we would appreciate a copy of the file to include in the distribution.

Compiling: Please see the make files included for various compilers and
systems. Use your compiler's optimizing switch for maximum optimization. If
you have a problem, first turn the optimizing off and see if the program
works. If you still have a problem, let us know.

For segmented addressing machines, 16 bit varieties, the program was designed
to run compiled with near code and data, but far pointers for the compression
and decompression buffers. These are allocated in COMPUSI.C using emalloc()
function. You may (probably will) have to change your compiler's name for
the routine that allocates far pointers. If you can't, then you must compile
the program in the compact model with far pointers as a default.

INSTALLATION: The program reads it's own name in most implementations.
If it doesn't, (Versions of MSdos less than 3.x are one), then you must
use command line options to decompress or 'cat' files.  Otherwise, if your
system allows filename links, as in Unix/Xenix, do something like the after
compilation, move "compress" to a standard executable location, such as
/usr/local and link under uncompress and zcat.  Thus:

        mv compress /usr/local
        cd /usr/local
        ln compress uncompress
        ln compress zcat

If you are using MSDOS version 3.x, then copy compress.exe to uncomp.exe and
to zcat.exe.  Once this is done, the program will understand it's default
operating options.

To get all the options and what the current defaults are, use the command:
        compress -h


Compress version 4.10b : Combined effort by Lyle Rains and Don Gloistein.
Now should be useful on both MsDos machines and Unix platforms. If there are
portability problems with compiling on Unix, please contact me with the
portability issues.

    o See the source and header files for other bug swats.
    o Added some defines to accomodate various compilers and operating
      systems. Attempted to keep the coding compatible with the current
      ANSI standards.
    o Fixed my bug in detecting extension if the '.' character is used in the
      MsDos system.
    o Lyle Rains' work on a modified algorithm for compression and
      decompression is incorporated. This will change some file sizes and the
      final code of some compressed files. But don't worry. Either the
      existing compress v4 or this one will decompress the file. The reason
      for the difference is that the compression ratio is not checked in this
      version. It saves time in compression with, we feel, minimum sacrifice
      to compression.
    o Xenix should be able to compile it as is now.
    o Various unix systems should be able to compile it with minimum changes
      to the code. Use the COMPUSI.UNI as the starting point. The other
      changes should be evident in the COMPRESS.H file. PLEASE READ THAT FILE
      BEFORE COMPILING.

Note:  The following comments and history are provided for background. This
implementation changes much of the Dos information.  The archive file
containing this source code also contains the following program sources:
        btoa - convert binary to ascii for mailing
        atob - convert ascii to binary with checksum

                                        regards,
                                        don
Please contact me if you have suggestions, comments or bug reports. I can
be reached by the following:

Full-Name:  Donald Gloistein
US Mail:    DGWare Consulting; P.O. Box 669, Alvin, TX 77512-0669
CompuServe: Unixforum 76010,474
Phone:      (713)331-9372

UUCP:       Pete Holsberg has agreed to receive uucp mail for us. You may
            reach Lyle or myself via:
            !rutgers!princeton!mccc!pjh


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -