Category : Utilities for DOS and Windows Machines
Archive   : UNARJ230.ZIP
Filename : UNARJ.DOC

Output of file : UNARJ.DOC contained in archive : UNARJ230.ZIP

UNARJ.DOC, UNARJ 2.30 January 1992

UNARJ software and manual copyright (c) 1991-92 by Robert K Jung.
All rights reserved.

UNARJ version 2.30 release

This documents new or updated information since UNARJ 2.10.

** IMPORTANT NEWS ****************************************************

There is a newly defined flag bit in the ARJ flags. See TECHNOTE.DOC
for details. UNARJ only supports this flag bit with the "l" command.

There is an extended header bug in older versions of ARJ, AV.C and
UNARJ.C. The extended header processing in read_header() should skip
4 bytes for the extended header CRC and not 2 bytes. This is NOT a
current problem as no versions of ARJ use the extended header.

The following source line in DECODE.C is AMBIGUOUS and has been

weight[i++] = 1 << (16 - i);


Here is the C source code for a simple UNARJ extractor program. It
has been portabilized courtesy of Mark Adler for platforms that do not
support ANSI C. This UNARJ is NOT meant for use as a production
quality ARJ extractor. It is meant for the use of 3rd party
developers who want to build file readers, etc, for ARJ. The UNARJ
source code has been built and tested under Turbo C++ 1.0, Quick C
2.5, and Coherent 3.2.0.

It has none of the program protection and other fancy features of
ARJ 2.30. It is also VERY SLOW compared to ARJ!!! In ARJ, all of
the critical routines are written in assembly language.


UNARJ has been modified to support the four commands: "e", "l", "t",
and "x". These are similar to the ARJ version of these commands.
However, UNARJ does not create directories when using the "x" command.

Usage: UNARJ archive[.arj] (list archive)
UNARJ e archive (extract archive)
UNARJ l archive (list archive)
UNARJ t archive (test archive)
UNARJ x archive (extract with pathnames)

UNARJ does not accept any other commands or options. You cannot
specify a base directory or select individual files to extract. UNARJ
does not support empty directories or volume labels. UNARJ is much
slower than ARJ because ARJ is highly optimized using assembly

"e" extract command

This command extracts the contents of the ARJ archive to the current
directory. Files in the archive that already exist in the current
directory will not be extracted.

"l" list command

This command lists the contents of the archive to the screen. The
UNARJ l command replaces the old AV.EXE program.

The last field on the display BTPMGVX stands for:
B -> file has been marked as a backup
T -> text/binary/directory/volume label type
P -> path information available in "V" listing
M -> compression method used
G -> file has been garbled (encrypted)
V -> archive has been continued to another volume
X -> this file is an extended portion of a larger file

"t" test command

This command tests the contents of the archive by extracting the files
to the NUL device (no data will be written to disk). If the contents
of a file is corrupted, UNARJ will display "CRC error!". If the
contents are valid, UNARJ will display "CRC OK".

You can use this command to see if an archive contains pathnames.

"x" extract with pathnames command

This command extracts the contents of the ARJ archive to the pathnames
stored in the archive. If only filespecs are stored in the archive,
then the files will be extracted to the current directory. UNARJ will
not create missing directories in the pathnames. You must create them
manually. Use the UNARJ t command to see the full pathnames stored in
the archive.


UNARJ uses a small spinning bar to indicate extraction/testing
progress. For some systems that have buffered output, the
progress indicator may not work.



For Turbo C/C++, type MAKE /ftccunarj.mak

For QuickC, type NMAKE /F qclunarj.mak

For OS/2, type NMAKE /F os2unarj.mak

For Coherent, type
cc -DUNIX -DCOHERENT -o unarj unarj.c decode.c environ.c

For UNIX type cc -DUNIX -o unarj unarj.c decode.c environ.c

If you use a compiler other than listed above, the resulting UNARJ.EXE
will not support restoring file date-time stamps. You can modify the
ENVIRON.C file to add these functions for your particular
implementation environment.

If you send me your implementations, I will try to incorporate them
into the next version of UNARJ.


