[comp.sys.apollo] File Compression on Mentor Graphics Files

rtaylor@tron.UUCP (Randy Taylor) (02/26/91)

Does anyone out there have a file compressor package that works with
Mentor Graphics files ?

I have tried the ARC package and UNIX compress with no success. The problem
with them is that they both decompress the files into type "unstruct"
instead of types "hdru" or "rec", as appropriate. This makes the 
decompressed files unuseable by Mentor Graphics software packages.

Thanks in advance for any help provided.


Randy Taylor
Westinghouse Electric Corp.
Baltimore, Maryland  
-- 
rtaylor@sky00.bwi.wec.com  from an Internet site (preferred) 
rtaylor@tron.bwi.wec.com   from an Internet site (alternate)

"...you know I have the greatest enthusiam for the mission." HAL 9000

rees@pisa.ifs.umich.edu (Jim Rees) (02/26/91)

In article <707@tron.UUCP>, rtaylor@tron.UUCP (Randy Taylor) writes:
  
  Does anyone out there have a file compressor package that works with
  Mentor Graphics files ?

My former colleagues may be offended at this suggestion, but you could use
'obty' to change the files to unstruct, then compress them.  After you
restore them change them back to the original type the same way.

turner@smart.sps.mot.com (Robert Turner) (02/26/91)

In-Reply-To: <707@tron.UUCP>
Organization: Semiconductor Systems Design Technology, Motorola, Tempe AZ
Cc: 

In article <707@tron.UUCP> you write:
>
>Does anyone out there have a file compressor package that works with
>Mentor Graphics files ?
>
>I have tried the ARC package and UNIX compress with no success. The problem
>with them is that they both decompress the files into type "unstruct"
>instead of types "hdru" or "rec", as appropriate. This makes the 
>decompressed files unuseable by Mentor Graphics software packages.
>
wbak the file first.  wbak will hang onto the file types for you.
If you use tar be sure to use the "-A" option.

Robert

P.S. your email bounced. sorry to post it.


-- 
Robert Turner (602) 897-5441 Semiconductor Systems Design Technology, Motorola
turner@dover.sps.mot.com   OR   ...!uunet!dover!turner
"Most Americans do not know or appreciate the fact that citizenship is the
primary political office under a constitutional government."  Mortimer Adler

thompson@PAN.SSEC.HONEYWELL.COM (John Thompson) (02/26/91)

> <<forwarded message>>
> Does anyone out there have a file compressor package that works with
> Mentor Graphics files ?
> 
> I have tried the ARC package and UNIX compress with no success. The problem
> with them is that they both decompress the files into type "unstruct"
> instead of types "hdru" or "rec", as appropriate. This makes the 
> decompressed files unuseable by Mentor Graphics software packages.

No, but I could string together a couple of commands.  Basically, you probably
want to tar/wbak the Mentor directory (since many Mentor objects are dirs, that
might be best anyway), and then compress that w/ your favorite compressor.  The
uncompress would uncompress and then de-tar/rbak the objects.  Note that this
works on non-Mentor objects as well as Mentor ones, and keeps entire directories
together in one file.  (You might want to remove the automatic deletion).
Incidentally, I quick wrote these.  They are not exhaustively tested, and they
tend to assume that nothing too bad will happen.  You probably want to modify 
them at least slightly.  In the one test I made, I compressed each directory in
the Mentor mil_ls_lib parts library.  The compression achived was about 200%


E.G.:
mentor_crunch:
    #!/com/sh
    eon
    abtsev -e
    for PATHNAME in ^* by word
      /com/ld -c -lf -ld -ent ^PATHNAME                           | @
      while readln ONEPATH do
        DEST := ^ONEPATH + ".Z"
        if /com/wbak -full -nhi ^ONEPATH -stdout >?/dev/null      | @
                                   /usr/ucb/compress -f > ^DEST then
          /com/args "^ONEPATH compressed to ^ONEPATH.Z"
          /com/dlt ^ONEPATH -f -du
        else
          /com/args -err "?(^0) - Unable to perform wbak/compress on ^ONEPATH"
        endif
      enddo
    endfor
mentor_uncrunch:
    #!/com/sh
    eon
    abtsev -e
    for PATHNAME in ^* by word
      /com/ld -c -lf -ld -ent ^PATHNAME             | @
      while readln ONEPATH do
        DEST := ^"/com/args ^ONEPATH | /com/chpat {?*}.Z @1"
        if /usr/ucb/uncompress ^ONEPATH -c          | @
              /com/rbak -stdin -pdt -sacl -all >/dev/null >?/dev/null then
          /com/args "^ONEPATH uncompressed to ^DEST"
          /com/dlf ^ONEPATH -f -du
        else
          /com/args -err "?(^0) - Unable to perform uncompress/rbak on ^ONEPATH"
        endif
      enddo
    endfor


Hope these either work for you, or give you the hint that you need....

-- jt --
John Thompson
Honeywell, SSEC
Plymouth, MN  55441
thompson@pan.ssec.honeywell.com

Me?  Represent Honeywell?  You've GOT to be kidding!!!

scott@labtam.labtam.oz (Scott Colwell) (02/26/91)

rtaylor@tron.UUCP (Randy Taylor) writes:
>Does anyone out there have a file compressor package that works with
>Mentor Graphics files ?
>....... The problem
>with them is that they both decompress the files into type "unstruct"
>instead of types "hdru" or "rec", as appropriate. This makes the 
>decompressed files unuseable by Mentor Graphics software packages.

Try

$ wbak blah..blah.. -stdout | compress

Don't try tar or cpio because Mentor use symbolic links where the
value of the symbolic link is not the actual file but is the version
number that must be appended to the name of the link.  When tar or cpio
try to stat the file through the symbolic link, it gets an error and does
not include the link in the archive.
-- 
Scott Colwell
Senior Design Engineer
Labtam Australia		net:	scott@labtam.oz.au
Melbourne, Australia 		phone:	+61-3-587-1444