Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support append and middlestate #40

Merged
merged 3 commits into from
Nov 25, 2016
Merged

support append and middlestate #40

merged 3 commits into from
Nov 25, 2016

Conversation

nankee
Copy link
Contributor

@nankee nankee commented Nov 20, 2016

Rusha is the fastest shajs library we used, but the rusha does not support append, one case does not support large files at the same time concurrent computation, resulting in our webworker use is not flexible, so we extend the implementation of append, getState and setState. At present, we use the transformation Library in https://mail.qq.com every day to calculate the total amount of file size of more than 10T.

nankee added 2 commits November 20, 2016 20:22
support append and middlestate
update self$2 to self
Copy link
Owner

@srijs srijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, thanks! Just a few smaller remarks that would be great if you could address them.

@@ -1 +1,3 @@
node_modules
test/bundle.js
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for adding these to the gitignore?

Copy link
Contributor Author

@nankee nankee Nov 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'am so sorry. I will remove it, that code is introduced not carefully When test.

@@ -300,6 +312,69 @@
return hex(rawDigest(str).buffer);
};

this.start = function () {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether resetState could be a better name for this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a good idea.thanks

this.getState = function () {
var turnOffset = self.offset % self.maxChunkLen,
heap;
if(!turnOffset){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could adhere to the code style here, and insert spaces before { and (, and after }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your advice, i'll resolve them.

1. Rename method
2. Adhere to the source code style
@srijs
Copy link
Owner

srijs commented Nov 25, 2016

Thanks for your contribution! I'll make sure to release a new version as soon as possible.

@srijs srijs merged commit b12d191 into srijs:master Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants