<commit_before>package com.jakewharton.diffuse

import com.jakewharton.diffuse.ArchiveFile.Type.Companion.toApkFileType
import com.jakewharton.diffuse.ArchiveFiles.Companion.toArchiveFiles
import com.jakewharton.diffuse.Arsc.Companion.toArsc
import com.jakewharton.diffuse.Dex.Companion.toDex
import com.jakewharton.diffuse.Manifest.Companion.toManifest
import com.jakewharton.diffuse.Signatures.Companion.toSignatures
import com.jakewharton.diffuse.io.Input

class Apk private constructor(
  override val filename: String?,
  val files: ArchiveFiles,
  val dexes: List<Dex>,
  val arsc: Arsc,
  val manifest: Manifest,
  val signatures: Signatures
) : Binary {
  companion object {
    internal val classesDexRegex = Regex("classes\\d*\\.dex")

    fun Input.toApk(): Apk {
      val signatures = toSignatures()
      toZip().use { zip ->
        val files = zip.toArchiveFiles { it.toApkFileType() }
        val manifest = zip["AndroidManifest.xml"].asInput().toBinaryResourceFile().toManifest()
        val dexes = zip.entries<commit_msg>Ensure JvmName of Apk factory matches convention<commit_after>package com.jakewharton.diffuse

import com.jakewharton.diffuse.ArchiveFile.Type.Companion.toApkFileType
import com.jakewharton.diffuse.ArchiveFiles.Companion.toArchiveFiles
import com.jakewharton.diffuse.Arsc.Companion.toArsc
import com.jakewharton.diffuse.Dex.Companion.toDex
import com.jakewharton.diffuse.Manifest.Companion.toManifest
import com.jakewharton.diffuse.Signatures.Companion.toSignatures
import com.jakewharton.diffuse.io.Input

class Apk private constructor(
  override val filename: String?,
  val files: ArchiveFiles,
  val dexes: List<Dex>,
  val arsc: Arsc,
  val manifest: Manifest,
  val signatures: Signatures
) : Binary {
  companion object {
    internal val classesDexRegex = Regex("classes\\d*\\.dex")

    @JvmStatic
    @JvmName("parse")
    fun Input.toApk(): Apk {
      val signatures = toSignatures()
      toZip().use { zip ->
        val files = zip.toArchiveFiles { it.toApkFileType() }
        val manifest = zip["AndroidManifest.xml"].asInput().toBinaryResourceFile().toManifest()
        val dexes = zip.entries
{'fraction_non_alphanumeric': 0.10306406685236769, 'fraction_numerical': 0.0, 'mean_word_length': 4.428211586901763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3134922', 'n_tokens_mistral': 744, 'n_tokens_neox': 698, 'n_words': 135}