Function

Camelydecode_step

Declaration [src]

gsize
camel_ydecode_step (
  const guchar* in,
  gsize inlen,
  guchar* out,
  gint* state,
  guint32* pcrc,
  guint32* crc
)

Description [src]

Performs a ‘decode step’ on a chunk of yEncoded data of length inlen pointed to by in and writes to out. Assumes the =ybegin and =ypart lines have already been stripped off.

To get the crc32 value of the part, use #CAMEL_MIME_YENCODE_CRC_FINAL (pcrc). If there are more parts, you should reuse crc without re-initializing. Once all parts have been decoded, you may get the combined crc32 value of all the parts using #CAMEL_MIME_YENCODE_CRC_FINAL (crc).

Parameters

in

Type: An array of guchar

Input buffer.

The length of the array is specified in the inlen argument.
The data is owned by the caller of the function.
inlen

Type: gsize

Input buffer length.

out

Type: An array of guchar

Output buffer.

The argument will be set by the function.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
state

Type: gint*

Ydecode state.

The argument will be set by the function.
pcrc

Type: guint32*

Part crc state.

The argument will be set by the function.
crc

Type: guint32*

Crc state.

The argument will be set by the function.

Return value

Type: gsize

The number of bytes decoded.