用JavaScript读写二进制文件

标签: , , ,

中文网上的垃圾代码我就不评论了,我已经词穷了。终于知道为什么不懂英语就学不好编程了,因为中文网站上的代码垃圾透了。不解释,你分别Google关键词“JavaScript 二进制文件”和“javascript binary file”,对比搜索出来的第一个网页就知道了。也行不同的时候搜出来的不一样,反正我搜出来的分别是如何用JavaScript读写二进制文件?Reading and Writing Binary Files Using JScript。什么是差距,这就是差距。

《Reading and Writing Binary Files Using JScript》,看到那一大段数组的代码我就折服了,一个一个敲得敲多久啊。

As I have pushed what I can do in JScript, I have come up against the issue of binary files. The following class solved this for small to medium size files. I am partly including this post here because I am about to put in a post about sending emails with attachments via JScript, and it will use this binary file code to read in the binary attachment files.

在我思考我能用JScript做什么的时候,我想到了处理二进制文件。下面的类可以处理从小型到中等大小的文件。我现在部分发表这篇文章是因为我准备发表一篇怎样用JScript发送带附件的邮件的文章,它将使用这个处理二进制文件的代码读取二进制的附件文件。

So, here is a nice way of accessing binary files from JScript. If you want to access this object from VBScript, then put it in a SWF file. This object has been used in anger to upload files to a Web Service, and has proven to be nice and fast for files in the 0-10 MB range.

所以,这里有一个很好的使用JScript访问二进制文件的方法。如果你希望从VBScript访问这个对象,将它放到SWF文件中。这个对象已经被使用来上次文件到Web服务器,并且被证明能高效和迅速处理0-10M范围的文件。

以上。代码就不复制粘贴了,想要自己到原网站看。

赞赏

微信赞赏支付宝赞赏

随机文章:

  1. WMI工具:WMI Object Browser
  2. VBS中CreateObject和WScript.CreateObject的区别
  3. 用VBS实现PHP的md5_file函数
  4. VBS过程和函数参数传递的方式默认是ByVal还是ByRef?
  5. VBS里的变量名和标识符(Identifiers)

留下回复