<commit_before>// Sources/SwiftProtobuf/BinaryDecodingOptions.swift - Binary decoding options
//
// Copyright (c) 2014 - 2017 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
//
// -----------------------------------------------------------------------------
///
/// Binary decoding options
///
// -----------------------------------------------------------------------------

/// Options for JSONDecoding.
public struct BinaryDecodingOptions {
  /// The maximum nesting of message with messages.  The default is 100.
  ///
  /// To prevent corrupt or malicious messages from causing stack overflows,
  /// this controls how deep messages can be nested within other messages
  /// while parsing.
  public var messageDepthLimit: Int = 100

  /// Discard unknown fields while parsing.  The default is false, so parsering
  /// does not discard unknown fields.
  ///
  /// The Protobuf binary format allows unknown fields to be still parsed
  /// so the schema can be expanded without requiring all readers to be updated.
  /// This works in part by haivng any unknown fields preserved so they can
  /// be relayed on without loss. For a while the proto3 syntax definition
  /// called for unknown fields to be dropped, but that lead to problems in<commit_msg>Update BinaryDecodingOptions.swift<commit_after>// Sources/SwiftProtobuf/BinaryDecodingOptions.swift - Binary decoding options
//
// Copyright (c) 2014 - 2017 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
//
// -----------------------------------------------------------------------------
///
/// Binary decoding options
///
// -----------------------------------------------------------------------------

/// Options for binary decoding.
public struct BinaryDecodingOptions {
  /// The maximum nesting of message with messages.  The default is 100.
  ///
  /// To prevent corrupt or malicious messages from causing stack overflows,
  /// this controls how deep messages can be nested within other messages
  /// while parsing.
  public var messageDepthLimit: Int = 100

  /// Discard unknown fields while parsing.  The default is false, so parsering
  /// does not discard unknown fields.
  ///
  /// The Protobuf binary format allows unknown fields to be still parsed
  /// so the schema can be expanded without requiring all readers to be updated.
  /// This works in part by haivng any unknown fields preserved so they can
  /// be relayed on without loss. For a while the proto3 syntax definition
  /// called for unknown fields to be dropped, but that lead to problems in
{'fraction_non_alphanumeric': 0.18419220055710306, 'fraction_numerical': 0.011838440111420613, 'mean_word_length': 2.0434322033898304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3624918', 'n_tokens_mistral': 683, 'n_tokens_neox': 617, 'n_words': 313}