public static void CreateResourceFile(string filename, Dictionary<string, object> data)
        {
            System.IO.MemoryStream memStream = new System.IO.MemoryStream();

            System.Resources.ResourceWriter rw = new System.Resources.ResourceWriter(memStream);

            System.Collections.IDictionaryEnumerator dictEnum = data.GetEnumerator();

            while (dictEnum.MoveNext())
            {
                if(dictEnum.Value != null)
                    rw.AddResource(dictEnum.Key.ToString(), dictEnum.Value);
            }

            rw.Generate();

            byte[] resourceBytes = FileUtils.GetStreamBytes(memStream);

            resourceBytes = Utilities.CryptoUtils.Encrypt(resourceBytes, "asdlfa9sd879*Lasldflkajsdf243o8729");

            // Zip the bytes
            /*MemoryStream zippedMemStream = new MemoryStream();
            System.IO.Compression.GZipStream zipStream = new System.IO.Compression.GZipStream(zippedMemStream, System.IO.Compression.CompressionMode.Compress);

            byte[] resourceBytes = FileUtils.GetStreamBytes(memStream);
            zipStream.Write(resourceBytes, 0, resourceBytes.Length);

            // Now Encrypt the resource file
            zippedMemStream.Position = 0;
            resourceBytes = Utilities.CryptoUtils.Encrypt(FileUtils.GetStreamBytes(zippedMemStream), "asdlfa9sd879*Lasldflkajsdf243o8729");

            zippedMemStream.Close();
            zippedMemStream.Dispose();*/

            memStream.Close();
            memStream.Dispose();

            rw.Close();
            rw.Dispose();

            File.WriteAllBytes(filename, resourceBytes);
        }