Translating RAD-50 code
- From: "Ferry Bolhar" <bol@xxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 12:22:49 +0100
Hi @ all,
I have files containing data encoded in RAD-50 format.
In this format, 3 characters (A-Z, 0-9, $, ., _, and blank
are stored in 2 bytes (so that each character is coded in
around 5 bits).
I have to read these files, process them and write out the
results again in RAD-50.
On the system, there is a shared library (under Linux, it
would be a .so, but it's VMS, so it's a .EXE), providing
routines to convert RAD-50 to ASCII and ASCII to
RAD-50.
Of course, I could write XS code containing two functions
to perform these conversions, place the XS code in a
module and load it using DynaLoader while use'ing it.
But I think this would be a perfect opportunity for an
IO-layer, so I (and others!) could simply write
open IN,'<:rad50',$input_file;
open OUT,'>:rad50',$output_file;
So my question is: is there documentation how to write
IO layers in XS? Some examples, guidelines?
MTIA for your answers, and kind greetings from Vienna
Ferry
--
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@xxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Translating RAD-50 code
- From: Ben Morrow
- Re: Translating RAD-50 code
- From: Ric
- Re: Translating RAD-50 code
- Prev by Date: Re: Help improving IO::Socket script response
- Next by Date: Re: Translating RAD-50 code
- Previous by thread: FAQ 3.3 Is there a Perl shell?
- Next by thread: Re: Translating RAD-50 code
- Index(es):