Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libzopfli-sharp/Zopfli.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public static byte[] compress(byte[] data_in, ZopfliFormat type, ZopfliOptions o

// Compress the data via native methods
if (Environment.Is64BitProcess)
ZopfliCompressor64.ZopfliCompress(ref options, type, data_in, data_in.Length, ref result, ref result_size);
ZopfliCompressor64.ZopfliCompress(options, type, data_in, data_in.Length, ref result, ref result_size);
else
ZopfliCompressor32.ZopfliCompress(ref options, type, data_in, data_in.Length, ref result, ref result_size);
ZopfliCompressor32.ZopfliCompress(options, type, data_in, data_in.Length, ref result, ref result_size);

// Copy data back to managed memory and return
return NativeUtilities.GetDataFromUnmanagedMemory(result, (int)result_size);
Expand Down
4 changes: 2 additions & 2 deletions libzopfli-sharp/ZopfliCompressor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ZopfliCompressor32
/// <param name="data_out">Pointer to the dynamic output array to which the result is appended</param>
/// <param name="data_out_size">This is the size of the memory block pointed to by the dynamic output array size</param>
[DllImport("x86\\zopfli.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void ZopfliCompress(ref ZopfliOptions options, ZopfliFormat output_type, byte[] data, int data_size, ref IntPtr data_out, ref UIntPtr data_out_size);
public static extern void ZopfliCompress(ZopfliOptions options, ZopfliFormat output_type, byte[] data, int data_size, ref IntPtr data_out, ref UIntPtr data_out_size);
}

/// <summary>
Expand All @@ -42,6 +42,6 @@ public class ZopfliCompressor64
/// <param name="data_out">Pointer to the dynamic output array to which the result is appended</param>
/// <param name="data_out_size">This is the size of the memory block pointed to by the dynamic output array size</param>
[DllImport("amd64\\zopfli.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void ZopfliCompress(ref ZopfliOptions options, ZopfliFormat output_type, byte[] data, int data_size, ref IntPtr data_out, ref UIntPtr data_out_size);
public static extern void ZopfliCompress(ZopfliOptions options, ZopfliFormat output_type, byte[] data, int data_size, ref IntPtr data_out, ref UIntPtr data_out_size);
}
}