Re: Translating RAD-50 code
- From: Ric <antispam@xxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 12:26:56 +0100
Isn't this suitable for you?
http://search.cpan.org/~wyant/Encode-RAD50-0.004/lib/Encode/RAD50.pm
Ferry Bolhar schrieb:
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
- References:
- Translating RAD-50 code
- From: Ferry Bolhar
- Translating RAD-50 code
- Prev by Date: Translating RAD-50 code
- Next by Date: Re: Translating RAD-50 code
- Previous by thread: Translating RAD-50 code
- Next by thread: Re: Translating RAD-50 code
- Index(es):