ZSTD_getDictID_fromFrame method

int ZSTD_getDictID_fromFrame(
  1. Pointer<Void> src,
  2. int srcSize
)

! ZSTD_getDictID_fromFrame() : Requires v1.4.0+ Provides the dictID required to decompressed the frame stored within src. If @return == 0, the dictID could not be decoded. This could for one of the following reasons :

  • The frame does not require a dictionary to be decoded (most common case).
  • The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information. Note : this use case also happens when using a non-conformant dictionary.
  • srcSize is too small, and as a result, the frame header could not be decoded (only possible if srcSize < ZSTD_FRAMEHEADERSIZE_MAX).
  • This is not a Zstandard frame. When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code.

Implementation

int ZSTD_getDictID_fromFrame(
    ffi.Pointer<ffi.Void> src,
    int srcSize,
    ) {
  return _ZSTD_getDictID_fromFrame(
    src,
    srcSize,
  );
}