# \[Java\] Stuck at write-tee

**URL:** <https://forum.codecrafters.io/t/java-stuck-at-write-tee/13401>\
**Category:** Challenges\
**Tags:** challenge:git\
**Created:** [July 12, 2025, 9:51am UTC](https://forum.codecrafters.io/t/java-stuck-at-write-tee/13401 "2025-07-12T09:51:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Widua](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/widua/32/13975_2.png) [@Widua](https://forum.codecrafters.io/u/Widua)\
**Post date:** [July 12, 2025, 9:51am UTC](https://forum.codecrafters.io/t/java-stuck-at-write-tee/13401/1 "2025-07-12T09:51:36Z")

</div>

I coded solution for write-tree command. And when I’m testing it it outputs the same SHA-1 as git, after zlib-decompression files looks 1:1, zlib-compressed file also looks the same for git implementation, and for my implementation.

 ![cat of compressed file](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/e/efc55dfd4cacc46da09a9f2aa0db32e3b0fa8f18.png)

But I’m still receiving “test failed” with message ": Git object file doesn’t match official Git implementation. This file must be zlib-compressed.

I forgot to implement something? I tried almost everything, and I’m still receiving same error message.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [July 13, 2025, 4:00am UTC](https://forum.codecrafters.io/t/java-stuck-at-write-tee/13401/4 "2025-07-13T04:00:13Z")

</div>

Hey @Widua, looks like your implementation is adding some trailing zeros that aren’t part of the Git specification.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/0/0bf28e276643db35b2e3b3822ca96ddc43a62538.png)

Let me know if you’d like further assistance!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [July 18, 2025, 4:00am UTC](https://forum.codecrafters.io/t/java-stuck-at-write-tee/13401/6 "2025-07-18T04:00:18Z")

</div>

Closed on July 18, 2025, 4:00am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
