From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b37ee187e035b961 X-Google-Attributes: gid103376,public From: Markus Kuhn Subject: Re: LZW Date: 1998/02/20 Message-ID: <34ED83B2.49176D99@cl.cam.ac.uk>#1/1 X-Deja-AN: 326924590 Content-Transfer-Encoding: 7bit References: <6ca326$f0g$1@news4.isdnet.net> <34ea2f93.1444559@news.onramp.net> <6cga98$lmv$1@news3.isdnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Cambridge University, Computer Laboratory Newsgroups: comp.lang.ada Date: 1998-02-20T00:00:00+00:00 List-Id: Vicious wrote: > I've not found any clean port of LZW in ADA. > So can you send me please the result of your C to ADA translation? I think, the best approach is to use an off-the-shelf high-quality compression library in C such as the GNU zlib available from the usual archives and call it using Ada95's standardized C interfacing capabilities. If you are working in a project where there is some "pure Ada" mandate that does not even allow to reuse high-quality reusable widely-available C components, then your bosses have something thoroughly missunderstood about how to use Ada95 effectively in a project. A reasonable mandate that you have to write your own new code in Ada95 should never ban you from including existing C libraries. Note that GNAT uses libc in the runtime library and that there exist many useful C libraries out there (for JPEG compression, LZW compression, bignum arithmetic, encryption, etc.) that contain highly optimized assembler parts for quite some architectures, etc. Given the excellent C interfacing capabilities that Ada has, it would be a tremendous waste to reimplement these just tohave them in Ada to fullfil some braindamaged pure-Ada requirement. Use Ada intelligently to get your project done quickly and do not waste time to fulfill a silly mandatory buerocratic doctrine by recoding existing highly optimized C code into Ada. It would be useful to write Ada95 wrappers for many of the popular C libraries available from the GNU project and others. Markus -- Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK email: mkuhn at acm.org, home page: