{"record":{"id":"3ef9d8f54697351c","repo":"pxb1988/dex2jar","slug":"spanned-archives-not-supported","errorCode":null,"errorMessage":"Spanned archives not supported","messagePattern":"Spanned archives not supported","errorType":"exception","errorClass":"ZipException","httpStatus":null,"severity":"error","filePath":"dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipFile.java","lineNumber":233,"sourceCode":"            if (scanOffset < stopOffset) {\n                throw new ZipException(\"End Of Central Directory signature not found\");\n            }\n        }\n\n        // Read the End Of Central Directory. ENDHDR includes the signature bytes,\n        // which we've already read.\n\n        // Pull out the information we need.\n        int diskNumber = raf.getShort() & 0xffff;\n        int diskWithCentralDir = raf.getShort() & 0xffff;\n        int numEntries = raf.getShort() & 0xffff;\n        int totalNumEntries = raf.getShort() & 0xffff;\n        skip(raf, 4); // Ignore centralDirSize.\n        long centralDirOffset = ((long) raf.getInt()) & 0xffffffffL;\n        int commentLength = raf.getShort() & 0xffff;\n\n        if (numEntries != totalNumEntries || diskNumber != 0 || diskWithCentralDir != 0) {\n            throw new ZipException(\"Spanned archives not supported\");\n        }\n        boolean skipCommentsAndExtra = true;\n\n        if (commentLength > 0) {\n            if (commentLength > raf.remaining()) {\n                System.err.println(\"WARN: the zip comment exceed the zip content\");\n            } else {\n                if (skipCommentsAndExtra) {\n                    skip(raf, commentLength);\n                } else {\n                    byte[] commentBytes = new byte[commentLength];\n                    raf.get(commentBytes);\n                    comment = new String(commentBytes, 0, commentBytes.length, StandardCharsets.UTF_8);\n                }\n            }\n        }\n\n        // Seek to the first CDE and read all entries.","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/dex-reader/src/main/java/com/googlecode/d2j/util/zip/ZipFile.java#L215-L251","documentation":"The EOCD record declares mismatched entry counts (numEntries vs totalNumEntries) or a non-zero disk number (diskNumber / diskWithCentralDir), indicating a multi-disk (spanned) archive, which this ZipFile does not support.","triggerScenarios":"Opening a split/multi-volume zip, or a zip whose EOCD entry counts are inconsistent/corrupted.","commonSituations":"Archives split by tools into .zip/.z01 volumes, partially copied multi-part archives, EOCD byte corruption.","solutions":["Re-merge the split archive into a single zip (zip -s 0 split.zip --out single.zip) before opening","Rebuild/re-download the archive as a single volume","If counts are merely inconsistent due to corruption, repair the zip with zip -FF"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"// detect split archives by sibling volume files\nboolean isSplit = new File(base + \".z01\").exists() || base.endsWith(\".zip\");","typeGuard":"null","tryCatchPattern":"try { ZipFile z = new ZipFile(f); } catch (ZipException e) { if (e.getMessage().contains(\"Spanned\")) throw new IOException(\"merge split archive first\"); throw e; }","preventionTips":["Reject .z01/.z02 sibling files or multi-part archives at intake","Always merge split zips into a single volume before processing","Repair inconsistent EOCD counts with zip -FF when corruption is suspected"],"tags":["zip","spanned-archive","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}