L L4D2node

NET_BufferToBufferCompress

0x001c5130 · 176 bytes · __cdecl

_Z26NET_BufferToBufferCompressPcPjS_j

Decompiled

undefined (4 params)

/* NET_BufferToBufferCompress(char*, unsigned int*, char*, unsigned int) */

undefined4 NET_BufferToBufferCompress(char *param_1,uint *param_2,char *param_3,uint param_4)

{
  void *__ptr;
  uint local_2c;
  CLZSS local_28 [8];
  undefined4 local_20;
  
  _V_memcpy(param_1,param_3,param_4);
  local_20 = 0x1000;
  local_2c = 0;
  __ptr = (void *)CLZSS::Compress(local_28,(uchar *)param_3,param_4,&local_2c);
  if (__ptr != (void *)0x0) {
    if ((local_2c != 0) && (local_2c <= *param_2)) {
      _V_memcpy(param_1,__ptr,local_2c);
      *param_2 = local_2c;
      free(__ptr);
      return 1;
    }
    free(__ptr);
  }
  _V_memcpy(param_1,param_3,param_4);
  *param_2 = param_4;
  return 0;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)