<commit_before>module JWE
  module Serialization
    class Compact
      def self.encode(header, encrypted_cek, iv, ciphertext, tag)
        [header, encrypted_cek, iv, ciphertext, tag].map { |piece| JWE::Base64.jwe_encode(piece) }.join '.'
      end

      def self.decode(payload)
        parts = payload.split('.')
        raise JWE::DecodeError.new('Not enaugh or too many segments') unless parts.length == 5

        parts.map do |part|
          JWE::Base64.jwe_decode(part)
        end
      end
    end
  end
end
<commit_msg>Update compact.rb<commit_after>module JWE
  module Serialization
    class Compact
      def self.encode(header, encrypted_cek, iv, ciphertext, tag)
        [header, encrypted_cek, iv, ciphertext, tag].map { |piece| JWE::Base64.jwe_encode(piece) }.join '.'
      end

      def self.decode(payload)
        parts = payload.split('.')
        raise JWE::DecodeError.new('Not enough or too many segments') unless parts.length == 5

        parts.map do |part|
          JWE::Base64.jwe_decode(part)
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10934579439252337, 'fraction_numerical': 0.009345794392523364, 'mean_word_length': 2.5819397993311037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6793147', 'n_tokens_mistral': 355, 'n_tokens_neox': 338, 'n_words': 89}