| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 uint32 ReadTagSlow(); | 606 uint32 ReadTagSlow(); |
| 607 bool ReadStringFallback(string* buffer, int size); | 607 bool ReadStringFallback(string* buffer, int size); |
| 608 | 608 |
| 609 // Return the size of the buffer. | 609 // Return the size of the buffer. |
| 610 int BufferSize() const; | 610 int BufferSize() const; |
| 611 | 611 |
| 612 static const int kDefaultTotalBytesLimit = 64 << 20; // 64MB | 612 static const int kDefaultTotalBytesLimit = 64 << 20; // 64MB |
| 613 | 613 |
| 614 static const int kDefaultTotalBytesWarningThreshold = 32 << 20; // 32MB | 614 static const int kDefaultTotalBytesWarningThreshold = 32 << 20; // 32MB |
| 615 | 615 |
| 616 static const int default_recursion_limit_; // 100 by default. | 616 static int default_recursion_limit_; // 100 by default. |
| 617 }; | 617 }; |
| 618 | 618 |
| 619 // Class which encodes and writes binary data which is composed of varint- | 619 // Class which encodes and writes binary data which is composed of varint- |
| 620 // encoded integers and fixed-width pieces. Wraps a ZeroCopyOutputStream. | 620 // encoded integers and fixed-width pieces. Wraps a ZeroCopyOutputStream. |
| 621 // Most users will not need to deal with CodedOutputStream. | 621 // Most users will not need to deal with CodedOutputStream. |
| 622 // | 622 // |
| 623 // Most methods of CodedOutputStream which return a bool return false if an | 623 // Most methods of CodedOutputStream which return a bool return false if an |
| 624 // underlying I/O error occurs. Once such a failure occurs, the | 624 // underlying I/O error occurs. Once such a failure occurs, the |
| 625 // CodedOutputStream is broken and is no longer useful. The Write* methods do | 625 // CodedOutputStream is broken and is no longer useful. The Write* methods do |
| 626 // not return the stream status, but will invalidate the stream if an error | 626 // not return the stream status, but will invalidate the stream if an error |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 } // namespace io | 1285 } // namespace io |
| 1286 } // namespace protobuf | 1286 } // namespace protobuf |
| 1287 | 1287 |
| 1288 | 1288 |
| 1289 #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER) | 1289 #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER) |
| 1290 #pragma runtime_checks("c", restore) | 1290 #pragma runtime_checks("c", restore) |
| 1291 #endif // _MSC_VER && !defined(__INTEL_COMPILER) | 1291 #endif // _MSC_VER && !defined(__INTEL_COMPILER) |
| 1292 | 1292 |
| 1293 } // namespace google | 1293 } // namespace google |
| 1294 #endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ | 1294 #endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ |
| OLD | NEW |