Binhex 4.0 Converter

Answer: Files which are given the.HQX extension are known as Macintosh BinHex 4.0 Encoded files, however other file types may also use this extension. If you are aware of any additional file formats that use the HQX extension, please let us know. ESoftTools EDB to PST Converter (1) - To recover the Corrupted EDB file database eSoftTools designed a tool known as EDB to PST Converter Software that effortlessly retrieves the lost database from an inaccessible EDB file and Extract the data like emails, contacts, chats, tasks, notes, journals, appointments, and other items to multiple file formats such as PST, EML, EMLX, MSG, and HTML.

Answer: Files which are given the.HQX extension are known as Macintosh BinHex 4.0 Encoded files, however other file types may also use this extension. If you are aware of any additional file formats that use the HQX extension, please let us know.

Click here to bookmark the file format description or

HQX files have been initially created for Apple Mac computers. The data inside the file has undergone compression as well as encoding, resulting in a 7-bit text instead of a 8-bit binary format. The encoding is done using the BinHex 4.0 encoding mechanism. These kinds of files are typically used for file transfer of binary files like documents, images or other multimedia attachments when sending an e-mail. They are used for different means of file transfer on the internet as well.

Technical details of HQX files

Binhex 4.0 converter vs

HQX files are text files that range from binary to hexadecimal. While BinHex 4.0 is used for encoding in HQX files, RLE is used for the compression. What makes HQX files predestined for file downloads on the internet or sending e-mail attachments is the fact that they couple combine both data and resource fork of the Mac file system to form only one archive. Files with the HQX extension are significantly bigger than the original binary files they were made out of. However, they are not as vulnerable to corruption during the transfer as the original binary files are.

Binhex 4.0 converters

More information about the HQX file format

File extension.hqx
File categoryMisc
Associated programsApple Archive Utility
Corel WinZip 18.5
ESTsoft ALZip
Incredible Bee Archiver
Smith Micro StuffIt Deluxe
Useful linksMore information about BinHex 4 and HQX
DeveloperYves Lempereur
Published on July 17th, 2005

Hqx File

Summary

Binhex 4.0 Converter Software

Credit:

‘The information has been provided by RoD hEDoR.’


Details

