File: sframe-impl.h

package info (click to toggle)
binutils 2.45.90.20260125-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 383,884 kB
  • sloc: ansic: 1,521,541; asm: 829,347; cpp: 216,692; exp: 80,513; makefile: 73,160; sh: 25,606; yacc: 15,060; lisp: 13,632; perl: 13,404; lex: 1,714; ada: 1,681; python: 1,520; pascal: 1,446; cs: 879; java: 478; sed: 191; xml: 95; awk: 25
file content (71 lines) | stat: -rw-r--r-- 1,912 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* Implementation header.

   Copyright (C) 2022-2026 Free Software Foundation, Inc.

   This file is part of libsframe.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#ifndef _SFRAME_IMPL_H
#define _SFRAME_IMPL_H

#include "sframe-api.h"

#ifdef  __cplusplus
extern "C"
{
#endif

#include <assert.h>
#define sframe_assert(expr) (assert (expr))

typedef struct sf_fde_tbl sf_fde_tbl;
typedef struct sf_fre_tbl sf_fre_tbl;

struct sframe_decoder_ctx
{
  /* SFrame header.  */
  sframe_header sfd_header;
  /* SFrame function desc entries table.  */
  sf_fde_tbl *sfd_funcdesc;
  /* SFrame FRE table.  */
  char *sfd_fres;
  /* Number of bytes needed for SFrame FREs.  */
  int sfd_fre_nbytes;
  /* Reference to the internally malloc'd buffer, if any, for endian flipping
     the original input buffer before decoding.  */
  void *sfd_buf;
};

struct sframe_encoder_ctx
{
  /* SFrame header.  */
  sframe_header sfe_header;
  /* SFrame function desc entries table.  */
  sf_fde_tbl *sfe_funcdesc;
  /* SFrame FRE table.  */
  sf_fre_tbl *sfe_fres;
  /* Number of bytes needed for SFrame FREs.  */
  uint32_t sfe_fre_nbytes;
  /* SFrame output data buffer.  */
  char *sfe_data;
  /* Size of the SFrame output data buffer.  */
  size_t sfe_data_size;
};

#ifdef  __cplusplus
}
#endif

#endif /* _SFRAME_IMPL_H */