Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed files are showing up uncompressed and truncated #1582

Open
weller9999 opened this issue Nov 29, 2024 · 2 comments
Open

Compressed files are showing up uncompressed and truncated #1582

weller9999 opened this issue Nov 29, 2024 · 2 comments
Assignees
Milestone

Comments

@weller9999
Copy link

I have a blob mounted in Linux with blobfuse2.

I have a file ending in .log.gz which is 196 bytes:
-rwxr-xr-x 1 mweller mweller 196 Nov 28 21:28 /home/mweller/avayablob/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz*

The file is actually NOT compressed and plaintext.
$ file /home/mweller/avayablob/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz
/home/mweller/avayablob/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz: ASCII text

I can cat it, and it shows only 196 bytes of data but it's truncated at 196 bytes. I thought that was my fault and nothing to do with blobfuse.

However, I used "azcopy copy" to copy the exact same file over, and it looks like the gzip file is actually gzipped and 196 bytes!
This explains why it's truncated. blobfuse2 is decompressing the file and only showing me the # of bytes of the compressed version.

azcopy:
$ file ~/azcopy/cloudflare/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz
/data/mweller/azcopy/cloudflare/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz: gzip compressed data, original size modulo 2^32 459

$ cat ~/azcopy/cloudflare/logs/cloudflare.com/20241129/20241129T052745Z_20241129T052755Z_39c3c619.log.gz|gunzip -c|wc -c
459

It's actually a gzip file, and expanded, the plaintext is 459 bytes.
I only get 196 bytes of the plaintext file with blobfuse2 and not the full 459 bytes.

It seems like blobfuse2 is trying to do me a favour and decompress the file for me on my behalf, but I don't want that.

@vibhansa-msft
Copy link
Member

Blobfuse does not have any functionality to compress or decompress a file. It just uploads and downloads the file "as is".

@syeleti-msft
Copy link
Member

Hi @weller9999, FYI, blobfuse doesn't do compression/decompression. It is all done by client-side applications like gzip in your case. Could you please verify the file format you are working on is actually compressed as it is showing ASCII text in the output. The size of the file you see when using "ls" command is actual size of the compressed file. How do you create the compressed file and did you create it inside mount path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants