Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-svn-demo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raila
git-svn-demo
Commits
fc8da050
Commit
fc8da050
authored
16 years ago
by
raila
Browse files
Options
Downloads
Patches
Plain Diff
Applied Ulrich Kunitz's patches to slightly optimize Python serialization code.
parent
7747a070
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CONTRIBUTORS.txt
+2
-0
2 additions, 0 deletions
CONTRIBUTORS.txt
python/google/protobuf/internal/output_stream.py
+2
-3
2 additions, 3 deletions
python/google/protobuf/internal/output_stream.py
python/google/protobuf/internal/wire_format.py
+1
-1
1 addition, 1 deletion
python/google/protobuf/internal/wire_format.py
with
5 additions
and
4 deletions
CONTRIBUTORS.txt
+
2
−
0
View file @
fc8da050
...
...
@@ -36,3 +36,5 @@ Maven packaging:
Non-Google patch contributors:
Kevin Ko <kevin.s.ko@gmail.com>
Johan Euphrosine <proppy@aminche.com>
Ulrich Kunitz <kune@deine-taler.de>
This diff is collapsed.
Click to expand it.
python/google/protobuf/internal/output_stream.py
+
2
−
3
View file @
fc8da050
...
...
@@ -101,11 +101,10 @@ class OutputStream(object):
while
True
:
bits
=
unsigned_value
&
0x7f
unsigned_value
>>=
7
if
unsigned_value
:
bits
|=
0x80
self
.
_buffer
.
append
(
bits
)
if
not
unsigned_value
:
self
.
_buffer
.
append
(
bits
)
break
self
.
_buffer
.
append
(
0x80
|
bits
)
def
ToString
(
self
):
"""
Returns a string containing the bytes in our internal buffer.
"""
...
...
This diff is collapsed.
Click to expand it.
python/google/protobuf/internal/wire_format.py
+
1
−
1
View file @
fc8da050
...
...
@@ -87,7 +87,7 @@ def ZigZagEncode(value):
"""
if
value
>=
0
:
return
value
<<
1
return
(
(
value
<<
1
)
^
(
~
0
)
)
|
0x1
return
(
value
<<
1
)
^
(
~
0
)
def
ZigZagDecode
(
value
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment