首页 > 其他分享 >Protobuf - Scalar Types

Protobuf - Scalar Types

时间:2024-04-06 21:57:31浏览次数:460  
标签:store Protobuf negative Scalar Types size types numbers

In Protobuf, types that are considered simple and that are provided by Protobuf out of the box are called scalar types. We can use 15 of such types, as listed here:

• int32
• int64
• uint32
• uint64
• sint32
• sint64
• fixed32  (unsigned, cannot store negative numbers)
• fixed64  (unsigned, cannot store negative numbers)
• sfixed32 (signed, can store negative numbers)
• sfixed64 (signed, can store negative numbers)
• double
• float
• string
• bytes
• bool

 

We want to make categories that are related to the Protobuf serialization algorithms. In total, we have three: fixed-size numbers, variable-size integers (varints), and length-delimited types. Here is a table with each category populated:

 

标签:store,Protobuf,negative,Scalar,Types,size,types,numbers
From: https://www.cnblogs.com/zhangzhihui/p/18117975

相关文章

  • ZNOTE - RPC Types
          ......
  • Vue3 + TypeScript + Vite 初始项目搭建(ESLint、Prettier、Sass、Stylelint、husky、p
    仓库地址仓库地址:https://gitee.com/tongchaowei/vue-ts-vite-template项目源码下载:https://gitee.com/tongchaowei/vue-ts-vite-template/releases全局安装pnpm包管理工具执行如下命令在系统全局安装pnpm包管理工具:npmipnpm-g使用Vite脚手架创建Vue3......
  • 浅谈TypeScript对业务可维护性的影响
    前言笔者认为,TypeScript是服务于业务的,核心就是提高代码的可维护性.TypeScript是把双刃剑,如果类型系统使用的不好,反而会阻碍开发,甚至最后就变成了anyScript.笔者最近在使用TypeScript的过程中,有了一点点微不足道的思考,想和大家分享、探讨.本文比较适合有真实Ty......
  • Vue3+TypeScript项目(SKU管理模块)
    一、SKU模块静态页面src\views\product\sku\index.vue<template><el-card><el-tableborderstyle="margin:10px0px"><el-table-columntype="index"label="序号"width="80px"></el-table......
  • HOW - Typescript 常用特性介绍
    目录一、目标二、常用特性介绍anyvsunknowntypevsinterface泛型:Generics1.函数的泛型2.接口、类、类型别名的泛型3.泛型约束:限制类型变量的取值范围交叉类型1.用法一:一个对象拥有多个对象的所有属性2.用法二:Mixin条件类型1.用法一:Non......
  • TS(TypeScript)— 搭建开发环境
    1.创建pakeage.jsonnpminit//自选参数npminit-y//默认参数 2.构造目录安装ts开发依赖npminstalltypescripttslint-g创建功能文件夹 初始化ts(安装typescript就可以使用tsc命令)生成tsconfig.json文件tsc--init 配置webpacknpminstallwe......
  • EF Core – Owned Entity Types & Complex Types
    前言EFCore8.0推出了ComplexTypes,这篇要来介绍一下。由于它和 OwnedEntityTypes傻傻分不清楚,加上我之前也没有写过 OwnedEntityTypes的文章,所以这篇就一起介绍呗。 OwnedEntityTypesOwnedEntityTypes本质上任然属于一种EntityTypes,只是它有一些潜规则,所......
  • 详解 Protobuf 以及在 Go 中如何使用 gRPC
    什么是RPC?RPC指的是远程过程调用(RemoteProcedureCall),简单理解就是一个节点请求另一个节点提供的服务。假设有两台服务器A和B,一个部署在A服务器上的应用,想要调用B服务器上某个应用提供的函数/方法。但由于不在同一个内存空间,所以不能直接调用,而是需要通过网络来表达......
  • 前端开发中Vue3+Typescript使用装饰器出现错误一则
    今天开发公司项目时,使用TS装饰器遇到一个问题。当我写完装饰器代码后进入网页,控制台提示SyntaxError:Invalidorunexpectedtoken两个小时后的排查后发现是tsconfig.json的配置问题。如果tsconfig.json文件中没有指定target选项,TypeScript编译器会默认使用es5作......
  • typescript——4.类
    介绍传统的JavaScript程序使用函数和基于原型的继承来创建可重用的组件,但对于熟悉使用面向对象方式的程序员来讲就有些棘手,因为他们用的是基于类的继承并且对象是由类构建出来的。从ECMAScript6开始,JavaScript程序员将能够使用基于类的面向对象的方式。使用TypeScript,我......