[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

582.0. "HEX/deHEX utility?" by ILO::LENIHAN (John Lenihan 353-91-25128) Thu Oct 15 1987 09:35

T.RTitleUserPersonal
Name
DateLines
582.1CASEE::VANDENHEUVELHein, Valbonne.Fri Oct 16 1987 07:2615
    What problem exactly are you trying to solve? Surely you
    don't ask this just for the fun of it right? Knowing the
    underlying problem someone might be able to suggest a
    better solution. I can only assume you need this to transfer
    a binary file over a simplistic carrier that only supports
    ascii numbers? Did you check alternative transmit methods?
    Different options?
    If I were to make this, and if I had to support various 
    file organization, then I would check out Martin Minows
    COMPRESS/EXPANDS tool from the toolshed, rip out the
    compression itself and replace it be OTS$CVT routines to 
    do the BINARY - HEX translations.
    
    Cheerio,
            Hein.
582.2ILO::LENIHANJohn Lenihan 353-91-25128Fri Oct 16 1987 09:295
582.3Here's howMAY20::MINOWJe suis marxiste, tendance GrouchoFri Oct 16 1987 13:2728
The best solution I've found is as follows:

1. Use LZCOMP to compress the file (only if it's a large file or you
   need to preserve the attributes for a VMS-VMS copy).  LZCOMP
   is available from the toolshed.

2. Use BTOA.C to convert the binary file into a "mailable" text file.
   BTOA also computes some checksums.

3. Copy the file to the remote system.

4. Use ATOB.C to convert the text file to its correct form.

5. If necessary, use LZDCMP to decompress the file.

Sources to all of the above are availabe in BOLT::DECUSC$LIBRARY:[TOOLS]:
	LZ*.*		LZCOMP and LZDCMP
	ATOB.C
	BTOA.C

Note: If you are copying from VMS to Unix, make sure you set the
"export" option on LZCOMP.  LZDCMP can be run on Unix, or you can
use Unix compress.

For text files, the combination of LZCOMP followed by BTOA is usually
slightly smaller than the original file.

Martin.
582.4bingo!ILO::LENIHANJohn Lenihan 353-91-25128Fri Oct 16 1987 14:416