.TH "gbits.c" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME gbits.c \- Functions to pack and unpack bits to/from a packed bit string\&. .SH SYNOPSIS .br .PP \fC#include 'grib2\&.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "void \fBgbit\fP (unsigned char *in, \fBg2int\fP *iout, \fBg2int\fP iskip, \fBg2int\fP nbyte)" .br .RI "Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each value in the unpacked iout array\&. " .ti -1c .RI "void \fBgbits\fP (unsigned char *in, \fBg2int\fP *iout, \fBg2int\fP iskip, \fBg2int\fP nbyte, \fBg2int\fP nskip, \fBg2int\fP n)" .br .RI "Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each value in the unpacked iout array\&. " .ti -1c .RI "void \fBsbit\fP (unsigned char *out, \fBg2int\fP *in, \fBg2int\fP iskip, \fBg2int\fP nbyte)" .br .RI "Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each value in the unpacked array\&. " .ti -1c .RI "void \fBsbits\fP (unsigned char *out, \fBg2int\fP *in, \fBg2int\fP iskip, \fBg2int\fP nbyte, \fBg2int\fP nskip, \fBg2int\fP n)" .br .RI "Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each value in the unpacked array\&. " .in -1c .SH "Detailed Description" .PP Functions to pack and unpack bits to/from a packed bit string\&. .PP \fBAuthor\fP .RS 4 NOAA Programmer .RE .PP .PP Definition in file \fBgbits\&.c\fP\&. .SH "Function Documentation" .PP .SS "void gbit (unsigned char * in, \fBg2int\fP * iout, \fBg2int\fP iskip, \fBg2int\fP nbyte)" .PP Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each value in the unpacked iout array\&. .PP \fBParameters\fP .RS 4 \fIin\fP pointer to character array input\&. .br \fIiout\fP pointer to unpacked array output\&. .br \fIiskip\fP initial number of bits to skip\&. .br \fInbyte\fP number of bits to take\&. .RE .PP \fBAuthor\fP .RS 4 NOAA Programmer .RE .PP .PP Definition at line 20 of file gbits\&.c\&. .PP References gbits()\&. .PP Referenced by comunpack(), g2_addfield(), g2_addgrid(), g2_addlocal(), g2_getfld(), g2_gribend(), g2_info(), g2_unpack1(), g2_unpack2(), g2_unpack3(), g2_unpack4(), g2_unpack5(), g2_unpack6(), g2_unpack7(), and seekgb()\&. .SS "void gbits (unsigned char * in, \fBg2int\fP * iout, \fBg2int\fP iskip, \fBg2int\fP nbyte, \fBg2int\fP nskip, \fBg2int\fP n)" .PP Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each value in the unpacked iout array\&. .PP \fBParameters\fP .RS 4 \fIin\fP pointer to character array input\&. .br \fIiout\fP pointer to unpacked array output\&. .br \fIiskip\fP initial number of bits to skip\&. .br \fInbyte\fP number of bits to take\&. .br \fInskip\fP additional number of bits to skip on each iteration\&. .br \fIn\fP number of iterations\&. .RE .PP \fBAuthor\fP .RS 4 NOAA Programmer .RE .PP .PP Definition at line 57 of file gbits\&.c\&. .PP Referenced by comunpack(), g2_unpack3(), g2_unpack4(), g2_unpack6(), gbit(), pngunpack(), simunpack(), and specunpack()\&. .SS "void sbit (unsigned char * out, \fBg2int\fP * in, \fBg2int\fP iskip, \fBg2int\fP nbyte)" .PP Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each value in the unpacked array\&. .PP \fBParameters\fP .RS 4 \fIout\fP pointer to packed array output\&. Must be allocated large enough to hold output\&. .br \fIin\fP pointer to unpacked array input\&. .br \fIiskip\fP initial number of bits to skip\&. .br \fInbyte\fP number of bits to pack\&. .RE .PP \fBAuthor\fP .RS 4 NOAA Programmer .RE .PP .PP Definition at line 38 of file gbits\&.c\&. .PP References sbits()\&. .PP Referenced by compack(), g2_addfield(), g2_addgrid(), g2_addlocal(), g2_create(), g2_gribend(), misspack(), and simpack()\&. .SS "void sbits (unsigned char * out, \fBg2int\fP * in, \fBg2int\fP iskip, \fBg2int\fP nbyte, \fBg2int\fP nskip, \fBg2int\fP n)" .PP Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each value in the unpacked array\&. .PP \fBParameters\fP .RS 4 \fIout\fP pointer to packed array output\&. Must be allocated large enough to hold output\&. .br \fIin\fP pointer to unpacked array input\&. .br \fIiskip\fP initial number of bits to skip\&. .br \fInbyte\fP number of bits to pack\&. .br \fInskip\fP additional number of bits to skip on each iteration\&. .br \fIn\fP number of iterations\&. .RE .PP \fBAuthor\fP .RS 4 NOAA Programmer .RE .PP .PP Definition at line 110 of file gbits\&.c\&. .PP Referenced by compack(), g2_addfield(), g2_addgrid(), jpcpack(), misspack(), pngpack(), sbit(), and simpack()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.