Reed-Solomon algorithm

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Reed-Solomon algorithm

duilio foschi
can somebody point me to the algorithm above written in Pascal ?

As an alternative, can somebody point me to the algorithm above
written in some DLL I could use from FPC ?

Thank you

Peppe Polpo
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

Sandro Cumerlato

A quick search on Google pointed me to:

https://github.com/catid/longhair

It is a C library implementing the Reed Solomon algorithm.

I think that it's possible to build a dll from sources and create the corresponding fpc binding from the .h include file.

Best regards.

Sandro Cumerlato


On 15 Sep 2016 18:29, "duilio foschi" <[hidden email]> wrote:
can somebody point me to the algorithm above written in Pascal ?

As an alternative, can somebody point me to the algorithm above
written in some DLL I could use from FPC ?

Thank you

Peppe Polpo
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

Zaaphod

I was able to use a C library by creating the following unit, the hardest part was getting variable types to match.   Perhaps this example of linking a C library to Free Pascal will help.

 

James

 

 

Unit InpOut32;

 

Interface

   Function IsInpOutDriverOpen:Boolean;{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Function IsXP64Bit:Boolean;{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Function  Inp32(Port:LongInt):Byte;{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Procedure Out32(Port:LongInt; Value:Byte);{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Function DlPortReadPortUChar(Port:LongInt):Char;{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Procedure DlPortWritePortUChar(Port:LongInt; Value:Char);{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Function DlPortReadPortUShort(Port:LongInt):Word;{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

   Procedure DlPortWritePortUShort(Port:LongInt; Value:Word);{$Ifndef Win32} cdecl {$Else} stdcall {$EndIf};

 

Implementation

   Function IsInpOutDriverOpen; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Function IsXP64Bit; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Function Inp32; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Procedure Out32; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Function DlPortReadPortUChar; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Procedure DlPortWritePortUChar; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Function DlPortReadPortUShort; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

   Procedure DlPortWritePortUShort; {$Ifndef Win32} cdecl {$Else} stdcall {$EndIf}; external 'inpout32.DLL';

 

End.

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Sandro Cumerlato
Sent: Thursday, September 15, 2016 12:52 PM
To: FPC-Pascal users discussions <[hidden email]>
Subject: Re: [fpc-pascal] Reed-Solomon algorithm

 

A quick search on Google pointed me to:

https://github.com/catid/longhair

It is a C library implementing the Reed Solomon algorithm.

I think that it's possible to build a dll from sources and create the corresponding fpc binding from the .h include file.

Best regards.

Sandro Cumerlato

 

On 15 Sep 2016 18:29, "duilio foschi" <[hidden email]> wrote:

can somebody point me to the algorithm above written in Pascal ?

As an alternative, can somebody point me to the algorithm above
written in some DLL I could use from FPC ?

Thank you

Peppe Polpo
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

 


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

duilio foschi
In reply to this post by Sandro Cumerlato
https://sourceforge.net/projects/rscode/?source=typ_redirect

The code above seems much easier to use.

Thank you
Peppe

2016-09-15 18:52 GMT+02:00 Sandro Cumerlato <[hidden email]>:

> A quick search on Google pointed me to:
>
> https://github.com/catid/longhair
>
> It is a C library implementing the Reed Solomon algorithm.
>
> I think that it's possible to build a dll from sources and create the
> corresponding fpc binding from the .h include file.
>
> Best regards.
>
> Sandro Cumerlato
>
>
> On 15 Sep 2016 18:29, "duilio foschi" <[hidden email]> wrote:
>
> can somebody point me to the algorithm above written in Pascal ?
>
> As an alternative, can somebody point me to the algorithm above
> written in some DLL I could use from FPC ?
>
> Thank you
>
> Peppe Polpo
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

Ralf Quint
On 9/15/2016 3:07 PM, duilio foschi wrote:
> https://sourceforge.net/projects/rscode/?source=typ_redirect
>
> The code above seems much easier to use.
>
There is also some code in the Delphi JEDI library at
http://www.delphi-jedi.org/toolslibrary.html

Ralf

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

duilio foschi
Hi Ralf.

thank you for the hint re the Jedi RS algorithm.

The code is inspirational, but weak:

[from file readme.txt]

"As far as I can tell it works, but I made some rather rash
assumptions which need to be confirmed by someone who knows what they
are doing"

I need code I can trust, so will stay with the code from sourceforge.

This has been tested far and wide :)

Thank you
Peppe

2016-09-16 1:48 GMT+02:00 Ralf Quint <[hidden email]>:

> On 9/15/2016 3:07 PM, duilio foschi wrote:
>>
>> https://sourceforge.net/projects/rscode/?source=typ_redirect
>>
>> The code above seems much easier to use.
>>
> There is also some code in the Delphi JEDI library at
> http://www.delphi-jedi.org/toolslibrary.html
>
> Ralf
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Reed-Solomon algorithm

Ralf Quint
On 9/16/2016 12:11 AM, duilio foschi wrote:

> Hi Ralf.
>
> thank you for the hint re the Jedi RS algorithm.
>
> The code is inspirational, but weak:
>
> [from file readme.txt]
>
> "As far as I can tell it works, but I made some rather rash
> assumptions which need to be confirmed by someone who knows what they
> are doing"
>
> I need code I can trust, so will stay with the code from sourceforge.
>
> This has been tested far and wide :)
I just remembered that I saw some related code when looking for
something else a short while ago, never used it myself. If it helps you
great, if not...

Ralf ;-)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal