<commit_before>//
// Flump - Copyright 2013 Flump Authors

package flump.export {

import flash.filesystem.File;
import flash.utils.ByteArray;
import flash.utils.IDataOutput;

import deng.fzip.FZip;
import deng.fzip.FZipFile;

import flump.display.LibraryLoader;
import flump.xfl.XflLibrary;

public class JSONZipFormat extends PublishFormat
{
    public static const NAME :String = "JSONZip";

    public var outputFile :File;

    public function JSONZipFormat (destDir :File, libs :Vector.<XflLibrary>, conf :ExportConf,
            projectName :String) {
        super(destDir, libs, conf, projectName);
        if (conf.name != null) {
            outputFile = _destDir.resolvePath(conf.name + "/" + location + ".zip");
        } else {
            outputFile = _destDir.resolvePath(location + ".zip");
        }
    }

    override public function get modified () :Boolean {
        if (!outputFile.exists) return true;

        const zip :FZip = new FZip();
        zip.loadBytes(Files.read(outputFile));
        const md5File :FZipFile = zip.getFileByName("md5");
        const md5 :String = md5File.content.readUTFBytes(md5File.content.length);
        return md5 != md5;
    }

    override public function publish() :void {<commit_msg>Fix the modified column check for combined JSONZip formats.<commit_after>//
// Flump - Copyright 2013 Flump Authors

package flump.export {

import flash.filesystem.File;
import flash.utils.ByteArray;
import flash.utils.IDataOutput;

import deng.fzip.FZip;
import deng.fzip.FZipFile;

import flump.display.LibraryLoader;
import flump.xfl.XflLibrary;

public class JSONZipFormat extends PublishFormat
{
    public static const NAME :String = "JSONZip";

    public var outputFile :File;

    public function JSONZipFormat (destDir :File, libs :Vector.<XflLibrary>, conf :ExportConf,
            projectName :String) {
        super(destDir, libs, conf, projectName);
        if (conf.name != null) {
            outputFile = _destDir.resolvePath(conf.name + "/" + location + ".zip");
        } else {
            outputFile = _destDir.resolvePath(location + ".zip");
        }
    }

    override public function get modified () :Boolean {
        if (!outputFile.exists) return true;

        const zip :FZip = new FZip();
        zip.loadBytes(Files.read(outputFile));
        const md5File :FZipFile = zip.getFileByName("md5");
        const md5 :String = md5File.content.readUTFBytes(md5File.content.length);
        return md5 != this.md5;
    }

    override public function publish() :void {
{'fraction_non_alphanumeric': 0.10931970114038538, 'fraction_numerical': 0.008651199370821865, 'mean_word_length': 3.018957345971564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3395230', 'n_tokens_mistral': 783, 'n_tokens_neox': 745, 'n_words': 198}