I wish to thank Haruhiko Okumura for providing the ideas for ARJ and
UNARJ. His AR001 and AR002 provided the basic compression algorithms
for ARJ 1.0. At ARJ 2.0, ARJ uses only the secondary Huffman
compressor from AR002.

I wish to thank Mark Adler for helping make UNARJ more portable.

I also wish to acknowledge the use of the file date-time stamping
routines in Rahul Dhesi's ZOO archiver.

And to those who have contributed bug reports and porting
information, I extend my thanks.


The UNARJ program, source code, and the associated documentation
are copyright (c) 1990-92 Robert K Jung, all rights reserved.

If you distribute this software to others, you are required to
distribute the ENTIRE package consisting of the following files:


I strongly prefer that the files be distributed in the format
originally released: UNARJ230.EXE with the ARJ-SECURITY envelope as
created by the author. If you must distribute the UNARJ archive in
another archive format, please archive the UNARJ230.EXE as one file
inside the other archive. Re-archival of the software as separate
files means losing the ARJ security envelope.

You may freely use the UNARJ C source code provided the end product is
NOT an ARJ archiver (both compress and extract ARJ files). If you
wish to distribute a modified version of UNARJ.EXE, you MUST indicate
that it is a modified version both in the program and source code.

If you create a modified version of UNARJ.EXE, I would appreciate a
copy of the new source code. I am holding the copyright on the source
code, so please do not delete my name from the program files or the

The UNARJ.EXE program is built from this source using Turbo C++ 1.0.

You may freely use, copy, and distribute UNARJ.EXE, provided that no
fee is charged for such use, copying or distribution.

You may use UNARJ.EXE in a commercial software package provided that
no additional fee is charged for using UNARJ.EXE and provided that the
user fully understands that NO warranty or support is provided for
UNARJ.EXE. Moreover, the user must fully understand that UNARJ does
not have the long usage history as ARJ does.

This source code is intended to promote the building of utilities to
support the use of ARJ and ARJ archives.


Please report any bugs. I will TRY to fix them. If you have
portability improvements, I would appreciate receiving a copy of them.

If you find UNARJ of value, a gift of 10 dollars or any amount would be
greatly appreciated.

I can be reached at:

Robert Jung at Channel One BBS (617) 354-8873

Robert Jung at Bay State BBS (617) 598-6646

Robert Jung at FIDONET address: 1:16/390.7


2606 Village Road West
Norwood, Massachusetts 02062

Internet address: [email protected] (Checked daily)

Compuserve users can enter >INTERNET: [email protected]
at the "Send to" prompt. I prefer CompuServe users to send mail
to this address as opposed to my CompuServe userid below.

CompuServe userid: 72077,445 (Checked infrequently)


This software UNARJ is provided on an "as is" basis without warranty
of any kind, expressed or implied, including but not limited to the
implied warranties of merchantability and fitness for a particular
purpose. The person using the software bears all risk as to the
quality and performance of the software. Should the software prove
defective, the user assumes the entire cost of all necessary repair,
servicing, or correction. The author will not be liable for any
special, incidental, consequential, indirect or similar damages due to
loss of data or any other reason, even if the author or an agent of
the author has been advised of the possibility of such damages.


UNARJ 2.30 - Added new header arj flag (BACKUP_FLAG).
Updated information in TECHNOTE.DOC.

UNARJ 2.22 - Added missing semicolon to unarj.c for THINK_C.
Modified text mode processing to include test for
host_os in fwrite_txt_crc().
Added more error checking to unarj.c.

UNARJ 2.21 - Changed uint ratio() to static uint ratio().
Added #ifdef VMS to unarj.c.
Tested unarj on COHERENT (UNIX clone).
Fixed use of _chmod to handle directories.
Modified unarj.c to support the MAC THINK_C compiler.
Added #include to vanilla section of environ.c.
Added file date-time stamping to UNIX section of environ.c.

UNARJ 2.20 - Changed arguments in get_mode_str() and set_ftime_mode() to
at least int size.

Added default_case_path() for convenience in UNIX.

Added two missing %c from printf statement in list_arc().

end document

  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : UNARJ230.ZIP
Filename : UNARJ.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: