Find Jobs
Hire Freelancers

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

$30-100 USD

En curso
Publicado hace alrededor de 12 años

$30-100 USD

Pagado a la entrega
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); }
ID del proyecto: 2724488

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 12 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$25,50 USD en 14 días
4,8 (96 comentarios)
5,7
5,7
2 freelancers están ofertando un promedio de $38 USD por este trabajo
Avatar del usuario
See private message.
$50,15 USD en 14 días
4,9 (10 comentarios)
2,6
2,6

Sobre este cliente

Bandera de UNITED STATES
Davisville, United States
5,0
133
Forma de pago verificada
Miembro desde nov 22, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.