{"id":4942,"date":"2023-04-01T15:20:00","date_gmt":"2023-04-01T20:20:00","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=4942"},"modified":"2023-04-01T13:44:51","modified_gmt":"2023-04-01T18:44:51","slug":"how-to-read-git-object-file-without-git","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-read-git-object-file-without-git\/","title":{"rendered":"How to Read git Object File Without git?"},"content":{"rendered":"\n<p>Git object files are a zlib compressed data file type.  <\/p>\n\n\n\n<p>We can check this by running the file command.  &#8220;6ae4147121f0165e7c0e309bad649c2c4d3a55&#8221; is our git file of interest.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ file 6ae4147121f0165e7c0e309bad649c2c4d3a55<br>6ae4147121f0165e7c0e309bad649c2c4d3a55: zlib compressed data<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/1532405\/how-to-view-git-objects-and-index-without-using-git\">https:\/\/stackoverflow.com\/questions\/1532405\/how-to-view-git-objects-and-index-without-using-git<\/a><\/p>\n\n\n\n<p>The above link has helpful information.  Easiest way I found was to install zlib-flate by installing qpdf with apt.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install qpdf<\/pre>\n\n\n\n<p>We can now use the zlib-flate command with the -uncompress option to decompress the file and print the contents.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ zlib-flate -uncompress &lt; 6ae4147121f0165e7c0e309bad649c2c4d3a55\nvar b64 = (\"\");\nconsole.log(b64);<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git object files are a zlib compressed data file type. We can check this by running the file command. &#8220;6ae4147121f0165e7c0e309bad649c2c4d3a55&#8221; is our git file of interest. $ file 6ae4147121f0165e7c0e309bad649c2c4d3a556ae4147121f0165e7c0e309bad649c2c4d3a55: zlib compressed data https:\/\/stackoverflow.com\/questions\/1532405\/how-to-view-git-objects-and-index-without-using-git The above link has helpful information. Easiest &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-read-git-object-file-without-git\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1441,1439,927,1440],"class_list":["post-4942","post","type-post","status-publish","format-standard","hentry","category-linux","tag-compressed-data","tag-decoding","tag-git","tag-zlib"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=4942"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4942\/revisions"}],"predecessor-version":[{"id":4943,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4942\/revisions\/4943"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=4942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=4942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=4942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}