[comp.sys.mac] Stuffit 1.31 and binhex

raylau@dasys1.UUCP (Raymond Lau) (01/24/88)

In article <10319@ufcsv.cis.ufl.EDU>, mfi@beach.cis.ufl.edu (Mark Interrante) writes:
> Since so many files are encoded as binhex 4.0, how about incorporating
> 4.0 decoding into stuffit as well as 5.0?
> 
> 
> 
> Mark Interrante                                               CIS Department
>                                                        University of Florida
> Internet:  mfi@beach.cis.ufl.edu                      Gainesville, FL  32611
>                                                               (904) 335-8051

The Encode and Decode functions ARE FOR BINHEX 4.0 .HQX files!

I see no need in supporting 5.0 .Bin files as modern communications prgm
already do .Bin encoding/decoding for you...

--
Raymond Lau                       GEnie: RayLau
100-04 70 Ave.                    CIS: 76174,2617
Forest Hills, NY 11375-5133       Delphi: RaymondLau
United States of America          MacNET: RayLau
uucp: raylau@dasys1.UUCP (..{phri,cucard,bc-cis,mstan}!dasys1!raylau})

raylau@dasys1.UUCP (Raymond Lau) (01/29/88)

In article <1988Jan26.152649.160@mntgfx.mentor.com>, tomc@mntgfx.mentor.com (Tom Carstensen) writes:
> In article <2689@dasys1.UUCP>, raylau@dasys1.UUCP (Raymond Lau) writes:
> > In article <10319@ufcsv.cis.ufl.EDU>, mfi@beach.cis.ufl.edu (Mark Interrante) writes:
> > > Since so many files are encoded as binhex 4.0, how about incorporating
> > > 4.0 decoding into stuffit as well as 5.0?
> > 
> > The Encode and Decode functions ARE FOR BINHEX 4.0 .HQX files!
> > 
> > I see no need in supporting 5.0 .Bin files as modern communications prgm
> > already do .Bin encoding/decoding for you...
> > 
> 
> What do you mean by "modern communications prgm already do .." ?
> 
> BinHex 5.0 needed for GEnis files, and I have to use BinHex 5.0 decode
> them so why not include it also - and make StuffIt a complete program?
> 
> :------------------------------------------------------------:
> : Tom Carstensen              Usenet: tomc@mntgfx.MENTOR.COM :
> : Mentor Graphics             GEnie:  XPC23637               :

Sir!  You are mistaken...  Any modern communications program, for example,
Red Ryder, MicroPhone, Smartcom, VersaTerm, VersaTerm Pro...some DAs like
MockTerm, ASLTalk...they all decode files downloaded from CIS, from GEnie,
Delphi, BBSs etc...making BinHex5 an unneeded step.  They all also auto-
encode on uploading.....again, making BinHex5 unneccessary.

Some of them (RR, VersaTerm, MicroPhone) include an OPTION to SHUT OFF
auto-decoding...  This option is usu. something like "Recognize MacBinary
files" and can be toggled on and off.  If you do not have auto-decoding,
you probably have such an option off.

Either that or you have a WAY outdated program.  MacBinary has been with us
since around mid 85 or thereabouts!

Thus, my justification for leaving out BinHex5 encoding/decoding...
It's deceptive to call BinHex5 binhex...as it really encodes/decodes MacBinary
files...  BinHex4 is the "true" BinHex...supporting .Hqx files.

--
Raymond Lau                       GEnie: RayLau
100-04 70 Ave.                    CIS: 76174,2617
Forest Hills, NY 11375-5133       Delphi: RaymondLau
United States of America          MacNET: RayLau
uucp: raylau@dasys1.UUCP (..{phri,cucard,bc-cis,mstan}!dasys1!raylau})

wenn@K.GP.CS.CMU.EDU (John Wenn) (01/30/88)

There is one improvement BinHex5 has that BinHex4 (and Stuff_It 1.31) do not.
BinHex5 will ignore all "header" material in a file and begin decoding at the
appropriate place.  BinHex4 and Stuff_It will NOT decode a file with extra
headers, complaining about "CRC Error".

I would just love it if Stuff_It ignored the extra headers.  All the stuff I
download from Usenet has them, and it's a pain to remove them.  Also the
headers usually provide minimal documentation.  How about it?  Next release?

/John

stuffedandhexedtodeath-ly

raylau@dasys1.UUCP (Raymond Lau) (01/31/88)

In article <763@PT.CS.CMU.EDU>, wenn@K.GP.CS.CMU.EDU (John Wenn) writes:
> There is one improvement BinHex5 has that BinHex4 (and Stuff_It 1.31) do not.
> BinHex5 will ignore all "header" material in a file and begin decoding at the
> appropriate place.  BinHex4 and Stuff_It will NOT decode a file with extra
> headers, complaining about "CRC Error".
> 
> I would just love it if Stuff_It ignored the extra headers.  All the stuff I
> download from Usenet has them, and it's a pain to remove them.  Also the
> headers usually provide minimal documentation.  How about it?  Next release?
> 
> /John
> 
> stuffedandhexedtodeath-ly


I'd love to put that in...!  According to the .Hqx format notes which I have,
encoding and decoding starts at the first colon.  But alas, msg. headers have
colons in them.

So, anyone care to enlighten me as to a technique of skipping over msg.
headers?  I've drawn a blank with this one..

--
Raymond Lau                       GEnie: RayLau
100-04 70 Ave.                    CIS: 76174,2617
Forest Hills, NY 11375-5133       Delphi: RaymondLau
United States of America          MacNET: RayLau
uucp: raylau@dasys1.UUCP (..{phri,cucard,bc-cis,mstan}!dasys1!raylau})

