btreecodex.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* Copyright (C) Electronic Arts Canada Inc. 1995-2002. All rights reserved. */
  19. #ifndef __BTRCODEX
  20. #define __BTRCODEX 1
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #ifndef __CODEX_H
  25. #error "Include codex.h before btreecodex.h"
  26. #endif
  27. /****************************************************************/
  28. /* BTR Codex */
  29. /****************************************************************/
  30. /* Information Functions */
  31. CODEXABOUT *GCALL BTREE_about(void);
  32. bool GCALL BTREE_is(const void *compresseddata);
  33. /* Decode Functions */
  34. int GCALL BTREE_size(const void *compresseddata);
  35. #ifdef __cplusplus
  36. int GCALL BTREE_decode(void *dest, const void *compresseddata, int *compressedsize=0);
  37. #else
  38. int GCALL BTREE_decode(void *dest, const void *compresseddata, int *compressedsize);
  39. #endif
  40. /* Encode Functions */
  41. #ifdef __cplusplus
  42. int GCALL BTREE_encode(void *compresseddata, const void *source, int sourcesize, int *opts=0);
  43. #else
  44. int GCALL BTREE_encode(void *compresseddata, const void *source, int sourcesize, int *opts);
  45. #endif
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif