Git Product home page Git Product logo

lt-code's People

Contributors

abioy avatar anrosent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lt-code's Issues

problems about encode

Sorry, the problem is because of my wrong understanding. Please ignore and close it.

[bug] I find a bug here

I read this code as needed, and I find there is small bug here, on my computer I can't get the right data.
after several hours hard work. I find the byte order isn't pair here.

you have read the data from the file use the sys.byteorder, but when you finish get out all the block in the
decode process, you just use the big as the byteorder not the sys.byteorder, it will cause some bug on several computer.

Issue with decoder

Hello Anson , I know that project has some years , maybe u could help me Im trying to use the decoder but that simply gets stuck . At the enconder Im using simple txt file from no more than 4 kb. I always have to interrupt the decoder

the function _read_block(blocksize, stream): --> which one should be returned ?
return int.from_bytes(blockdata, 'big')
#return int.from_bytes(blockdata, sys.byteorder)

rom@rom-virtual-machine:~/Documents/GIT/LT-code-master$ ./bin/encome/rom/Documents/GIT/LT-code-master/filename.txt 64

(base) rom@rom-virtual-machine:~/Documents/GIT/LT-code-master$ ./bin/decoder
^CTraceback (most recent call last):
File "/home/rom/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/rom/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/rom/Documents/GIT/LT-code-master/lt/decode/main.py", line 25, in
run(sys.stdin.buffer)
File "/home/rom/Documents/GIT/LT-code-master/lt/decode/main.py", line 19, in run
payload = decode.decode(stream)
File "/home/rom/Documents/GIT/LT-code-master/lt/decode/init.py", line 169, in decode
for lt_block in read_blocks(in_stream):
File "/home/rom/Documents/GIT/LT-code-master/lt/decode/init.py", line 156, in read_blocks
header = _read_header(stream)
File "/home/rom/Documents/GIT/LT-code-master/lt/decode/init.py", line 142, in _read_header
header_bytes = stream.read(12)
KeyboardInterrupt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.