Home
last modified time | relevance | path

Searched refs:BinaryDecoder (Results 1 – 4 of 4) sorted by relevance

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/js/binary/
Ddecoder.js223 jspb.BinaryDecoder = function(opt_bytes, opt_start, opt_length) { class in jspb
278 jspb.BinaryDecoder.instanceCache_ = [];
290 jspb.BinaryDecoder.alloc = function(opt_bytes, opt_start, opt_length) {
291 if (jspb.BinaryDecoder.instanceCache_.length) {
292 var newDecoder = jspb.BinaryDecoder.instanceCache_.pop();
298 return new jspb.BinaryDecoder(opt_bytes, opt_start, opt_length);
306 jspb.BinaryDecoder.prototype.free = function() {
308 if (jspb.BinaryDecoder.instanceCache_.length < 100) {
309 jspb.BinaryDecoder.instanceCache_.push(this);
318 jspb.BinaryDecoder.prototype.clone = function() {
[all …]
Ddecoder_test.js73 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
128 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
153 jspb.BinaryDecoder.instanceCache_ = [];
157 jspb.BinaryDecoder.alloc().free();
159 assertEquals(1, jspb.BinaryDecoder.instanceCache_.length);
164 var decoder1 = jspb.BinaryDecoder.alloc();
165 var decoder2 = jspb.BinaryDecoder.alloc();
166 var decoder3 = jspb.BinaryDecoder.alloc();
171 assertEquals(3, jspb.BinaryDecoder.instanceCache_.length);
200 var decoder = jspb.BinaryDecoder.alloc(encoder.end());
[all …]
Dreader_test.js70 var decoder1 = jspb.BinaryDecoder.alloc();
71 var decoder2 = jspb.BinaryDecoder.alloc();
72 var decoder3 = jspb.BinaryDecoder.alloc();
77 assertEquals(3, jspb.BinaryDecoder.instanceCache_.length);
85 assertEquals(2, jspb.BinaryDecoder.instanceCache_.length);
91 assertEquals(2, jspb.BinaryDecoder.instanceCache_.length);
109 assertEquals(2, jspb.BinaryDecoder.instanceCache_.length);
115 assertEquals(2, jspb.BinaryDecoder.instanceCache_.length);
845 var decoder1 = new jspb.BinaryDecoder(writer.getResultBuffer());
849 var decoder2 = new jspb.BinaryDecoder(decoder1.readBytes(blob.length + 4));
Dreader.js71 this.decoder_ = jspb.BinaryDecoder.alloc(opt_bytes, opt_start, opt_length);
596 jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(), start, length);