Explorar el Código

update faq.md

Gildas hace 2 años
padre
commit
24dea6e9fa
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      faq.md

+ 1 - 1
faq.md

@@ -19,7 +19,7 @@ These elements need JavaScript to work properly. By default, SingleFile removes
 By default, Chrome extensions are not allowed to access to pages stored on the filesystem. Therefore, you must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, or to save a page stored on the filesystem.
 
 ## How does the self-extracting ZIP format work?
-The self-extracting ZIP files created by SingleFile are essentially regular ZIP files. They take advantage of the flexibility in the ZIP specification, which allows for additional data to be included before and after the ZIP payload. In the case of SingleFile, this feature is used to make the ZIP file appear as an HTML file. In this way, the data before the ZIP payload represents the start of an HTML file, and the data after the payload represents the end of this HTML file. The resulting HTML page is technically invalid because it contains binary data (i.e. the ZIP payload), but it's within the bounds of the HTML specification to allow for such cases. The ZIP payload is wrapped in tags appropriate to its content. By default, it's stored in a comment node (i.e. wrapped by `<!--` and `-->`). However, if the payload contains the closing tag (i.e. `-->`), then the payload is wrapped in another pairs of tags (i.e. tags of `noscript` or `script` or `xmp` or `plaintext` elements) whose closing tag does not conflict with the payload. Within this HTML page, there is also a script weighting approximately 50KB designed to extract and display the ZIP payload when the page is opened in a web browser.
+The self-extracting ZIP files created by SingleFile are essentially regular ZIP files. They take advantage of the flexibility in the ZIP specification, which allows for additional data to be included before and after the ZIP payload. In the case of SingleFile, this feature is used to make the ZIP file appear as an HTML file. In this way, the data before the ZIP payload represents the start of an HTML file, and the data after the payload represents the end of this HTML file. The resulting HTML page is technically invalid because it contains binary data (i.e. the ZIP payload), but it's within the bounds of the HTML specification to allow for such cases. By default the ZIP payload is stored in a comment node (i.e. wrapped by `<!--` and `-->`). However, if the payload contains the closing tag (i.e. `-->`), then the payload is wrapped in another pairs of tags (i.e. tags of `noscript` or `script` or `xmp` or `plaintext` elements) whose closing tag does not conflict with the payload. Within this HTML page, there is also a script weighting approximately 50KB designed to extract and display the ZIP payload when the page is opened in a web browser.
 
 The purpose of the embedded script is to read the ZIP payload as binary data, extract it, and then display the extracted page with its resources. Initially, the script can use the `window.fetch()` method to read the HTML page in binary form and retrieve the ZIP payload. However, this API doesn't work in Chromium-based and WebKit-based browsers when the page is accessed from the local file system due to security restrictions. To circumvent this, the page is encoded in `windows-1251`, and binary data is directly retrieved from the Document Object Model (DOM) when using the "universal" self-extracting ZIP format. The choice to use `windows-1251` encoding, rather than `UTF-8`, was made because, in `UTF-8`, any invalid bytes are converted into the `U+FFFD REPLACEMENT CHARACTER`, making it impractical for this specific purpose due to a resulting significant data loss. With `windows-1251` encoding, all bytes can be successfully recovered.