Find Jobs
Hire Freelancers

c# zlib.dll unsafe to zlib.net source conversion

$30-100 USD

Folyamatban
Kiadva ekkor: körülbelül 12 évvel ezelőtt

$30-100 USD

Teljesítéskor fizetve
I am using unsafe [login to view URL] in c# I need the same routine written to use the [login to view URL] c# sources. I cannot ship the dll in this application so I need to embed the source. Thanks and good luck... ## Deliverables private static unsafe byte[] MyCompress(byte[] source) { int tlen = (([login to view URL] * 0x65) / 100) + 0x10; byte[] sourceArray = new byte[tlen]; fixed (byte* numRef = source) { fixed (byte* numRef2 = sourceArray) { int num2 = compress(numRef2 + 4, &tlen, numRef, [login to view URL], 9); if (num2 != 0) { throw new InvalidOperationException("Compression failed, reason code=" + num2); } *((int*) numRef2) = [login to view URL]([login to view URL]); } } byte[] destinationArray = new byte[tlen + 4]; [login to view URL](sourceArray, destinationArray, (int) (tlen + 4)); return destinationArray; } [DllImport("[login to view URL]", EntryPoint="compress2")] private static extern unsafe int compress(byte* target, int* tlen, byte* source, int slen, int level); private static unsafe byte[] MyDecompress(byte[] source) { fixed (byte* numRef = source) { int tlen = [login to view URL](*((int*) numRef)); byte[] buffer = new byte[tlen]; fixed (byte* numRef2 = buffer) { int num2 = uncompress(numRef2, &tlen, numRef + 4, [login to view URL] - 4); if (num2 != 0) { throw new InvalidOperationException("Decompression failed, reason code=" + num2); } return buffer; } } } [DllImport("[login to view URL]")] private static extern unsafe int uncompress(byte* target, int* tlen, byte* source, int slen); static Variable() { myMark = new [login to view URL](); myTrue = new [login to view URL](true); myFalse = new [login to view URL](false); }
Projektazonosító: 2724488

A projektről

2 ajánlat
Távolról teljesíthető projekt
Aktiválva: 12 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
Neki odaítélve:
Felhasználó avatár
See private message.
$25,50 USD 14 napon belül
4,8 (96 értékelés)
5,7
5,7
2 szabadúszó adott átlagosan $38 USD összegű árajánlatot erre a munkára
Felhasználó avatár
See private message.
$50,15 USD 14 napon belül
4,9 (10 értékelés)
2,6
2,6

Az ügyfélről

UNITED STATES zászlója
Davisville, United States
5,0
133
Fizetési mód hitelesítve
Tagság kezdete: nov. 22, 2002

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.