Beispiel #1
0
        public void Comprimir()
        {
            string root2 = root;

            root = root + @"\\Upload\\Escritoriovpn.hdef";
            HuffmanEncodeFile hef = new HuffmanEncodeFile(@path, @root);

            byte[] b = hef.Encode();
            root = root2 + @"\\Upload\\Comprimido.huff";
            File.WriteAllBytes(@root, b);
        }
Beispiel #2
0
        public void Descomporimir()
        {
            string root2 = root;
            string root3 = root;

            root = root + @"\\Upload\\Comprimido.huff";
            byte[] fileBytes = FileHelper.GetArchivoBytes(@root);
            root3 = root3 + @"\\Upload\\Escritoriovpn.hdef";
            string bb = HuffmanEncodeFile.Decode(fileBytes, @root3);

            root = root2 + @"\\Upload\\descomprimidoHuff.txt";
            File.WriteAllText(@root, bb);
        }