#1 Re: Source Code repository » Android 64bits version of unit SynCrossPlatformSynLZ; » 2020-12-09 14:30:52

I'm not a compression expert but I know the basics.
As soon as Delphi has a build in assembler for ARM processors it should be possible to have a very fast compression for android as well, like for Intel/AMD.
I do like the open source in Mormot compared to Indy. It gives me confidense to know what's going on with the data.
Keep up the good work!

#2 Re: Source Code repository » Android 64bits version of unit SynCrossPlatformSynLZ; » 2020-12-09 06:16:24

Hi,

Thanks for the update.

Regarding the performance. I come from the Indy ZLib usage in Android.
And I see no obvious slower speeds.
But to know is to measure and I have not a test in place to compare the speed yet.

#3 Re: Source Code repository » Android 64bits version of unit SynCrossPlatformSynLZ; » 2020-12-08 07:07:29

Hi again,

I've updated the revised version from Git and compiled it again.
But the function SynLZdecomp in file CrossPlatform\SynCrossPlatformSynLZ.pas has a pointer bug if you compile it in Android64.
You can fix it by changing like below.

original code:

function SynLZdecomp(src: pointer; size: cardinal; dst: pointer): cardinal;
var last_hashed, // initial src and dst value
    src_end: PtrUInt;
    CW, CWbit: cardinal;
   v, t, h, o:  cardinal;
    i: integer;
    offset: array[0..4095] of PtrUInt; // 16KB hashing code
label nextCW;
begin
  src_end := PtrUInt(src)+size;
.............

revised code:

function SynLZdecomp(src: pointer; size: cardinal; dst: pointer): cardinal;
var last_hashed, // initial src and dst value
    src_end: PtrUInt;
    CW, CWbit: cardinal;
   v, t, h, o:  PtrUInt;
    i: integer;
    offset: array[0..4095] of PtrUInt; // 16KB hashing code
label nextCW;
begin
  src_end := PtrUInt(src)+size;
.............

Thank you.

#5 Source Code repository » Android 64bits version of unit SynCrossPlatformSynLZ; » 2020-12-07 15:36:10

jasglas
Replies: 7

Good day,
I was busy with the CrossPlatform version of SynLZ (SynCrossPlatformSynLZ.pas)
And I came across a bug for the Android64 platform.
The PtrUInt is of version cardinal (which is a 32bits unsigned int) is not suited to hold a 64 bits pointer
I adjusted the compress and decompress procedures to work with android 64bits platform.
Are you interested in the adjusted source code?

Board footer

Powered by FluxBB