📄 lha255.txt
字号:
file.
File name starting with a '@' within a batch file is
treated as a regular file starting with character '@'.
b. Pipes and Redirections.
A regular text file with content obeying LHA batch file guidelines
(refer to a. above) may be piped or redirected to LHA.EXE.
However, a batch file may be specified from this text file.
< Example 21 >
C> LHA l /n1 parts > files.txt
C> LHA a newparts @filess.txt
The first command line writes contents of archive file, PARTS.LZH,
to a textfile FILES.TXT.
The second command line takes the content of this FILES.TXT and
creates a new archive file named NEWPARTS.LZH.
Optional parameters may be added to the first command line to
create a new archive file containing files selected from the
original archive file, PARTS.LZH.
< Example 22 >
C> dir /b | sort | lha a all
This command line makes a list of files in a current directory
(excluding system and hidden files) without displaying file
attributes, sort this list, and create an archive file, ALL.LZH,
containing these files.
Thus, ALL.LZH file will contain files in the current directory
in alphabetical order.
F. Wild Card Characters (supported after Ver.2.54)
==================================================
Along with the regular MS-DOS wild card character set, LHA supports
wild card character supported by LSI C. LHA supports the following
set of wild card characters:
? replace with one other character excluding '.' character.
* replace with text string excluding '.' character.
(may be null string)
+ replace with text string including '.' character.
(may be null string)
[] replace with a character within the parenthesis. Able to
specify range using '-' character. (eg. [a-z] to specify
all lower case characters between 'a' and 'z'.)
< Example 23 >
FLABO[_~][1-9A] matches with files FLABO_1 through FLABO_A,
FLABO~1 through FLABO~A but does not match with
FLABO_ and FLABO..
FLABO[_~]* matches with all files except FLABO..
FLABO[_~]+ matches with all files.
G. Environmental Variables
===========================
Environment variables are usually set in MS-DOS in the AUTOEXEC.BAT
file. Use a text editor to set the following variable in this file.
a. LHA and LHARC
Set whether to use LHA.EXE or LHARC.EXE. The default setting is
LHA.EXE.
b. TMP and TEMP
Set working directory (directory where temporary files are created).
When omitted or when the specified directory could not be found,
working directory is set to the current directory.
When both TMP and TEMP are set, working directory is set to the
directory set by TMP. (Refer also to -w option.)
c. TZ
Set the time zone (eg. EST, PST). Used to adjust time when archiving
with -h2 option or when extracting files archived by -h2 option.
If time zone is not set correctly, file version control supported by
LHA may not work properly, and files may not be updated.
To set to the Eastern Standard Time (US), SET TZ=EST+5. To set to
Japanese time zone, SET TZ=JST-9.
H. Return Codes
================
LHA returns the following return codes after execution. They may be
used in batch files or in other programs to detect errors.
Code Description
0 Normal termination (No error).
1 File extraction error. CRC error, not enough free disk space,
or file not found when extracting files from archive.
2 Fatal error. Process terminated without modifying archive
file.
3 Failed to convert temporary files to an archive file.
Temporary archive files named LHTMP???.LZH, created in the
working directory, may manually be renamed to an archive file
(extension LZH).
I. Temporary File Names
========================
LHA finds the first available file name with LHTMPxxx.LZH (where
xxx is a consecutive number between 000 and FFF) in the working
directory to use as a temporary file. It is usually not necessary
to know about this file during normal LHA execution.
5. Self-Extracting Archive File (SFX)
-------------------------------------
General Extraction Format:
<Self-extraction file> [-x] [-!] [-eDIR] [DIR]
/x: do not create new directory.
/!: auto-execution batch enable.
/a: restore file attributes.
[/eDIR],[DIR]; specify directory to extract.
Self-extraction files are executable archive files (with EXE
extension) that extract files within itself when executed. They may
also be extracted using LHA tools. Example of a self-extracting
file is the LHA file that this file was archived in.
LHA is only able to convert archive files created by LHA utility
to a self-extraction file. It is not able to convert archive files
created by LHarc.
Specifying either -x0 and -x1 options creates small model and large
model self-extracting files respectively. LHA self-extracting files
also have the following features:
A. Telop
=========
When files are self-extracted from a LHA archive, file named
'!' is extracted in a memory and its contents is display on a
screen instead of being extracted to a file on a disk. After
displaying the content of a file, user is prompted with [Y/N].
If 'Y' is entered, process is continued. If 'N' is entered,
process is terminated.
B. Directory Specification (effective only when self-extracting
=========================== archive file was created with -x1
option. i.e. large model self-
extraction files.)
Directory where files in a large model self-extracting archive
file are to be extracted may be specified.
< Example 24 >
LHA255.EXE c:\user
Extracts files in self-extracting archive file, LHA255.EXE to
directory C:\USER. Files may also be extracted to a directory
using LHA with the 'e' command:
LHA e -x0 lha255.exe c:\user
C. Auto Execution (effective only when self-extracting
=================== archive file was created with -x1 option.
i.e. large model self-extraction files.)
A batch file named !.BAT in the archive may automatically be
executed after extracting files from large model
self-extraction file by specifying -! option. !.BAT file is
always extracted to the current directory even when extraction
directory is specified. If a file named !.BAT already exists in
the currently directory, it will be over written. Furthermore,
!.BAT must be included in the archive file. A file named !.BAT
in the current directory will not be executed after files are
self-extracted.
There are 2 types of LHA self-extracting files, small and large.
They are created by specifying -x0 and -x1 options when converting
an archive file to a self-extracting format.
a. Small Model (Default)
Creation command format: LHA s -x0 <archive file>
Small model self-extracting files only contains file name
information and do not contain directory information. Even if
archive file to be converted contains directory information,
created self-extracting file will not. Thus, small model self-
extracting files can only be extracted to the current directory.
Furthermore, !.BAT file will not be executed when small model file
is extracted. However, telop files are extracted in memory.
Finally, LHA small model self-extraction file does not have archive
file limitation as is imposed with LHarc.
b. Large Model
Creation command format: LHA s -x1 <archive file>
Large model self-extracting files has an advantage of supporting
all functions described above. Additionally, if archive file that
was converted contained directory information, large model files
creates necessary directories when files are extracted. To stop
directories from being created, specify the -x option when
invoking self-extraction.
6. Compatibility between LHA and LHarc
----------------------------------------
LHA is upward compatible with LHarc but much has been changed.
Followings are only some of the differences between these two
tools and is not a comprehensive list.
Files are not sorted
The major difference between LHA and LHarc is that LHarc sorts
files when creating a new archive file while LHA does not.
To archive file in sorted order, use an utility such as dsort,
ordir, and fd to sort the files in the directory before
archiving them. Files in an archive file may also be sorted
by executing a following command line:
C> dir /b | sort | lha a all
This command archives all files excluding hidden and system
files to ALL.LZH in ascending sorted order.
-x option must be explicitly specified with -r option
-r option is supported to extract files in LHA. Therefore,
-x option is no longer activated with -r option.
Support x command
x command is supported in LHA to create subdirectories and
extract files. x command is equivalent to 'e -x1m1' command.
Self-extraction file changes
LHA executes !.BAT file in the self-extracting file while LHarc
executes AUTOLARC.BAT file. Furthermore, -! option must be used
to execute a batch file, and keyword may not be used in LHA to
stop execution.
Internal date/time convension
LHA keeps track of date/time by recording time difference
measured in seconds between 1970-01-01 00:00:00 UTC and current
date/time. If erroneous date/time is specified, LHA is unable
to record them.
7. Acknowledgments
------------------
Following software were used to develop LHA:
A-MACROS /Structured Assembler Macros, from AMSCLS.INC
(c) Hortense S. Endoh 1986,1987 ver.2.10.
Thank you very much for offering this excellent software.
Furthermore, following software were used to develop LHA ver.2.55:
1. LSI C-86 ver 3.30b by LSI Japan
I was just content that I thought that I was able to contribute to
improvement in data compression algorithm and influence tools such
PKZIP and PAK, but I would like thank people who have further
encouraged me to continue with my research to make this version
possible.
I would like to express my sincere gratitude to Haruhiko
Okumura and members of SIG Science on PCVAN BBS (Japan) for
the assisting in improving compression algorithms.
To K. Miki who provided me with an place to hold a research
in archiving and also for offering an opportunity to introduced
archiver tools to the public.
To K.Okubo who introduced and supported LH113c on overseas
networks such as CompuServe and GEnie.
To the late Irvin Hoff, CP/M sysop Compuserve, who reviewed
the English version for spelling, grammar, and phrasing
correctness while struggling with cancer.
To the members of FHONYAKU forum in Nifty Serve who prepared
the original English LHA manual.
Finally, I would like to offer the deepest gratitude to all
LHarc and LHA users.
8. Distribution
-------------------
LHA may be freely distributed if the following conditions are
obeyed:
1. Copyright notifications must not be altered in any way.
2. All documentation files must be included with the
distribution file.
3. If any modification is made to any of the files, part that
was modified must be explicitly stated with the name and
contact address (Email, street address, or phone number) of
the person who made the modification.
4. Make it apparent that LHA is FREE SOFT.
It is necessary to state this in the program description.
5. If this program is to be mentioned or included in any
publication, it is necessary to state LHA copyright
information.
6. LHA must be distribution on a medium that is not
copyprotected.
If all of the above conditions are satisfied, it is not necessary
and even discouraged to send the author a mail to obtain a
distribution permission.
Lastly, all files have have been compressed (including self-
extraction files) using LHA may be distributed without any
notification.
9. Support
-------------------
LHA is supported in FLABO forum on Nifty Serve BBS (Japan).
To users who do not have accesss to Nifty Serve, support for LHA
is provided by internet E-mail.
Please send all bug report, questions, opinions, suggestions, or
any other comments to:
Haruyasu Yoshizaki SDI00506@niftyserve.or.jp
pcs02846@asciinet.or.jp
FEM12376@pcvan.or.jp
Hitoshi Ozawa h_ozawa@bekkoame.or.jp
homepage: http://www.bekkoame.or.jp/~h_ozawa/
10. References
-------------------
1. Knuth, D.E., "Dynamic Huffman Coding", J.Algorithms, 6:163-180.
2. Kurita, T., "Hard Disk Cook Book", 1987, Shoeisha,Tokyo.
3. Kurita, T., "Tool Box of Computing", Huffman Coding, BIT,
70:100-101,1988.
4. Okumura,K.,Masuyama,K.,Miki,K., "Practice and theory of Data
Compression", The Basic, 70(March):1-65,1989.
5. Fiala,E.R., and Greene,D.H., "Data Compression with Finite Win-
dows", Communication ofACM, 32:490-595,1989.
6. Okumura,H., and Yoshizaki,H., "Introduction to Compression
Algorithm", C Magazine 3:1:44-68,1991.
- end -
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -