public bool Create(Guid id, string filename, byte[] data)
        {
            ICompressionProvider compressionProvider = Factory.GetCompressionProvider(configurationProvider.CompressionProviderType, configurationProvider);
            IEncryptionProvider  encryptionProvider  = Factory.GetEncryptionProvider(configurationProvider.EncryptionProviderType, configurationProvider);
            int originalSize = data.Length;
            Dictionary <string, string> metaData = new Dictionary <string, string>();

            byte[] compressedData = compressionProvider.Compress(data);
            if ((double)compressedData.Length / data.Length <= CompressionThreshold)
            {
                metaData.Add(CompressionKey, configurationProvider.CompressionProviderType.ToString());
                data = compressedData;
            }
            data = encryptionProvider.Encrypt(data);

            if (!(encryptionProvider is PassThroughEncryptionProvider))
            {
                metaData.Add(EncryptionKey, configurationProvider.EncryptionProviderType.ToString());
            }

            if (originalSize != data.Length)
            {
                metaData.Add(OriginalFileSizeKey, originalSize.ToString());
            }

            return(storageProvider.Create(id, filename, data, metaData));
        }