Skip to content

Commit

Permalink
Fixed: sfixed64 is not zig-zag encoded, see #692
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Mar 1, 2017
1 parent 963cb63 commit 478ee51
Show file tree
Hide file tree
Showing 20 changed files with 116 additions and 103 deletions.
39 changes: 20 additions & 19 deletions dist/light/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/light/protobuf.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/light/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/light/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/light/protobuf.min.js.map

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions dist/minimal/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/minimal/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/minimal/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/minimal/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/minimal/protobuf.min.js.map

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,13 +1235,13 @@ export class Reader {
bool(): boolean;

/**
* Reads fixed 32 bits as a number.
* Reads fixed 32 bits as an unsigned 32 bit integer.
* @returns {number} Value read
*/
fixed32(): number;

/**
* Reads zig-zag encoded fixed 32 bits as a number.
* Reads fixed 32 bits as a signed 32 bit integer.
* @returns {number} Value read
*/
sfixed32(): number;
Expand Down Expand Up @@ -2632,29 +2632,31 @@ export class Writer {
bool(value: boolean): Writer;

/**
* Writes a 32 bit value as fixed 32 bits.
* Writes an unsigned 32 bit value as fixed 32 bits.
* @param {number} value Value to write
* @returns {Writer} `this`
*/
fixed32(value: number): Writer;

/**
* Writes a 32 bit value as fixed 32 bits, zig-zag encoded.
* Writes a signed 32 bit value as fixed 32 bits.
* @function
* @param {number} value Value to write
* @returns {Writer} `this`
*/
sfixed32(value: number): Writer;

/**
* Writes a 64 bit value as fixed 64 bits.
* Writes an unsigned 64 bit value as fixed 64 bits.
* @param {Long|number|string} value Value to write
* @returns {Writer} `this`
* @throws {TypeError} If `value` is a string and no long library is present.
*/
fixed64(value: (Long|number|string)): Writer;

/**
* Writes a 64 bit value as fixed 64 bits, zig-zag encoded.
* Writes a signed 64 bit value as fixed 64 bits.
* @function
* @param {Long|number|string} value Value to write
* @returns {Writer} `this`
* @throws {TypeError} If `value` is a string and no long library is present.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protobufjs",
"version": "6.6.4",
"version": "6.6.5",
"versionScheme": "~",
"description": "Protocol Buffers for JavaScript (& TypeScript).",
"author": "Daniel Wirtz <[email protected]>",
Expand Down
Loading

0 comments on commit 478ee51

Please sign in to comment.