Linked Questions

1 vote
1 answer
4k views

PHP's 'gzuncompress' function in the shell? [duplicate]

Possible Duplicate: Deflate command line tool Yes, I know I can use PHP itself on the shell, but I need this functionality in a script that is deployed before PHP is available. I've tried gzip ...
Oliver Salzburg's user avatar
2 votes
1 answer
7k views

Uncompressing zlib file in command line [duplicate]

When Git stores a snapshot of a file, it stores an object called a blob. This is compressed using zlib..see http://nfarina.com/post/9868516270/git-is-simpler; either I am blind or he doesn't explain ...
killjoy's user avatar
  • 969
192 votes
2 answers
145k views

How to properly handle a gzipped page when using curl?

I wrote a bash script that gets output from a website using curl and does a bunch of string manipulation on the html output. The problem is when I run it against a site that is returning its output ...
BryanH's user avatar
  • 5,984
59 votes
5 answers
23k views

What is the internal format of a Git tree object?

What is the format of a Git tree object's content? The content of a blob object is blob [size of string] NUL [string], but what is it for a tree object?
Bystysz's user avatar
  • 741
27 votes
4 answers
19k views

What is the file format of a git commit object data structure?

Context: I was hoping to be able to search through my git commit messages and commits without having to go through the puzzlingly complex git grep command, so I decided to see how git commit messages ...
Tara Roys's user avatar
  • 1,826
19 votes
5 answers
14k views

How to view git objects and index without using git

Using the OS X terminal, How an you view the contents of these files as plain text?
Corey Floyd's user avatar
  • 25.9k
16 votes
2 answers
25k views

How to read a .deflate file in hadoop

I got some pig generated files with part-r-00000.deflate extension. I know this is a compressed file. How do I generate a normal file in a readable format. When I used hadoop fs -text, I cannot get ...
Himateja Madala's user avatar
12 votes
3 answers
7k views

Commit directly to a bare repository

Some Context what this fits into A collaboration focused web application that offers git hosting (as bare repos) what we want to do Allow users to add a set of files directly to their existing ...
rennat's user avatar
  • 2,539
2 votes
4 answers
10k views

Database file with 78 9C header?

I've come to work with a strange database file format. Each DB comes with two files: one is "database.db" and the other is "database.key". The ".db" file always starts with a 0x78 0x9C binary header, ...
titanicsnake's user avatar
3 votes
2 answers
2k views

How hash is calculated for commit vs tree vs blobs?

I am confused as to how SHA-1 hashes are calculated for commits, trees, and blobs. As per this article, commit hashes are calculated based on following factors: The source tree of the commit (which ...
appu's user avatar
  • 481
4 votes
4 answers
3k views

What is the format of a git tag object and how to calculate its SHA?

I am familiar with how Git creates SHA1 hashes for files (blobs), but not how they are created for tag objects. I assume they are, if I create an annotated tag, but what is the recipe? And how might I ...
theory's user avatar
  • 9,535
8 votes
1 answer
990 views

How can it be that a commit object has 2 authors?

The commit 487128950df6ee433c131b5feaafe81ee86629f4 can be found at https://github.com/signalwire/freeswitch.git. git log -1 487128950df6ee433c131b5feaafe81ee86629f4 --pretty=fuller prints: commit ...
ElpieKay's user avatar
  • 29.8k
2 votes
1 answer
1k views

Where does git store blob object?

I understand that git compress the file and then calculate the SHA1 and store that in .git/objects/ and we can see the content using git cat-file -p 'sha1' but I am interested to know where does git ...
Ashish's user avatar
  • 14.6k
1 vote
1 answer
3k views

How to read a part-00000.deflate file on linux

I have written a spark word count program using below code: package com.practice import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession object WordCount { val sparkConf = new ...
Metadata's user avatar
  • 2,105
0 votes
1 answer
117 views

Replicating `git hash-object` with non-ascii characters

Trying to replicate hash-object I found that is not working when using non-ascii characters. $ printf hola | git hash-object -w --stdin b8b4a4e2a5db3ebed5f5e02beb3e2d27bca9fc9a $ printf "blob 4\0hola"...
Enzo's user avatar
  • 4,141