Using the TT source (Lzss.cpp) as a reference, I can see three possible errors in the code you posted:
1) In the codeblock for when the first bit indicates a byte literal (if is_val == true {), you write that byte to your temporary buffer buf, but never put that byte in outbuf. In contrast, the corresponding block of Lzss_Decompression in the TT code (if (type==OCTET)) stores the byte/character in the temporary buffer and writes it to the outfile.
2) In the line that writes a byte/character from buffer to outbuf (outbuf.push(buf[(offs as usize)+(i as usize)])), I think the index of buf needs % BUFFER_SIZE at the end. As written, it looks like it could ask for an illegal element of buf when offs+i > BUFFER_SIZE.
3) The line in the TT code that reads the buffer offset (offs in your code, position in theirs) strangely *decreases* it by 1 from what the bitreader returned (then modulos by 4096 to fix any -1's that generated). That seems really weird, but it's there. Maybe there's something weird about TT's bitreader (Bread_M in Binare.cpp).
But more broadly, something more than these errors must be wrong for your code to generate a 4765 byte file when the header says 2048. Googling a bit, my guess is that you're writing to outbuf incorrectly. You initialized it as a vector of zeros of type u8 with dsize elements, the size of the file you want to write (based on the header). So when you want to write data to it, you should write to an existing element of outbuf; start from element zero, and increment a position counter every time you write to outbuf (whether from a byte literal in the compressed file or from the temporary buffer). In your code, however, you use push, which *adds* an element on the end of the list / vector / serializer / whatever these things are called in Rust. So I would expect that your test has all zeros for the first 2048 bytes, then whatever output your code produces.
Caveats: I don't know C++ or Rust, I can barely read French, and I learned about LZSS compression just now.