‘This utility converts Mac Bin Hex files (8-bit) to BinHex format (7-bit) and is similar to uuencode. BinHex is based on a UNIX program with the same name and function (http://www.natural-innovations.com/binhex/).

Binhex 4.0 converter free

The original tool was a series of small programs (8to6, crc, etc.) piped together and run by a shell script. This is a completely rewrite as a C program (speeding it up considerably, needless to say), with an added run-length compression, and bullet-proofed (at least partly).

Source Code:
/* bin hex — bin hex aufs files
*
* if called binhex handles aufs files, if called unxbin handles
*.{rsrc,data,info} files
* will process multiple files
*
* RoD hEDoR, rodhedor at yahoo
*
* This is a hacked version of…
*
* unxbin — convert files generated by xbin or macget into BinHex 4.0
format.
*
* rod hedor, web http://lezr.com
*
* (c) master hictor >>>> libya
* may be used but not sold without permission
*
* This is based on a Unix(tm) program with the same name and function
written
* by ????. Original was a series of small programs (8to6, crc, etc.) piped
* together and run by a shell script. I completely rewrote the system as a
* C program (speeding it up considerably, needless to say), added run-length
* compression, and bullet-proofed (at least partly) the thing.
Unfortunately,
* I have lost the name of the original poster (to net.sources.mac) without
* whom this would never have appeared.
*
* created dbg 01/06/2005 — Version 1.0
*/

*/

#include <stdio.h>
#include ‘aufs.h’

Binhex 4.0 Converter Pdf

#ifdef VMS
# define PROGRAMNAME ‘unxbin’
# define EXIT_ERROR ((1 << 28) | 2)
# ifndef MAXNAMLEN
# define MAXNAMLEN 127
# define MAXBASENAME 63
# endif
#else
# include <sys/types.h>
# include <sys/dir.h>
# define PROGRAMNAME (argv[0])
# define AUFSNAME ‘binhex’
# define EXIT_ERROR 1
# ifndef MAXNAMLEN
# ifdef DIRSIZ
# define MAXNAMLEN DIRSIZ
# else
# define MAXNAMLEN 14
# endif
# endif
# define MAXBASENAME (MAXNAMLEN – 2)
#endif

extern char *sprintf(), *strrchr();
extern void aufs_gethead(), gethead(), fakehead(), make_buffer_crc(),
make_file_crc(),
putchar_run();

Open Hqx File

main(argc, argv)
int argc;
register char *argv[];
{
register FILE *rsrc, *data, *info;
char fbuf[256], infobuf[128];
register char *file;
int aufs;
int i;
FinderInfo fndr_info;

aufs = strcmp(PROGRAMNAME, AUFSNAME) 0;

if (argc < 2)
{
fprintf(stderr, ‘Usage: %s file(s)n’, PROGRAMNAME);
exit(EXIT_ERROR);
}

for(i = 1; i < argc; i++)
{
#ifdef VMS
if ((file = strrchr(argv[i], ‘]’)) NULL)
file = strrchr(argv[i], ‘:’);
#else
file = strrchr(argv[i], ‘/’);
#endif
if (file)
file++;
else
file = argv[i];
if (strlen(file) > MAXBASENAME)
file[MAXBASENAME] = ‘’;
file = argv[i];
(void) sprintf(fbuf, aufs ? ‘.resource/%s’ : ‘%s.rsrc’, file);
fbuf[MAXNAMLEN] = ‘’;
rsrc = fopen(fbuf, ‘r’);
(void) sprintf(fbuf, aufs ? ‘%s’ : ‘%s.data’, file);
fbuf[MAXNAMLEN] = ‘’;
data = fopen(fbuf, ‘r’);
if (rsrc NULL && data NULL)
{
fprintf(stderr, ‘No resource or data forks for %sn’, argv[i]);
exit(EXIT_ERROR);
}
if (rsrc NULL)
fprintf(stderr, ‘Warning: no resource file %sn’, fbuf);
if (data NULL)
fprintf(stderr, ‘Warning: no data file %sn’, fbuf);
(void) sprintf(fbuf, aufs ? ‘.finderinfo/%s’ : ‘%s.info’, file);
fbuf[MAXNAMLEN] = ‘’;
info = fopen(fbuf, ‘r’);
if (info NULL)
fprintf(stderr, ‘Warning: no info file %sn’, fbuf);

if(aufs)
{ /* make the .finderinfo file */
FILE *oinfo;

4.0

sprintf(fbuf, ‘.finderinfo/%s.Hqx’, file);
if((oinfo = fopen(fbuf, ‘w’)) NULL)
{ perror(fbuf);
exit(1);
}
bzero(&fndr_info, sizeof(FinderInfo));
bcopy(‘TEXT’, &fndr_info.fndr_type, 4);
bcopy(‘BnHq’, &fndr_info.fndr_creator, 4);
fndr_info.fi_magic1 = FI_MAGIC1;
fndr_info.fi_version = FI_VERSION;
fndr_info.fi_magic = FI_MAGIC;
fndr_info.fi_bitmap = FI_BM_MACINTOSHFILENAME;
strcpy(fndr_info.fi_macfilename, file);
fwrite(&fndr_info, sizeof(FinderInfo), 1, oinfo);
fclose(oinfo);
}

(void) sprintf(fbuf, ‘%s.Hqx’, file);
fbuf[MAXNAMLEN] = ‘’;
if (freopen(fbuf, ‘w’, stdout) NULL)
{
fputs(‘Couldn’t open output file.n’, stderr);
exit(EXIT_ERROR);
}
fputs(‘(This file must be converted with BinHex 4.0)n:’, stdout);
if (info != NULL)
{ if(aufs)
{ (void) fread(&fndr_info, sizeof(FinderInfo), 1, info);
(void) fclose(info);
aufs_gethead(&fndr_info, data, rsrc, infobuf);
}
else
{ (void) fread(fbuf, 128, 1, info);
(void) fclose(info);
gethead(fbuf, infobuf);
}
}
else
fakehead(file, rsrc, data, infobuf);
make_buffer_crc(infobuf, 20 + infobuf[0]);
make_file_crc(data);
if (data != NULL)
(void) fclose(data);
make_file_crc(rsrc);
if (rsrc != NULL)
(void) fclose(rsrc);
putchar_run(EOF);
puts(‘:’);
}
(void) fclose(stdout);
}’

Comments are closed.