mo@well.UUCP (Maurice Weitman) (02/01/88)

In article <2794@dasys1.UUCP> raylau@dasys1.UUCP (Raymond Lau) writes:
>So, anyone care to enlighten me as to a technique of skipping over msg.
>headers?  I've drawn a blank with this one..
>
At the risk of being simplistic, isn't the colon denoting the
first line of valid data always in column 1, while header colons
never are?

(Thanks for Stuffit, Ray.)

-- 
Maurice Weitman           ..!{dual,hplabs,lll-crg,ptsfa,glacier}!well!mo
 | <- this is not a pipe  1634 Walnut  Berkeley, CA  94709  (415)549-0280
Quote:  "If we're not listening, we'd have to be pretty blind." J-L Gassee   
Disclaimer:  Any errors in spelling, tact or fact are transmission errors.

keeshu@nikhefk.UUCP (Kees Huyser) (02/01/88)

In article <2794@dasys1.UUCP> raylau@dasys1.UUCP (Raymond Lau) writes:
#I'd love to put that in...!  According to the .Hqx format notes which I have,
#encoding and decoding starts at the first colon.  But alas, msg. headers have
#colons in them.
#
#So, anyone care to enlighten me as to a technique of skipping over msg.
#headers?  I've drawn a blank with this one..
#
#--
#Raymond Lau                       GEnie: RayLau

Raymond,
You could have StuffIt look for the first colon after the line that
starts with :

(This file must be converted with BinHex 4.0)

:THISISABINHEXEDFILEWITHALLSORTSOFUNREADABLESTUFF....

This way you are always sure you start at the beginning of the .hqx 
file.

-- Kees
| UUCP   : keeshu@nikhefk.uucp  or {[wherever]!uunet}!mcvax!nikhefk!keeshu
| BITNET : keeshu@hasara5.bitnet
| FIDO   : Kees Huyser @ 2:508/15 (Opus_MacSaga)
| SNAIL  : Kees Huyser, NIKHEF-K, PO Box 4395, 1009 AJ Amsterdam, Netherlands
+-----------------------------------------------------------------------------

denbeste@bgsuvax.UUCP (William C. DenBesten) (02/02/88)

In article <2794@dasys1.UUCP> raylau@dasys1.UUCP (Raymond Lau) writes:
>
> So, anyone care to enlighten me as to a technique of skipping over msg.
> headers?  I've drawn a blank with this one..

From article <5123@well.UUCP>, by mo@well.UUCP (Maurice Weitman):
>
> At the risk of being simplistic, isn't the colon denoting the
> first line of valid data always in column 1, while header colons
> never are?

In addition each valid line is 64 characters long (except the last
one) and contains only the 64 valid binhex characters.  White space is
invalid, so you can pretty much count on headers being ignored, since
they always have a space after the colon or begin with a space
(continuation lines).

A slick method of decoding would be to ignore any lines that don't fit
these criteria.  If you get a CRC error, then display the discarded lines to
the user, so that they have a chance to figure out what the problem is.
This would allow multiple parts to be processed together.

> (Thanks for Stuffit, Ray.)

---
          William C. DenBesten | CSNET denbeste@research1.bgsu.edu
      Dept of Computer Science | UUCP  ...!cbosgd!osu-cis!bgsuvax!denbeste
Bowling Green State University |
  Bowling Green, OH 43403-0214 |

macman@ethz.UUCP (ETH Macintosh BBS) (02/02/88)

Ray,

To check for the beginning of a BinHex 4.0 part, check for 2 carriage
returns followed by a colon. UUCP adds two CRs only at the end of its
header, and I have never seen a user starting his text contribution
with a colon.

Danny Schwendener

ETH Macintosh BBS
Swiss Federal Institute of Technology ETHZ

macman@ethz.uucp
macman@czeth5a.bitnet
macman@rzeth.ethz.ch

dalea@cerebus.UUCP (Dale M. Arends X5706) (02/03/88)

In article <305@nikhefk.UUCP> keeshu@nikhefk.UUCP (Kees Huyser) writes:
[Stuff deleted about putting intelligence into Stuffit]
>
>Raymond,
>You could have StuffIt look for the first colon after the line that
>starts with :
>
>(This file must be converted with BinHex 4.0)
>
>:THISISABINHEXEDFILEWITHALLSORTSOFUNREADABLESTUFF....
>
>This way you are always sure you start at the beginning of the .hqx 
>file.
>
>-- Kees

NO!  Ray, please don't do that!  Except for the mandatory colons to denote
the start and end of the encoded section, there should not be any literal
matching.  If this were done, then the header (or leading lines) would have
to match.  This would then define a new file format, i.e. one with a specific
line of text followed by characters enclosed between colons.

Also, to expect that the starting colon will ALWAYS be in column one reduces
the convenience of StuffIt since it requires that the CR/LF pair (on UNIX)
be replaced with a CR (on Mac) prior to decoding.  While several terminal
programs do this, being able to work either way is, in my mind, a definite
plus.

I admit that I have it somewhat easier than some since out news software
allows saving a posting without the news headers.

My point here is that to incorporate limits within the program to solve 
specific, non-universal problems will limit the general flexibility of a
fine program.

P.S.  I am running 1.30, so if you have a spare copy of 1.31 (or later, I'll
be a beta site if you need one (hint..hint)) ... :-)


-- 
--
		Dale M. Arends  (Fujitsu America Inc., San Jose, Calif.)
		{...}!amdahl!cerebus!dalea

The opinions expressed herein do not necessarily reflect those of my employer.
They are entirely my own if they make sense and I disavow them if they don't.