Question:Certkiller .com has a file server named Certkiller -SR07 that stores old inventory files. Certkiller
.com has
given you the task of creating an application to archive these old inventory files.
The inventory files have to be compressed prior to being uploaded to Certkiller .com's Web
server.
You are currently writing a method that will receive a byte array and compress it into a new file.
You need to ensure that a data corruption check takes place during the decompression process.
What should you do? 

A Use the following code:
Public Sub CompressFileWrite(file As String, data As Byte())
Dim fs As New FileStream(file, FileMode.Create)
Dim cs As New DeflateStream(fs, Compressionmode.Compress, True)
cs.Write(data, 0, data.Length)
cs.Close()
End Sub 

B Use the following code:
Public Sub CompressFileWrite(file As String, data As Byte())
Dim fs As New FileStream(file, FileMode.Create)
Dim cs As New GZipStream(fs, Compressionmode.Compress, True)
cs.Compress(data, 0, data.Length)
cs.Close()
End Sub 

C Use the following code:
Public Sub CompressFileWrite(file As String, data As Byte())
Dim fs As New FileStream(file, FileMode.Create)
Dim cs As New DeflateStream(fs, Compressionmode.Compress, True)
cs.Compress(data, 0, data.Length)
cs.Close()
End Sub 

D Use the following code:
Public Sub CompressFileWrite(file As String, data As Byte())
Dim fs As New FileStream(file, FileMode.Create)
Dim cs As New GZipStream(fs, Compressionmode.Compress, True)
cs.Write(data, 0, data.Length)
cs.Close()
End Sub 

+ Answer
+ Report
Total Preview: 907

Copyright © 2024. Powered by Intellect Software Ltd