Word getDownstreamDataBufferBytesHandler(void* raw_context, Word start, Word length, Word ptr_ptr,
                                         Word size_ptr) {
  auto context = WASM_CONTEXT(raw_context);
  absl::string_view data;
  auto result = context->getDownstreamDataBufferBytes(start.u64_, length.u64_, &data);
  if (result != WasmResult::Ok) {
    return wasmResultToWord(result);
  }
  context->wasm()->copyToPointerSize(data, ptr_ptr.u64_, size_ptr.u64_);
  return wasmResultToWord(WasmResult::Ok);
}
Word getDownstreamDataBufferBytesHandler(void* raw_context, Word start, Word length, Word ptr_ptr,
                                         Word size_ptr) {
  auto context = WASM_CONTEXT(raw_context);
  absl::string_view data;
  auto result = context->getDownstreamDataBufferBytes(start.u64_, length.u64_, &data);
  if (result != WasmResult::Ok) {
    return wasmResultToWord(result);
  }
  context->wasm()->copyToPointerSize(data, ptr_ptr.u64_, size_ptr.u64_);
  return wasmResultToWord(WasmResult::Ok);
}