com.esotericsoftware.kryo.io.Output.writeVarLong()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中com.esotericsoftware.kryo.io.Output.writeVarLong()方法的一些代码示例,展示了Output.writeVarLong()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.writeVarLong()方法的具体详情如下:
包路径:com.esotericsoftware.kryo.io.Output
类名称:Output
方法名:writeVarLong

Output.writeVarLong介绍

[英]Writes a 1-9 byte long. It is guaranteed that a varible length encoding will be used.
[中]

代码示例

代码示例来源:origin: com.esotericsoftware/kryo

/** Writes a 1-9 byte long. This stream may consider such a variable length encoding request as a hint. It is not guaranteed
 * that a variable length encoding will be really used. The stream may decide to use native-sized integer representation for
 * efficiency reasons.
 * 
 * @param optimizePositive If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
 *           inefficient (9 bytes). */
public int writeLong (long value, boolean optimizePositive) throws KryoException {
  return writeVarLong(value, optimizePositive);
}

代码示例来源:origin: com.esotericsoftware.kryo/kryo

/** Writes a 1-9 byte long. This stream may consider such a variable length encoding request as a hint. It is not guaranteed
 * that a variable length encoding will be really used. The stream may decide to use native-sized integer representation for
 * efficiency reasons.
 * 
 * @param optimizePositive If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
 *           inefficient (9 bytes). */
public int writeLong (long value, boolean optimizePositive) throws KryoException {
  return writeVarLong(value, optimizePositive);
}

代码示例来源:origin: com.esotericsoftware/kryo-shaded

/** Writes a 1-9 byte long. This stream may consider such a variable length encoding request as a hint. It is not guaranteed
 * that a variable length encoding will be really used. The stream may decide to use native-sized integer representation for
 * efficiency reasons.
 * 
 * @param optimizePositive If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
 *           inefficient (9 bytes). */
public int writeLong (long value, boolean optimizePositive) throws KryoException {
  return writeVarLong(value, optimizePositive);
}

代码示例来源:origin: svn2github/kryo

/** Writes a 1-9 byte long. This stream may consider such a variable length encoding request as a hint. It is not guaranteed
 * that a variable length encoding will be really used. The stream may decide to use native-sized integer representation for
 * efficiency reasons.
 * 
 * @param optimizePositive If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
 *           inefficient (9 bytes). */
public int writeLong (long value, boolean optimizePositive) throws KryoException {
  return writeVarLong(value, optimizePositive);
}

相关文章