[
  {
    "path": ".classpath",
    "content": "<classpath>\n  <classpathentry kind=\"src\" path=\"src/test/java\" output=\"target/test-classes\" including=\"**/*.java\"/>\n  <classpathentry kind=\"src\" path=\"src/test/resources\" output=\"target/test-classes\" excluding=\"**/*.java\"/>\n  <classpathentry kind=\"src\" path=\"src/main/java\" including=\"**/*.java\"/>\n  <classpathentry kind=\"output\" path=\"target/classes\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/commons-configuration/commons-configuration/1.10/commons-configuration-1.10.jar\" sourcepath=\"M2_REPO/commons-configuration/commons-configuration/1.10/commons-configuration-1.10-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar\" sourcepath=\"M2_REPO/commons-io/commons-io/2.4/commons-io-2.4-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar\" sourcepath=\"M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/apache/tinkerpop/gremlin-core/3.3.0/gremlin-core-3.3.0.jar\" sourcepath=\"M2_REPO/org/apache/tinkerpop/gremlin-core/3.3.0/gremlin-core-3.3.0-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/apache/tinkerpop/gremlin-shaded/3.3.0/gremlin-shaded-3.3.0.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/apache/tinkerpop/gremlin-test/3.3.0/gremlin-test-3.3.0.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar\" sourcepath=\"M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/carrotsearch/hppc/0.7.1/hppc-0.7.1.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.9.2/jackson-annotations-2.9.2.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/fasterxml/jackson/core/jackson-core/2.9.2/jackson-core-2.9.2.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.9.2/jackson-databind-2.9.2.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/squareup/javapoet/1.8.0/javapoet-1.8.0.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/javatuples/javatuples/1.2/javatuples-1.2.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/jcabi/jcabi-log/0.14/jcabi-log-0.14.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/jcabi/jcabi-manifests/1.1/jcabi-manifests-1.1.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/junit/junit/4.12/junit-4.12.jar\" sourcepath=\"M2_REPO/junit/junit/4.12/junit-4.12-sources.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/com/nesscomputing/components/ness-core/1.8.0/ness-core-1.8.0.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/objenesis/objenesis/2.1/objenesis-2.1.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar\"/>\n  <classpathentry kind=\"var\" path=\"M2_REPO/org/yaml/snakeyaml/1.15/snakeyaml-1.15.jar\"/>\n  <classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n</classpath>"
  },
  {
    "path": ".git-blame-ignore-revs",
    "content": "# reformat with Maveniverse parent 39\n641fdf861487e91b277fda8f06cc852842d14f60\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n\n- package-ecosystem: \"maven\"\n  directory: \"/\"\n  schedule:\n    interval: \"daily\"\n\n- package-ecosystem: \"github-actions\"\n  directory: \"/\"\n  schedule:\n    interval: \"daily\"\n\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n\njobs:\n  build:\n    name: Verify\n    uses: maveniverse/parent/.github/workflows/ci.yml@release-51\n    with:\n      maven-test-run: false # ITs are currently busted and needs to go to separate module\n      jdk-matrix: '[ \"8\", \"17\", \"21\", \"25\" ]'\n      maven-matrix: '[ \"3.9.12\" ]'\n      maven-test: './mvnw clean verify -e -B -V -P run-its'\n"
  },
  {
    "path": ".gitignore",
    "content": "target\n*.iml\n.idea\n*~\n"
  },
  {
    "path": ".mvn/wrapper/maven-wrapper.properties",
    "content": "wrapperVersion=3.3.4\ndistributionType=only-script\ndistributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip\n"
  },
  {
    "path": ".project",
    "content": "<projectDescription>\n  <name>bitsy</name>\n  <comment>Bitsy v3 is a small, fast, embeddable, durable in-memory graph database that is compatible with Tinkerpop3. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\n  <projects/>\n  <buildSpec>\n    <buildCommand>\n      <name>org.eclipse.jdt.core.javabuilder</name>\n    </buildCommand>\n  </buildSpec>\n  <natures>\n    <nature>org.eclipse.jdt.core.javanature</nature>\n  </natures>\n</projectDescription>"
  },
  {
    "path": ".settings/org.eclipse.jdt.core.prefs",
    "content": "#Thu Nov 02 18:34:43 EDT 2017\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\neclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.source=1.8\norg.eclipse.jdt.core.compiler.compliance=1.8\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "NOTICE",
    "content": "This product depends on the following components: \n\n- Tinkerpop Gremlin (gremlin-core, gremlin-test)\n    http://tinkerpop.apache.org/\n    Apache 2.0 license\n    Copyright (c) 2015- The Apache Software Foundation.\n\n- Jackson JSON processor (jackson-core, jackson-databind)\n    https://github.com/FasterXML/\n    Apache 2.0 license\n    Copyright (c) 2007- Tatu Saloranta, tatu.saloranta@iki.fi\n    \n- Ness Computing Core Component (components-ness-core)\n    https://github.com/NessComputing/components-ness-core\n    Apache 2.0 license\n    Copyright (C) 2012- Ness Computing, Inc.\n    \n- SLF4J API (slf4j-api)\n    http://www.slf4j.org/\n    MIT license\n    Copyright (c) 2004- QOS.ch \n"
  },
  {
    "path": "README.md",
    "content": "[![Maven Central](https://img.shields.io/maven-central/v/com.lambdazen.bitsy/bitsy.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.lambdazen.bitsy/bitsy)\n\nBitsy is a small, fast, embeddable, durable in-memory graph database that is compatible with Tinkerpop3. \n\n[The project Wiki](https://github.com/lambdazen/bitsy/wiki) is the official source of documentation. The original version of the database compatible with Tinkerpop2 is available at https://bitbucket.org/lambdazen/bitsy. \n\n### Git branching strategy\n\nTags are named release-[version]. Versions start with 3.0. For e.g., release-3.0\n\nDevelopment happens on `master` branch.\n\n## Building it\n\nThe project **build time requirement** is [Apache Maven](https://maven.apache.org/), at least version 3.9 and Java 21.\nThe project **run time requirement is Java 8**.\n\nFor quick build (runs no tests nor any other plugin like javadoc)\n\n```\nmvn clean install -Dtest=void\n```\n\nFor UT-only build (will run UTs too)\n\n```\nmvn clean install\n```\n\nFor full build (will run UTs and ITs)\n\n```\nmvn clean install -P run-its\n```\n\nFor publishing setup, see [parent POM](https://github.com/maveniverse/parent)."
  },
  {
    "path": "mvnw",
    "content": "#!/bin/sh\n# ----------------------------------------------------------------------------\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n# ----------------------------------------------------------------------------\n\n# ----------------------------------------------------------------------------\n# Apache Maven Wrapper startup batch script, version 3.3.4\n#\n# Optional ENV vars\n# -----------------\n#   JAVA_HOME - location of a JDK home dir, required when download maven via java source\n#   MVNW_REPOURL - repo url base for downloading maven distribution\n#   MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven\n#   MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output\n# ----------------------------------------------------------------------------\n\nset -euf\n[ \"${MVNW_VERBOSE-}\" != debug ] || set -x\n\n# OS specific support.\nnative_path() { printf %s\\\\n \"$1\"; }\ncase \"$(uname)\" in\nCYGWIN* | MINGW*)\n  [ -z \"${JAVA_HOME-}\" ] || JAVA_HOME=\"$(cygpath --unix \"$JAVA_HOME\")\"\n  native_path() { cygpath --path --windows \"$1\"; }\n  ;;\nesac\n\n# set JAVACMD and JAVACCMD\nset_java_home() {\n  # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched\n  if [ -n \"${JAVA_HOME-}\" ]; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ]; then\n      # IBM's JDK on AIX uses strange locations for the executables\n      JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n      JAVACCMD=\"$JAVA_HOME/jre/sh/javac\"\n    else\n      JAVACMD=\"$JAVA_HOME/bin/java\"\n      JAVACCMD=\"$JAVA_HOME/bin/javac\"\n\n      if [ ! -x \"$JAVACMD\" ] || [ ! -x \"$JAVACCMD\" ]; then\n        echo \"The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run.\" >&2\n        echo \"JAVA_HOME is set to \\\"$JAVA_HOME\\\", but \\\"\\$JAVA_HOME/bin/java\\\" or \\\"\\$JAVA_HOME/bin/javac\\\" does not exist.\" >&2\n        return 1\n      fi\n    fi\n  else\n    JAVACMD=\"$(\n      'set' +e\n      'unset' -f command 2>/dev/null\n      'command' -v java\n    )\" || :\n    JAVACCMD=\"$(\n      'set' +e\n      'unset' -f command 2>/dev/null\n      'command' -v javac\n    )\" || :\n\n    if [ ! -x \"${JAVACMD-}\" ] || [ ! -x \"${JAVACCMD-}\" ]; then\n      echo \"The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run.\" >&2\n      return 1\n    fi\n  fi\n}\n\n# hash string like Java String::hashCode\nhash_string() {\n  str=\"${1:-}\" h=0\n  while [ -n \"$str\" ]; do\n    char=\"${str%\"${str#?}\"}\"\n    h=$(((h * 31 + $(LC_CTYPE=C printf %d \"'$char\")) % 4294967296))\n    str=\"${str#?}\"\n  done\n  printf %x\\\\n $h\n}\n\nverbose() { :; }\n[ \"${MVNW_VERBOSE-}\" != true ] || verbose() { printf %s\\\\n \"${1-}\"; }\n\ndie() {\n  printf %s\\\\n \"$1\" >&2\n  exit 1\n}\n\ntrim() {\n  # MWRAPPER-139:\n  #   Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.\n  #   Needed for removing poorly interpreted newline sequences when running in more\n  #   exotic environments such as mingw bash on Windows.\n  printf \"%s\" \"${1}\" | tr -d '[:space:]'\n}\n\nscriptDir=\"$(dirname \"$0\")\"\nscriptName=\"$(basename \"$0\")\"\n\n# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties\nwhile IFS=\"=\" read -r key value; do\n  case \"${key-}\" in\n  distributionUrl) distributionUrl=$(trim \"${value-}\") ;;\n  distributionSha256Sum) distributionSha256Sum=$(trim \"${value-}\") ;;\n  esac\ndone <\"$scriptDir/.mvn/wrapper/maven-wrapper.properties\"\n[ -n \"${distributionUrl-}\" ] || die \"cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties\"\n\ncase \"${distributionUrl##*/}\" in\nmaven-mvnd-*bin.*)\n  MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/\n  case \"${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)\" in\n  *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;\n  :Darwin*x86_64) distributionPlatform=darwin-amd64 ;;\n  :Darwin*arm64) distributionPlatform=darwin-aarch64 ;;\n  :Linux*x86_64*) distributionPlatform=linux-amd64 ;;\n  *)\n    echo \"Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version\" >&2\n    distributionPlatform=linux-amd64\n    ;;\n  esac\n  distributionUrl=\"${distributionUrl%-bin.*}-$distributionPlatform.zip\"\n  ;;\nmaven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;\n*) MVN_CMD=\"mvn${scriptName#mvnw}\" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;\nesac\n\n# apply MVNW_REPOURL and calculate MAVEN_HOME\n# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>\n[ -z \"${MVNW_REPOURL-}\" ] || distributionUrl=\"$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*\"$_MVNW_REPO_PATTERN\"}\"\ndistributionUrlName=\"${distributionUrl##*/}\"\ndistributionUrlNameMain=\"${distributionUrlName%.*}\"\ndistributionUrlNameMain=\"${distributionUrlNameMain%-bin}\"\nMAVEN_USER_HOME=\"${MAVEN_USER_HOME:-${HOME}/.m2}\"\nMAVEN_HOME=\"${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string \"$distributionUrl\")\"\n\nexec_maven() {\n  unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :\n  exec \"$MAVEN_HOME/bin/$MVN_CMD\" \"$@\" || die \"cannot exec $MAVEN_HOME/bin/$MVN_CMD\"\n}\n\nif [ -d \"$MAVEN_HOME\" ]; then\n  verbose \"found existing MAVEN_HOME at $MAVEN_HOME\"\n  exec_maven \"$@\"\nfi\n\ncase \"${distributionUrl-}\" in\n*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;\n*) die \"distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'\" ;;\nesac\n\n# prepare tmp dir\nif TMP_DOWNLOAD_DIR=\"$(mktemp -d)\" && [ -d \"$TMP_DOWNLOAD_DIR\" ]; then\n  clean() { rm -rf -- \"$TMP_DOWNLOAD_DIR\"; }\n  trap clean HUP INT TERM EXIT\nelse\n  die \"cannot create temp dir\"\nfi\n\nmkdir -p -- \"${MAVEN_HOME%/*}\"\n\n# Download and Install Apache Maven\nverbose \"Couldn't find MAVEN_HOME, downloading and installing it ...\"\nverbose \"Downloading from: $distributionUrl\"\nverbose \"Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName\"\n\n# select .zip or .tar.gz\nif ! command -v unzip >/dev/null; then\n  distributionUrl=\"${distributionUrl%.zip}.tar.gz\"\n  distributionUrlName=\"${distributionUrl##*/}\"\nfi\n\n# verbose opt\n__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''\n[ \"${MVNW_VERBOSE-}\" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v\n\n# normalize http auth\ncase \"${MVNW_PASSWORD:+has-password}\" in\n'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;\nhas-password) [ -n \"${MVNW_USERNAME-}\" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;\nesac\n\nif [ -z \"${MVNW_USERNAME-}\" ] && command -v wget >/dev/null; then\n  verbose \"Found wget ... using wget\"\n  wget ${__MVNW_QUIET_WGET:+\"$__MVNW_QUIET_WGET\"} \"$distributionUrl\" -O \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" || die \"wget: Failed to fetch $distributionUrl\"\nelif [ -z \"${MVNW_USERNAME-}\" ] && command -v curl >/dev/null; then\n  verbose \"Found curl ... using curl\"\n  curl ${__MVNW_QUIET_CURL:+\"$__MVNW_QUIET_CURL\"} -f -L -o \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" \"$distributionUrl\" || die \"curl: Failed to fetch $distributionUrl\"\nelif set_java_home; then\n  verbose \"Falling back to use Java to download\"\n  javaSource=\"$TMP_DOWNLOAD_DIR/Downloader.java\"\n  targetZip=\"$TMP_DOWNLOAD_DIR/$distributionUrlName\"\n  cat >\"$javaSource\" <<-END\n\tpublic class Downloader extends java.net.Authenticator\n\t{\n\t  protected java.net.PasswordAuthentication getPasswordAuthentication()\n\t  {\n\t    return new java.net.PasswordAuthentication( System.getenv( \"MVNW_USERNAME\" ), System.getenv( \"MVNW_PASSWORD\" ).toCharArray() );\n\t  }\n\t  public static void main( String[] args ) throws Exception\n\t  {\n\t    setDefault( new Downloader() );\n\t    java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );\n\t  }\n\t}\n\tEND\n  # For Cygwin/MinGW, switch paths to Windows format before running javac and java\n  verbose \" - Compiling Downloader.java ...\"\n  \"$(native_path \"$JAVACCMD\")\" \"$(native_path \"$javaSource\")\" || die \"Failed to compile Downloader.java\"\n  verbose \" - Running Downloader.java ...\"\n  \"$(native_path \"$JAVACMD\")\" -cp \"$(native_path \"$TMP_DOWNLOAD_DIR\")\" Downloader \"$distributionUrl\" \"$(native_path \"$targetZip\")\"\nfi\n\n# If specified, validate the SHA-256 sum of the Maven distribution zip file\nif [ -n \"${distributionSha256Sum-}\" ]; then\n  distributionSha256Result=false\n  if [ \"$MVN_CMD\" = mvnd.sh ]; then\n    echo \"Checksum validation is not supported for maven-mvnd.\" >&2\n    echo \"Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties.\" >&2\n    exit 1\n  elif command -v sha256sum >/dev/null; then\n    if echo \"$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName\" | sha256sum -c - >/dev/null 2>&1; then\n      distributionSha256Result=true\n    fi\n  elif command -v shasum >/dev/null; then\n    if echo \"$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName\" | shasum -a 256 -c >/dev/null 2>&1; then\n      distributionSha256Result=true\n    fi\n  else\n    echo \"Checksum validation was requested but neither 'sha256sum' or 'shasum' are available.\" >&2\n    echo \"Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties.\" >&2\n    exit 1\n  fi\n  if [ $distributionSha256Result = false ]; then\n    echo \"Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised.\" >&2\n    echo \"If you updated your Maven version, you need to update the specified distributionSha256Sum property.\" >&2\n    exit 1\n  fi\nfi\n\n# unzip and move\nif command -v unzip >/dev/null; then\n  unzip ${__MVNW_QUIET_UNZIP:+\"$__MVNW_QUIET_UNZIP\"} \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" -d \"$TMP_DOWNLOAD_DIR\" || die \"failed to unzip\"\nelse\n  tar xzf${__MVNW_QUIET_TAR:+\"$__MVNW_QUIET_TAR\"} \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" -C \"$TMP_DOWNLOAD_DIR\" || die \"failed to untar\"\nfi\n\n# Find the actual extracted directory name (handles snapshots where filename != directory name)\nactualDistributionDir=\"\"\n\n# First try the expected directory name (for regular distributions)\nif [ -d \"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain\" ]; then\n  if [ -f \"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD\" ]; then\n    actualDistributionDir=\"$distributionUrlNameMain\"\n  fi\nfi\n\n# If not found, search for any directory with the Maven executable (for snapshots)\nif [ -z \"$actualDistributionDir\" ]; then\n  # enable globbing to iterate over items\n  set +f\n  for dir in \"$TMP_DOWNLOAD_DIR\"/*; do\n    if [ -d \"$dir\" ]; then\n      if [ -f \"$dir/bin/$MVN_CMD\" ]; then\n        actualDistributionDir=\"$(basename \"$dir\")\"\n        break\n      fi\n    fi\n  done\n  set -f\nfi\n\nif [ -z \"$actualDistributionDir\" ]; then\n  verbose \"Contents of $TMP_DOWNLOAD_DIR:\"\n  verbose \"$(ls -la \"$TMP_DOWNLOAD_DIR\")\"\n  die \"Could not find Maven distribution directory in extracted archive\"\nfi\n\nverbose \"Found extracted Maven distribution directory: $actualDistributionDir\"\nprintf %s\\\\n \"$distributionUrl\" >\"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url\"\nmv -- \"$TMP_DOWNLOAD_DIR/$actualDistributionDir\" \"$MAVEN_HOME\" || [ -d \"$MAVEN_HOME\" ] || die \"fail to move MAVEN_HOME\"\n\nclean || :\nexec_maven \"$@\"\n"
  },
  {
    "path": "mvnw.cmd",
    "content": "<# : batch portion\r\n@REM ----------------------------------------------------------------------------\r\n@REM Licensed to the Apache Software Foundation (ASF) under one\r\n@REM or more contributor license agreements.  See the NOTICE file\r\n@REM distributed with this work for additional information\r\n@REM regarding copyright ownership.  The ASF licenses this file\r\n@REM to you under the Apache License, Version 2.0 (the\r\n@REM \"License\"); you may not use this file except in compliance\r\n@REM with the License.  You may obtain a copy of the License at\r\n@REM\r\n@REM    http://www.apache.org/licenses/LICENSE-2.0\r\n@REM\r\n@REM Unless required by applicable law or agreed to in writing,\r\n@REM software distributed under the License is distributed on an\r\n@REM \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n@REM KIND, either express or implied.  See the License for the\r\n@REM specific language governing permissions and limitations\r\n@REM under the License.\r\n@REM ----------------------------------------------------------------------------\r\n\r\n@REM ----------------------------------------------------------------------------\r\n@REM Apache Maven Wrapper startup batch script, version 3.3.4\r\n@REM\r\n@REM Optional ENV vars\r\n@REM   MVNW_REPOURL - repo url base for downloading maven distribution\r\n@REM   MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven\r\n@REM   MVNW_VERBOSE - true: enable verbose log; others: silence the output\r\n@REM ----------------------------------------------------------------------------\r\n\r\n@IF \"%__MVNW_ARG0_NAME__%\"==\"\" (SET __MVNW_ARG0_NAME__=%~nx0)\r\n@SET __MVNW_CMD__=\r\n@SET __MVNW_ERROR__=\r\n@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%\r\n@SET PSModulePath=\r\n@FOR /F \"usebackq tokens=1* delims==\" %%A IN (`powershell -noprofile \"& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}\"`) DO @(\r\n  IF \"%%A\"==\"MVN_CMD\" (set __MVNW_CMD__=%%B) ELSE IF \"%%B\"==\"\" (echo %%A) ELSE (echo %%A=%%B)\r\n)\r\n@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%\r\n@SET __MVNW_PSMODULEP_SAVE=\r\n@SET __MVNW_ARG0_NAME__=\r\n@SET MVNW_USERNAME=\r\n@SET MVNW_PASSWORD=\r\n@IF NOT \"%__MVNW_CMD__%\"==\"\" (\"%__MVNW_CMD__%\" %*)\r\n@echo Cannot start maven from wrapper >&2 && exit /b 1\r\n@GOTO :EOF\r\n: end batch / begin powershell #>\r\n\r\n$ErrorActionPreference = \"Stop\"\r\nif ($env:MVNW_VERBOSE -eq \"true\") {\r\n  $VerbosePreference = \"Continue\"\r\n}\r\n\r\n# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties\r\n$distributionUrl = (Get-Content -Raw \"$scriptDir/.mvn/wrapper/maven-wrapper.properties\" | ConvertFrom-StringData).distributionUrl\r\nif (!$distributionUrl) {\r\n  Write-Error \"cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties\"\r\n}\r\n\r\nswitch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {\r\n  \"maven-mvnd-*\" {\r\n    $USE_MVND = $true\r\n    $distributionUrl = $distributionUrl -replace '-bin\\.[^.]*$',\"-windows-amd64.zip\"\r\n    $MVN_CMD = \"mvnd.cmd\"\r\n    break\r\n  }\r\n  default {\r\n    $USE_MVND = $false\r\n    $MVN_CMD = $script -replace '^mvnw','mvn'\r\n    break\r\n  }\r\n}\r\n\r\n# apply MVNW_REPOURL and calculate MAVEN_HOME\r\n# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>\r\nif ($env:MVNW_REPOURL) {\r\n  $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { \"/org/apache/maven/\" } else { \"/maven/mvnd/\" }\r\n  $distributionUrl = \"$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace \"^.*$MVNW_REPO_PATTERN\",'')\"\r\n}\r\n$distributionUrlName = $distributionUrl -replace '^.*/',''\r\n$distributionUrlNameMain = $distributionUrlName -replace '\\.[^.]*$','' -replace '-bin$',''\r\n\r\n$MAVEN_M2_PATH = \"$HOME/.m2\"\r\nif ($env:MAVEN_USER_HOME) {\r\n  $MAVEN_M2_PATH = \"$env:MAVEN_USER_HOME\"\r\n}\r\n\r\nif (-not (Test-Path -Path $MAVEN_M2_PATH)) {\r\n    New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null\r\n}\r\n\r\n$MAVEN_WRAPPER_DISTS = $null\r\nif ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {\r\n  $MAVEN_WRAPPER_DISTS = \"$MAVEN_M2_PATH/wrapper/dists\"\r\n} else {\r\n  $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + \"/wrapper/dists\"\r\n}\r\n\r\n$MAVEN_HOME_PARENT = \"$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain\"\r\n$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString(\"x2\")}) -join ''\r\n$MAVEN_HOME = \"$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME\"\r\n\r\nif (Test-Path -Path \"$MAVEN_HOME\" -PathType Container) {\r\n  Write-Verbose \"found existing MAVEN_HOME at $MAVEN_HOME\"\r\n  Write-Output \"MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD\"\r\n  exit $?\r\n}\r\n\r\nif (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {\r\n  Write-Error \"distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl\"\r\n}\r\n\r\n# prepare tmp dir\r\n$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile\r\n$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path \"$TMP_DOWNLOAD_DIR_HOLDER.dir\"\r\n$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null\r\ntrap {\r\n  if ($TMP_DOWNLOAD_DIR.Exists) {\r\n    try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }\r\n    catch { Write-Warning \"Cannot remove $TMP_DOWNLOAD_DIR\" }\r\n  }\r\n}\r\n\r\nNew-Item -Itemtype Directory -Path \"$MAVEN_HOME_PARENT\" -Force | Out-Null\r\n\r\n# Download and Install Apache Maven\r\nWrite-Verbose \"Couldn't find MAVEN_HOME, downloading and installing it ...\"\r\nWrite-Verbose \"Downloading from: $distributionUrl\"\r\nWrite-Verbose \"Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName\"\r\n\r\n$webclient = New-Object System.Net.WebClient\r\nif ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {\r\n  $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)\r\n}\r\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\r\n$webclient.DownloadFile($distributionUrl, \"$TMP_DOWNLOAD_DIR/$distributionUrlName\") | Out-Null\r\n\r\n# If specified, validate the SHA-256 sum of the Maven distribution zip file\r\n$distributionSha256Sum = (Get-Content -Raw \"$scriptDir/.mvn/wrapper/maven-wrapper.properties\" | ConvertFrom-StringData).distributionSha256Sum\r\nif ($distributionSha256Sum) {\r\n  if ($USE_MVND) {\r\n    Write-Error \"Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties.\"\r\n  }\r\n  Import-Module $PSHOME\\Modules\\Microsoft.PowerShell.Utility -Function Get-FileHash\r\n  if ((Get-FileHash \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {\r\n    Write-Error \"Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property.\"\r\n  }\r\n}\r\n\r\n# unzip and move\r\nExpand-Archive \"$TMP_DOWNLOAD_DIR/$distributionUrlName\" -DestinationPath \"$TMP_DOWNLOAD_DIR\" | Out-Null\r\n\r\n# Find the actual extracted directory name (handles snapshots where filename != directory name)\r\n$actualDistributionDir = \"\"\r\n\r\n# First try the expected directory name (for regular distributions)\r\n$expectedPath = Join-Path \"$TMP_DOWNLOAD_DIR\" \"$distributionUrlNameMain\"\r\n$expectedMvnPath = Join-Path \"$expectedPath\" \"bin/$MVN_CMD\"\r\nif ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {\r\n  $actualDistributionDir = $distributionUrlNameMain\r\n}\r\n\r\n# If not found, search for any directory with the Maven executable (for snapshots)\r\nif (!$actualDistributionDir) {\r\n  Get-ChildItem -Path \"$TMP_DOWNLOAD_DIR\" -Directory | ForEach-Object {\r\n    $testPath = Join-Path $_.FullName \"bin/$MVN_CMD\"\r\n    if (Test-Path -Path $testPath -PathType Leaf) {\r\n      $actualDistributionDir = $_.Name\r\n    }\r\n  }\r\n}\r\n\r\nif (!$actualDistributionDir) {\r\n  Write-Error \"Could not find Maven distribution directory in extracted archive\"\r\n}\r\n\r\nWrite-Verbose \"Found extracted Maven distribution directory: $actualDistributionDir\"\r\nRename-Item -Path \"$TMP_DOWNLOAD_DIR/$actualDistributionDir\" -NewName $MAVEN_HOME_NAME | Out-Null\r\ntry {\r\n  Move-Item -Path \"$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME\" -Destination $MAVEN_HOME_PARENT | Out-Null\r\n} catch {\r\n  if (! (Test-Path -Path \"$MAVEN_HOME\" -PathType Container)) {\r\n    Write-Error \"fail to move MAVEN_HOME\"\r\n  }\r\n} finally {\r\n  try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }\r\n  catch { Write-Warning \"Cannot remove $TMP_DOWNLOAD_DIR\" }\r\n}\r\n\r\nWrite-Output \"MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD\"\r\n"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>eu.maveniverse.maven.parent</groupId>\n    <artifactId>parent</artifactId>\n    <version>51</version>\n  </parent>\n\n  <groupId>com.lambdazen.bitsy</groupId>\n  <artifactId>bitsy</artifactId>\n  <version>3.6.5-SNAPSHOT</version>\n\n  <name>Bitsy Graph Database</name>\n  <description>Bitsy v3 is a small, fast, embeddable, durable in-memory graph database that is compatible with Tinkerpop3</description>\n\n  <url>https://github.com/lambdazen/bitsy/</url>\n  <inceptionYear>2013</inceptionYear>\n\n  <licenses>\n    <license>\n      <name>Apache License, Version 2.0</name>\n      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n    </license>\n  </licenses>\n  <developers>\n    <developer>\n      <id>lambdazen</id>\n      <name>Sridhar Ramachandran</name>\n      <email>sridhar@lambdazen.com</email>\n      <url>https://lambdazen.com</url>\n    </developer>\n    <developer>\n      <id>cstamas</id>\n      <name>Tamas Cservenak</name>\n      <email>tamas@cservenak.net</email>\n      <url>https://www.cstamas.org</url>\n    </developer>\n  </developers>\n\n  <scm>\n    <connection>scm:git:https://github.com/lambdazen/bitsy.git</connection>\n    <developerConnection>scm:git:https://github.com/lambdazen/bitsy.git</developerConnection>\n    <tag>HEAD</tag>\n    <url>https://github.com/lambdazen/bitsy/</url>\n  </scm>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\n    <maven.compiler.release>8</maven.compiler.release>\n\n    <!-- versions -->\n    <gremlin.version>3.7.5</gremlin.version>\n    <slf4j.version>1.7.36</slf4j.version>\n\n    <!-- JaCoCo: empty -->\n    <jacocoAgentArg />\n  </properties>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>com.fasterxml.jackson.core</groupId>\n        <artifactId>jackson-core</artifactId>\n        <version>2.21.1</version>\n        <type>pom</type>\n        <scope>import</scope>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.tinkerpop</groupId>\n      <artifactId>gremlin-core</artifactId>\n      <version>${gremlin.version}</version>\n    </dependency>\n\n    <dependency>\n      <groupId>com.fasterxml.jackson.core</groupId>\n      <artifactId>jackson-core</artifactId>\n    </dependency>\n\n    <dependency>\n      <groupId>com.fasterxml.jackson.core</groupId>\n      <artifactId>jackson-databind</artifactId>\n    </dependency>\n\n    <dependency>\n      <groupId>com.fasterxml.jackson.core</groupId>\n      <artifactId>jackson-annotations</artifactId>\n    </dependency>\n\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-api</artifactId>\n      <version>${slf4j.version}</version>\n    </dependency>\n\n    <!-- Test dependencies -->\n\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n      <scope>test</scope>\n    </dependency>\n\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-simple</artifactId>\n      <version>${slf4j.version}</version>\n      <scope>test</scope>\n    </dependency>\n\n    <dependency>\n      <groupId>org.apache.tinkerpop</groupId>\n      <artifactId>gremlin-test</artifactId>\n      <version>${gremlin.version}</version>\n      <scope>test</scope>\n    </dependency>\n\n    <!-- TODO: UNCOMMENT WHEN ADDING GREMLIN SERVER TESTS  \n    <dependency>\n      <groupId>org.apache.tinkerpop</groupId>\n      <artifactId>gremlin-server</artifactId>\n      <version>${gremlin.version}</version>\n      <scope>test</scope>\n    </dependency>\n\n    <dependency>\n      <groupId>org.apache.tinkerpop</groupId>\n      <artifactId>gremlin-driver</artifactId>\n      <version>${gremlin.version}</version>\n      <scope>test</scope>\n    </dependency>\n -->\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <showDeprecation>true</showDeprecation>\n          </configuration>\n        </plugin>\n\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <configuration>\n            <reuseForks>false</reuseForks>\n            <forkCount>1</forkCount>\n            <failIfNoTests>false</failIfNoTests>\n            <argLine>@{jacocoAgentArg} --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED</argLine>\n            <redirectTestOutputToFile>true</redirectTestOutputToFile>\n            <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>\n            <systemPropertyVariables>\n              <java.awt.headless>true</java.awt.headless>\n              <java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>\n              <build.dir>${project.build.directory}</build.dir>\n            </systemPropertyVariables>\n            <includes>\n              <include>**/*Test.java</include>\n              <include>**/*TestCase.java</include>\n            </includes>\n          </configuration>\n        </plugin>\n\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-failsafe-plugin</artifactId>\n          <configuration>\n            <reuseForks>false</reuseForks>\n            <forkCount>1</forkCount>\n            <failIfNoTests>false</failIfNoTests>\n            <argLine>@{jacocoAgentArg} --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED</argLine>\n            <redirectTestOutputToFile>true</redirectTestOutputToFile>\n            <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>\n            <systemPropertyVariables>\n              <java.awt.headless>true</java.awt.headless>\n              <java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>\n              <build.dir>${project.build.directory}</build.dir>\n            </systemPropertyVariables>\n            <includes>\n              <include>**/*IT.java</include>\n              <include>**/*ITCase.java</include>\n              <include>**/*TestSuite.java</include>\n            </includes>\n          </configuration>\n        </plugin>\n\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-javadoc-plugin</artifactId>\n          <configuration>\n            <!-- Turn off strict javadoc checks in Java-8 -->\n            <doclint>none</doclint>\n            <!-- Make it less fragile -->\n            <detectLinks>false</detectLinks>\n            <!-- Source == release -->\n            <source>${maven.compiler.release}</source>\n          </configuration>\n        </plugin>\n\n        <plugin>\n          <groupId>org.jacoco</groupId>\n          <artifactId>jacoco-maven-plugin</artifactId>\n          <version>0.8.14</version>\n          <configuration>\n            <propertyName>jacocoAgentArg</propertyName>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n  <profiles>\n    <!--\n    Enable running of integration-tests.\n    -->\n    <profile>\n      <id>run-its</id>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-failsafe-plugin</artifactId>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>integration-test</goal>\n                  <goal>verify</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n\n    <!--\n    Enable running of coverage reports.\n    -->\n    <profile>\n      <id>coverage</id>\n      <activation>\n        <property>\n          <name>coverage</name>\n          <value>true</value>\n        </property>\n      </activation>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.jacoco</groupId>\n            <artifactId>jacoco-maven-plugin</artifactId>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>prepare-agent</goal>\n                  <goal>prepare-agent-integration</goal>\n                  <goal>report</goal>\n                  <goal>report-integration</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyEdge.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.EdgeBeanJson;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyEdge extends BitsyElement implements Edge, IEdge {\n    UUID outVertexId;\n    UUID inVertexId;\n\n    public BitsyEdge(\n            UUID id,\n            Dictionary properties,\n            BitsyTransaction tx,\n            BitsyState state,\n            int version,\n            String label,\n            UUID outVertexId,\n            UUID inVertexId) {\n        super(id, label, properties, tx, state, version);\n\n        if (label == null) {\n            throw new IllegalArgumentException(\"Edge label can not be null\"); // Enforced by 2.3.0 test case\n        }\n\n        this.outVertexId = outVertexId;\n        this.inVertexId = inVertexId;\n    }\n\n    public BitsyEdge(EdgeBean bean, BitsyTransaction tx, BitsyState state) {\n        this(\n                bean.getId(),\n                bean.getPropertiesDict(),\n                tx,\n                state,\n                bean.getVersion(),\n                bean.getLabel(),\n                bean.getOutVertexId(),\n                bean.getInVertexId());\n    }\n\n    public EdgeBeanJson asJsonBean() {\n        // The TX is usually not active at this point. So no checks.\n        return new EdgeBeanJson((UUID) id, properties, version, label, outVertexId, inVertexId, state);\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(Direction dir) {\n        tx.validateForQuery(this);\n\n        if (dir != Direction.BOTH) {\n            Vertex ans = inOrOutVertex(dir);\n\n            return Collections.singleton(ans).iterator();\n        } else {\n            return bothVertices();\n        }\n    }\n\n    @Override\n    public Vertex inVertex() {\n        tx.validateForQuery(this);\n\n        return inOrOutVertex(Direction.IN);\n    }\n\n    @Override\n    public Vertex outVertex() {\n        tx.validateForQuery(this);\n\n        return inOrOutVertex(Direction.OUT);\n    }\n\n    @Override\n    public Iterator<Vertex> bothVertices() {\n        tx.validateForQuery(this);\n\n        Vertex inV = inVertex();\n        Vertex outV = outVertex();\n        return Arrays.asList(new Vertex[] {outV, inV}).iterator();\n    }\n\n    private Vertex inOrOutVertex(Direction dir) {\n        Vertex ans = tx.getVertex(getVertexId(dir));\n\n        // Vertex may disappear in READ_COMMITTED MODE\n        if (ans == null) {\n            throw new BitsyRetryException(\n                    BitsyErrorCodes.CONCURRENT_MODIFICATION,\n                    \"The vertex in direction \" + dir + \" of the edge \" + this.id()\n                            + \" was removed by another transaction\");\n        }\n\n        return ans;\n    }\n\n    public UUID getInVertexId() {\n        return inVertexId;\n    }\n\n    public UUID getOutVertexId() {\n        return outVertexId;\n    }\n\n    public UUID getVertexId(Direction dir) {\n        if (dir == Direction.IN) {\n            return inVertexId;\n        } else if (dir == Direction.OUT) {\n            return outVertexId;\n        } else {\n            throw new IllegalArgumentException(\"Unsupported direction \" + dir);\n        }\n    }\n\n    public void incrementVersion() {\n        this.version++;\n    }\n\n    public void remove() {\n        tx.removeEdge(this);\n    }\n\n    public String toString() {\n        return StringFactory.edgeString(this);\n    }\n\n    @Override\n    // THERE ARE TWO MORE COPIES OF THIS CODE IN ELEMENT AND VERTEX\n    public <T> Iterator<Property<T>> properties(String... propertyKeys) {\n        ArrayList<Property<T>> ans = new ArrayList<Property<T>>();\n\n        if (propertyKeys.length == 0) {\n            if (this.properties == null) return Collections.emptyIterator();\n            propertyKeys = this.properties.getPropertyKeys();\n        }\n\n        for (String key : propertyKeys) {\n            Property<T> prop = property(key);\n            if (prop.isPresent()) ans.add(prop);\n        }\n        return ans.iterator();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyElement.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.ads.dict.Dictionary1;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.Set;\nimport java.util.concurrent.CopyOnWriteArraySet;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.util.ElementHelper;\n\npublic abstract class BitsyElement implements Element {\n    public static enum PropType {\n        ELEMENT,\n        VERTEX,\n        EDGE\n    };\n\n    Object id;\n    String label;\n    Dictionary properties;\n    BitsyTransaction tx;\n    BitsyState state;\n    int version;\n    boolean updated;\n\n    public BitsyElement(\n            Object id, String label, Dictionary properties, BitsyTransaction tx, BitsyState state, int version) {\n        this.id = id;\n        this.label = label;\n        this.properties = properties;\n        this.tx = tx;\n        this.state = state;\n        this.version = version;\n        this.updated = false;\n    }\n\n    @Override\n    public Object id() {\n        // No TX check to return the ID\n        return id;\n    }\n\n    @Override\n    public String label() {\n        // There is no Tx validation for label because it is used even after deletion to update indexes, etc.\n        return label;\n    }\n\n    @Override\n    public Graph graph() {\n        return tx.graph();\n    }\n\n    public Dictionary getPropertyDict() {\n        return properties;\n    }\n\n    @Override\n    public <T> T value(String key) {\n        tx.validateForQuery(this);\n\n        if (properties == null) {\n            return null;\n        } else {\n            return (T) (properties.getProperty(key));\n        }\n    }\n\n    @Override\n    public Set<String> keys() {\n        tx.validateForQuery(this);\n\n        if (properties == null) {\n            return Collections.emptySet();\n        } else {\n            return new CopyOnWriteArraySet<String>(Arrays.asList(properties.getPropertyKeys()));\n        }\n    }\n\n    public <T> T removeProperty(String key) {\n        markForUpdate();\n\n        if (properties == null) {\n            return null;\n        } else {\n            Object ans = properties.getProperty(key);\n\n            properties = properties.removeProperty(key);\n\n            return (T) ans;\n        }\n    }\n\n    @Override\n    public <T> Property<T> property(String key, T value) {\n        if (value == null) {\n            throw new IllegalArgumentException(\n                    \"A null property can not be stored. You can call removeProperty() instead\");\n        }\n\n        markForUpdate();\n\n        if (key == null) {\n            throw new IllegalArgumentException(\"Expecting non-null key in setProperty\");\n        } else if (key.length() == 0) {\n            throw new IllegalArgumentException(\"Expecting non-empty key in setProperty\");\n        } else if (key.equals(\"id\")) {\n            throw new IllegalArgumentException(\"Can not set the 'id' property on an element\");\n        } else if (key.equals(\"label\")) {\n            throw new IllegalArgumentException(\"Can not set the 'label' property on an element\");\n        } else if (key.charAt(0) == '~') {\n            throw new IllegalArgumentException(\"Can not set a property beginning with ~ on an element\");\n        }\n\n        if (this.properties == null) {\n            this.properties = new Dictionary1(key, value);\n        } else {\n            this.properties = properties.setProperty(key, value);\n        }\n\n        assert (properties != null);\n\n        return new BitsyProperty<T>(this, key, value);\n    }\n\n    // WARNING: THERE IS ONE MORE COPY OF THIS CODE IN VERTEX\n    @Override\n    public <T> Property<T> property(String key) {\n        T value = value(key);\n        if (value == null) {\n            return Property.<T>empty();\n        } else {\n            return new BitsyProperty<T>(this, key, value);\n        }\n    }\n\n    // WARNING: THERE ARE TWO MORE COPIES OF THIS CODE IN VERTEX AND EDGE\n    @Override\n    public <T> Iterator<? extends Property<T>> properties(String... propertyKeys) {\n        ArrayList<Property<T>> ans = new ArrayList<Property<T>>();\n        if (propertyKeys.length == 0) {\n            if (this.properties == null) return Collections.emptyIterator();\n            propertyKeys = this.properties.getPropertyKeys();\n        }\n\n        for (String key : propertyKeys) {\n            Property<T> prop = property(key);\n            if (prop.isPresent()) ans.add(prop);\n        }\n\n        return ans.iterator();\n    }\n\n    /** This method prepares the vertex/edge for an update */\n    public void markForUpdate() {\n        if (!updated) {\n            updated = true;\n\n            // Make a copy of the underlying property map, if non-null\n            if (properties != null) {\n                properties = properties.copyOf();\n            }\n\n            tx.markForPropertyUpdate(this);\n        }\n    }\n\n    @Override\n    public abstract void remove();\n\n    public BitsyState getState() {\n        return state;\n    }\n\n    public void setState(BitsyState state) {\n        this.state = state;\n    }\n\n    public int getVersion() {\n        return version;\n    }\n\n    public ITransaction getTransaction() {\n        return tx;\n    }\n\n    // Moved to hashCode and equals from ElementHelper -- to pass Gremlin tests\n    @Override\n    public int hashCode() {\n        return ElementHelper.hashCode(this);\n    }\n\n    @Override\n    public boolean equals(Object object) {\n        return ElementHelper.areEqual(this, object);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyErrorCodes.java",
    "content": "package com.lambdazen.bitsy;\n\npublic enum BitsyErrorCodes {\n    INTERNAL_ERROR {\n        public String toString() {\n            return \"INTERNAL_ERROR: An internal error occurred\";\n        }\n    },\n\n    ACCESS_OUTSIDE_TX_SCOPE {\n        public String toString() {\n            return \"ACCESS_OUTSIDE_TX_SCOPE: A vertex/edge was accessed outside the scope of the transaction that created it\";\n        }\n    },\n\n    ELEMENT_ALREADY_DELETED {\n        public String toString() {\n            return \"ELEMENT_ALREADY_DELETED: The vertex/edge being accessed has already been deleted\";\n        }\n    },\n\n    ADDING_EDGE_TO_A_DELETED_VERTEX {\n        public String toString() {\n            return \"ADDING_EDGE_TO_A_DELETED_VERTEX: A edge was added in a transaction to (Direction.IN) a vertex that was deleted in the same transaction\";\n        }\n    },\n\n    ADDING_EDGE_FROM_A_DELETED_VERTEX {\n        public String toString() {\n            return \"ADDING_EDGE_FROM_A_DELETED_VERTEX: A edge was added in a transaction from (Direction.OUT) a vertex that was deleted in the same transaction\";\n        }\n    },\n\n    EXCEPTION_IN_FLUSH {\n        public String toString() {\n            return \"EXCEPTION_IN_FLUSH: The given exception occurred in the different thread while flushing a double buffer\";\n        }\n    },\n\n    BAD_DB_PATH {\n        public String toString() {\n            return \"BAD_DB_PATH: The given path to the database is not a directory\";\n        }\n    },\n\n    ERROR_INITIALIZING_DB_FILES {\n        public String toString() {\n            return \"ERROR_INITIALIZING_DB_FILES: The given database file could not be opened or initialized\";\n        }\n    },\n\n    ERROR_READING_FROM_FILE {\n        public String toString() {\n            return \"ERROR_READING_FROM_FILE: A fatal error occurred while reading from a file. The database may need to be restarted after investigating the root cause\";\n        }\n    },\n\n    ERROR_WRITING_TO_FILE {\n        public String toString() {\n            return \"ERROR_WRITING_TO_TX_FILE: A fatal error occurred while writing to a transaction file. The database may need to be restarted after investigating the root cause\";\n        }\n    },\n\n    TRANSACTION_INTERRUPTED {\n        public String toString() {\n            return \"TRANSACTION_INTERRUPTED: The given InterruptedException occurred during a transaction\";\n        }\n    },\n\n    SERIALIZATION_ERROR {\n        public String toString() {\n            return \"SERIALIZATION_ERROR: The given exception occurred while serializing a commit block using Jackson JSON API\";\n        }\n    },\n\n    ADDING_EDGE_WITH_VERTEX_FROM_ANOTHER_TX {\n        public String toString() {\n            return \"ADDING_EDGE_WITH_VERTICES_FROM_ANOTHER_TX: An edge was added in a transaction with an endpoint vertex belonging to another transaction\";\n        }\n    },\n\n    REMOVING_VERTEX_FROM_ANOTHER_TX {\n        public String toString() {\n            return \"REMOVING_VERTEX_FROM_ANOTHER_TX: A vertex was removed in a transaction different from the one in which it was loaded\";\n        }\n    },\n\n    REMOVING_EDGE_FROM_ANOTHER_TX {\n        public String toString() {\n            return \"REMOVING_EDGE_FROM_ANOTHER_TX: An edge was removed in a transaction different from the one in which it was loaded\";\n        }\n    },\n\n    CHECKSUM_MISMATCH {\n        public String toString() {\n            return \"CHECKSUM_MISMATCH: Encountered a checksum mismatch while loading a database file\";\n        }\n    },\n\n    CONCURRENT_MODIFICATION {\n        public String toString() {\n            return \"CONCURRENT_MODIFICATION: A vertex or edge loaded in a transaction was concurrently modified by another transaction. Please retry this transaction\";\n        }\n    },\n\n    ERROR_IN_FILE_HEADER {\n        public String toString() {\n            return \"ERROR_IN_FILE_HEADER: A fatal error occured while parsing the first line (header) in a database file\";\n        }\n    },\n\n    INCOMPLETE_TX_FLUSH {\n        public String toString() {\n            return \"INCOMPLETE_TX_FLUSH: A V/E file was not fully flushed when the database was previously shutdown\";\n        }\n    },\n\n    DATABASE_IS_CORRUPT {\n        public String toString() {\n            return \"DATABASE_IS_CORRUPT: The given error is fatal and the database can not be loaded\";\n        }\n    },\n\n    JAVA_DESERIALIZATION_ERROR {\n        public String toString() {\n            return \"DESERIALIZATION_ERROR: An error occurred while de-serializing a Java Serializable object\";\n        }\n    },\n\n    INDEX_ALREADY_EXISTS {\n        public String toString() {\n            return \"INDEX_ALREADY_EXISTS: The given index already exists in the database\";\n        }\n    },\n\n    UNSUPPORTED_INDEX_TYPE {\n        public String toString() {\n            return \"UNSUPPORTED_INDEX_TYPE: Indexes are only supported on Vertex and Edge classes\";\n        }\n    },\n\n    MISSING_INDEX {\n        public String toString() {\n            return \"MISSING_INDEX: A vertex/edge query on a matching key-value pair was performed without creating an index for that key\";\n        }\n    },\n\n    OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS {\n        public String toString() {\n            return \"OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS: The requested operation can not be performed on memory-only graphs\";\n        }\n    },\n\n    FULL_GRAPH_SCANS_ARE_DISABLED {\n        public String toString() {\n            return \"FULL_GRAPH_SCANS_ARE_DISABLED: The requested operation can not be performed because the BitsyGraph was constructed with the allowFullGraphScans option disabled\";\n        }\n    },\n\n    BAD_BACKUP_PATH {\n        public String toString() {\n            return \"BAD_BACKUP_PATH: The given path to backup the database is not an empty directory\";\n        }\n    },\n\n    BACKUP_IN_PROGRESS {\n        public String toString() {\n            return \"BACKUP_IN_PROGRESS: A scheduled backup task is already in progress. Please try after a some time\";\n        }\n    },\n\n    BACKUP_INTERRUPTED {\n        public String toString() {\n            return \"BACKUP_INTERRUPTED: The given InterruptedException occurred while waiting for a backup to be performed\";\n        }\n    },\n\n    BACKUP_FAILED {\n        public String toString() {\n            return \"BACKUP_FAILED: The given exception occurred during a backup operation\";\n        }\n    },\n\n    FLUSH_INTERRUPTED {\n        public String toString() {\n            return \"FLUSH_INTERRUPTED: The given InterruptedException occurrend while waiting for a flush operation on a transaction log to complete\";\n        }\n    },\n\n    INSTANCE_ALREADY_EXISTS {\n        public String toString() {\n            return \"INSTANCE_ALREADY_EXISTS: A BitsyGraph object with the same path has been registered with the MBeanServer. Creating multiple instances of BitsyGraph (without calling shutdown) will cause data corruption\";\n        }\n    },\n\n    ERROR_REGISTERING_TO_MBEAN_SERVER {\n        public String toString() {\n            return \"ERROR_REGISTERING_TO_MBEAN_SERVER: A BitsyGraph object could not be registered with the MBeanServer\";\n        }\n    },\n\n    MAJOR_VERSION_MISMATCH {\n        public String toString() {\n            return \"MAJOR_VERSION_MISMATCH: The database loaded was created with by different major version of Bitsy. Please run 'java com.lambdazen.bitsy.PortDatabase' to upgrade or downgrade the database\";\n        }\n    },\n\n    NO_OLAP_SUPPORT {\n        public String toString() {\n            return \"NO_OLAP_SUPPORT: Bitsy is not designed to be an OLAP graph\";\n        }\n    },\n    NO_MULTI_PROPERTY_SUPPORT {\n        public String toString() {\n            return \"NO_MULTI_PROPERTY_SUPPORT: Bitsy does not support multi-properties. Please use a list value instead\";\n        }\n    },\n    NO_META_PROPERTY_SUPPORT {\n        public String toString() {\n            return \"NO_META_PROPERTY_SUPPORT: Bitsy does not support meta-properties. Please use property keys such as a.b.c instead\";\n        }\n    },\n\n    NO_CUSTOM_ID_SUPPORT {\n        public String toString() {\n            return \"NO_CUSTOM_ID_SUPPORT: Bitsy does not support user-supplied IDs for vertices and edges, only auto-generated UUIDs. Please move this to an indexed key\";\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyException.java",
    "content": "package com.lambdazen.bitsy;\n\npublic class BitsyException extends RuntimeException {\n    private static final long serialVersionUID = -5310572247323732287L;\n    BitsyErrorCodes code;\n\n    public BitsyException(BitsyErrorCodes code) {\n        super(code.toString());\n\n        this.code = code;\n    }\n\n    public BitsyException(BitsyErrorCodes code, String s) {\n        super(code.toString() + \". \" + s);\n\n        this.code = code;\n    }\n\n    public BitsyException(BitsyErrorCodes code, String s, Throwable t) {\n        super(code.toString() + \". \" + s, t);\n\n        this.code = code;\n    }\n\n    public BitsyErrorCodes getErrorCode() {\n        return code;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyFeatures.java",
    "content": "package com.lambdazen.bitsy;\n\nimport org.apache.tinkerpop.gremlin.structure.Graph.Features;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyFeatures implements Features {\n    private final GraphFeatures graphFeatures = new BitsyGraphFeatures();\n\n    private final VertexFeatures vertexFeatures = new BitsyVertexFeatures();\n\n    private final EdgeFeatures edgeFeatures = new BitsyEdgeFeatures();\n\n    private boolean isPersistent;\n\n    public BitsyFeatures(boolean isPersistent) {\n        this.isPersistent = isPersistent;\n    }\n\n    @Override\n    public GraphFeatures graph() {\n        return graphFeatures;\n    }\n\n    @Override\n    public EdgeFeatures edge() {\n        return edgeFeatures;\n    }\n\n    @Override\n    public VertexFeatures vertex() {\n        return vertexFeatures;\n    }\n\n    @Override\n    public String toString() {\n        return StringFactory.featureString(this);\n    }\n\n    public class BitsyGraphFeatures implements Features.GraphFeatures {\n        private final Features.VariableFeatures variablesFeatures = new BitsyVariableFeatures();\n\n        @Override\n        public boolean supportsComputer() {\n            return false;\n        }\n\n        @Override\n        public Features.VariableFeatures variables() {\n            return variablesFeatures;\n        }\n\n        @Override\n        public boolean supportsPersistence() {\n            return isPersistent;\n        }\n\n        // Yes for transactions\n\n        // TODO: Change from no for threaded transactions to yes -- semantics seems to have changed per\n        // shouldNotReuseThreadedTransaction\n        @Override\n        public boolean supportsThreadedTransactions() {\n            return false;\n        }\n    }\n\n    public class BitsyVariableFeatures implements Features.VariableFeatures {\n        @Override\n        public boolean supportsVariables() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsBooleanValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsDoubleValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsFloatValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsIntegerValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsLongValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsMapValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsMixedListValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsByteValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsBooleanArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsByteArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsDoubleArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsFloatArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsIntegerArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsLongArrayValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsSerializableValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsStringValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsUniformListValues() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsStringArrayValues() {\n            return false;\n        }\n    }\n\n    public class BitsyVertexFeatures implements Features.VertexFeatures {\n        private final Features.VertexPropertyFeatures vertexPropertyFeatures = new BitsyGraphPropertyFeatures();\n\n        @Override\n        public Features.VertexPropertyFeatures properties() {\n            return vertexPropertyFeatures;\n        }\n\n        @Override\n        public boolean supportsMetaProperties() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsMultiProperties() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsUserSuppliedIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsNumericIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsAnyIds() {\n            return false;\n        }\n\n        // Yes for add and remove vertices\n    }\n\n    public class BitsyEdgeFeatures implements Features.EdgeFeatures {\n        private final Features.EdgePropertyFeatures edgePropertyFeatures = new BitsyGraphPropertyFeatures();\n\n        @Override\n        public Features.EdgePropertyFeatures properties() {\n            return edgePropertyFeatures;\n        }\n\n        @Override\n        public boolean supportsUserSuppliedIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsNumericIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsAnyIds() {\n            return false;\n        }\n\n        // Yes for add and remove edges\n    }\n\n    public class BitsyGraphPropertyFeatures implements Features.VertexPropertyFeatures, Features.EdgePropertyFeatures {\n        @Override\n        public boolean supportsCustomIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsUserSuppliedIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsAnyIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsNumericIds() {\n            return false;\n        }\n\n        @Override\n        public boolean supportsStringIds() {\n            return true;\n        }\n\n        @Override\n        public boolean supportsUuidIds() {\n            return false;\n        }\n\n        // Yes for all property types\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyGraph.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.gremlin.BitsyTraversalStrategy;\nimport com.lambdazen.bitsy.store.FileBackedMemoryGraphStore;\nimport com.lambdazen.bitsy.store.MemoryGraphStore;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport com.lambdazen.bitsy.tx.BitsyTransactionContext;\nimport com.lambdazen.bitsy.wrapper.BitsyAutoReloadingGraph;\nimport java.lang.management.ManagementFactory;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Set;\nimport javax.management.MBeanServer;\nimport javax.management.MalformedObjectNameException;\nimport javax.management.ObjectName;\nimport org.apache.commons.configuration2.BaseConfiguration;\nimport org.apache.commons.configuration2.Configuration;\nimport org.apache.tinkerpop.gremlin.process.computer.GraphComputer;\nimport org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.T;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.io.Io;\nimport org.apache.tinkerpop.gremlin.structure.util.ElementHelper;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n@Graph.OptIn(\"com.lambdazen.bitsy.structure.BitsyGraphStructureTestSuite\")\n@Graph.OptIn(\"com.lambdazen.bitsy.structure.BitsyProcessStandardTestSuite\")\n/** Bitsy 3.0 compatible with Tinkerpop 3.0 */\npublic class BitsyGraph implements Graph, BitsyGraphMBean {\n    private static final Logger log = LoggerFactory.getLogger(BitsyGraph.class);\n\n    public static boolean IS_ANDROID = \"The Android Project\".equals(System.getProperty(\"java.specification.vendor\"));\n\n    // Configuration keys\n    public static final String DB_PATH_KEY = \"dbPath\";\n    public static final String ALLOW_FULL_GRAPH_SCANS_KEY = \"allowFullGraphScans\";\n    public static final String DEFAULT_ISOLATION_LEVEL_KEY = \"defaultIsolationLevel\";\n    public static final String TX_LOG_THRESHOLD_KEY = \"txLogThreshold\";\n    public static final String REORG_FACTOR_KEY = \"reorgFactor\";\n    public static final String CREATE_DIR_IF_MISSING_KEY = \"createDirIfMissing\";\n    public static final String VERTEX_INDICES_KEY = \"vertexIndices\";\n    public static final String EDGE_INDICES_KEY = \"edgeIndices\";\n\n    public static final double DEFAULT_REORG_FACTOR = 1;\n    public static final long DEFAULT_TX_LOG_THRESHOLD = 4 * 1024 * 1024;\n\n    private boolean allowFullGraphScans;\n    private boolean isPersistent;\n    private Path dbPath;\n    private ThreadLocal<BitsyTransaction> curTransaction;\n    private ThreadLocal<BitsyTransactionContext> curTransactionContext;\n    private IGraphStore graphStore;\n    private Features bitsyFeatures;\n    private ObjectName objectName;\n    private BitsyIsolationLevel defaultIsolationLevel;\n    private boolean createDirIfMissing = false;\n    private Configuration origConfig;\n\n    static {\n        try {\n            TraversalStrategies.GlobalCache.registerStrategies(\n                    BitsyGraph.class,\n                    TraversalStrategies.GlobalCache.getStrategies(Graph.class)\n                            .clone()\n                            .addStrategies(BitsyTraversalStrategy.instance()));\n            TraversalStrategies.GlobalCache.registerStrategies(\n                    BitsyAutoReloadingGraph.class,\n                    TraversalStrategies.GlobalCache.getStrategies(Graph.class)\n                            .clone()\n                            .addStrategies(BitsyTraversalStrategy.instance()));\n        } catch (java.lang.BootstrapMethodError e) {\n            // Known issue with Android\n            System.err.println(\"Not registering traversal strategies\");\n            e.printStackTrace();\n        }\n    }\n\n    // Protected constructor used by ThreadedBitsyGraph\n    protected BitsyGraph(char isThreaded, boolean allowFullGraphScans) {\n        // char isThreaded is used to distinguish this constructor from others\n        this.allowFullGraphScans = allowFullGraphScans;\n    }\n\n    public BitsyGraph() {\n        this(true);\n    }\n\n    public BitsyGraph(boolean allowFullGraphScans) {\n        this(null, true, -1, -1);\n    }\n\n    public BitsyGraph(Path dbPath) {\n        this(dbPath, true, DEFAULT_TX_LOG_THRESHOLD, DEFAULT_REORG_FACTOR); // Default tx log size is 4MB\n    }\n\n    /**\n     * Constructor with all configurable parameters\n     * @param dbPath path to the database files\n     * @param allowFullGraphScans whether/not iterations on vertices and edges should be supported\n     * @param txLogThreshold the size of the transaction in bytes after which it will be scheduled to move to V/E files\n     * @param reorgFactor V/E reorgs are triggered when the size of the V/E files exceeds the initial size by (1 + factor)\n     */\n    public BitsyGraph(Path dbPath, boolean allowFullGraphScans, long txLogThreshold, double reorgFactor) {\n        this(dbPath, allowFullGraphScans, txLogThreshold, reorgFactor, false);\n    }\n\n    /**\n     * Constructor with all configurable parameters\n     * @param dbPath path to the database files\n     * @param allowFullGraphScans whether/not iterations on vertices and edges should be supported\n     * @param txLogThreshold the size of the transaction in bytes after which it will be scheduled to move to V/E files\n     * @param reorgFactor V/E reorgs are triggered when the size of the V/E files exceeds the initial size by (1 + factor)\n     * @param createDirIfMissing create the Bitsy directory if it is missing\n     */\n    public BitsyGraph(\n            Path dbPath,\n            boolean allowFullGraphScans,\n            long txLogThreshold,\n            double reorgFactor,\n            boolean createDirIfMissing) {\n        this.dbPath = dbPath;\n        this.allowFullGraphScans = allowFullGraphScans;\n        this.curTransactionContext = new ThreadLocal<BitsyTransactionContext>();\n        this.curTransaction = new ThreadLocal<BitsyTransaction>();\n        this.defaultIsolationLevel = BitsyIsolationLevel.READ_COMMITTED;\n        this.createDirIfMissing = createDirIfMissing;\n\n        if (IS_ANDROID) {\n            if (isPersistent()) {\n                // Load from files\n                this.graphStore = new FileBackedMemoryGraphStore(\n                        new MemoryGraphStore(allowFullGraphScans),\n                        dbPath,\n                        txLogThreshold,\n                        reorgFactor,\n                        createDirIfMissing);\n            } else {\n                this.graphStore = new MemoryGraphStore(allowFullGraphScans);\n            }\n        } else {\n            MBeanServer server = ManagementFactory.getPlatformMBeanServer();\n            if (isPersistent()) {\n                // Make sure that another BitsyGraph doesn't exist with the same path\n                try {\n                    this.objectName =\n                            new ObjectName(\"com.lambdazen.bitsy\", \"path\", ObjectName.quote(dbPath.toString()));\n                } catch (MalformedObjectNameException e) {\n                    throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Bug in quoting ObjectName\", e);\n                }\n\n                // Check registry\n                if (server.isRegistered(objectName)) {\n                    throw new BitsyException(BitsyErrorCodes.INSTANCE_ALREADY_EXISTS, \"Path \" + dbPath.toString());\n                }\n\n                // Load from files\n                this.graphStore = new FileBackedMemoryGraphStore(\n                        new MemoryGraphStore(allowFullGraphScans),\n                        dbPath,\n                        txLogThreshold,\n                        reorgFactor,\n                        createDirIfMissing);\n            } else {\n                this.graphStore = new MemoryGraphStore(allowFullGraphScans);\n            }\n\n            // Register this to the MBeanServer\n            if (objectName != null) {\n                try {\n                    server.registerMBean(this, objectName);\n                } catch (Exception e) {\n                    throw new BitsyException(\n                            BitsyErrorCodes.ERROR_REGISTERING_TO_MBEAN_SERVER, \"Encountered exception\", e);\n                }\n            }\n        }\n\n        this.bitsyFeatures = new BitsyFeatures(isPersistent);\n    }\n\n    /**\n     * Constructor with a Configuration object with String dbPath, boolean allowFullGraphScans, long txLogThreshold and double reorgFactor\n     */\n    public BitsyGraph(Configuration configuration) {\n        this(\n                Paths.get(configuration.getString(DB_PATH_KEY)),\n                configuration.getBoolean(ALLOW_FULL_GRAPH_SCANS_KEY, Boolean.TRUE),\n                configuration.getLong(TX_LOG_THRESHOLD_KEY, DEFAULT_TX_LOG_THRESHOLD),\n                configuration.getDouble(REORG_FACTOR_KEY, DEFAULT_REORG_FACTOR),\n                configuration.getBoolean(CREATE_DIR_IF_MISSING_KEY, false));\n        String isoLevelStr = configuration.getString(DEFAULT_ISOLATION_LEVEL_KEY);\n        if (isoLevelStr != null) {\n            setDefaultIsolationLevel(BitsyIsolationLevel.valueOf(isoLevelStr));\n        }\n        String vertexIndices = configuration.getString(VERTEX_INDICES_KEY);\n        if (vertexIndices != null) {\n            createIndices(Vertex.class, vertexIndices);\n        }\n        String edgeIndices = configuration.getString(EDGE_INDICES_KEY);\n        if (edgeIndices != null) {\n            createIndices(Edge.class, edgeIndices);\n        }\n        this.origConfig = configuration;\n    }\n\n    private void createIndices(Class elemType, String vertexIndices) {\n        for (String indexKey : vertexIndices.split(\",\")) {\n            try {\n                createKeyIndex(indexKey.trim(), elemType);\n            } catch (BitsyException ex) {\n                if (ex.getErrorCode() == BitsyErrorCodes.INDEX_ALREADY_EXISTS) {\n                    // That's fine\n                } else {\n                    throw ex;\n                }\n            }\n        }\n    }\n\n    public static final BitsyGraph open(Configuration configuration) {\n        return new BitsyGraph(configuration);\n    }\n\n    public String toString() {\n        if (dbPath != null) {\n            return \"bitsygraph[\" + dbPath + \"]\";\n        } else {\n            return \"bitsygraph[<in-memory>]\";\n        }\n    }\n\n    /** This method can be used to check if the current thread has an ongoing transaction */\n    public boolean isTransactionActive() {\n        ITransaction tx = curTransaction.get();\n\n        return (tx != null);\n    }\n\n    public boolean isPersistent() {\n        return (dbPath != null);\n    }\n\n    public boolean isFullGraphScanAllowed() {\n        return allowFullGraphScans;\n    }\n\n    public BitsyIsolationLevel getDefaultIsolationLevel() {\n        return defaultIsolationLevel;\n    }\n\n    public void setDefaultIsolationLevel(BitsyIsolationLevel level) {\n        this.defaultIsolationLevel = level;\n    }\n\n    public BitsyIsolationLevel getTxIsolationLevel() {\n        return getTx().getIsolationLevel();\n    }\n\n    public void setTxIsolationLevel(BitsyIsolationLevel level) {\n        getTx().setIsolationLevel(level);\n    }\n\n    public double getReorgFactor() {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Reorg factor is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            return ((FileBackedMemoryGraphStore) graphStore)\n                    .getVEReorgPotential()\n                    .getFactor();\n        }\n    }\n\n    public void setReorgFactor(double factor) {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Reorg factor is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            ((FileBackedMemoryGraphStore) graphStore).getVEReorgPotential().setFactor(factor);\n        }\n    }\n\n    public int getMinLinesPerReorg() {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Reorg factor is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            return ((FileBackedMemoryGraphStore) graphStore)\n                    .getVEReorgPotential()\n                    .getMinLinesPerReorg();\n        }\n    }\n\n    public void setMinLinesPerReorg(int minLinesPerReorg) {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Reorg factor is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            ((FileBackedMemoryGraphStore) graphStore).getVEReorgPotential().setMinLinesPerReorg(minLinesPerReorg);\n        }\n    }\n\n    public long getTxLogThreshold() {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Transaction log threshold is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            return ((FileBackedMemoryGraphStore) graphStore)\n                    .getTxLogFlushPotential()\n                    .getTxLogThreshold();\n        }\n    }\n\n    public void setTxLogThreshold(long txLogThreshold) {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Transaction log threshold is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            ((FileBackedMemoryGraphStore) graphStore).getTxLogFlushPotential().setTxLogThreshold(txLogThreshold);\n        }\n    }\n\n    /** This method flushes the transaction log to the V/E text files */\n    public void flushTxLog() {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Transaction log threshold is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            ((FileBackedMemoryGraphStore) graphStore).flushTxLog();\n        }\n    }\n\n    /** This method backs up the database while it is still operational. Only one backup can be in progress at a time.\n     *\n     * @param pathToDir directory to which the database must be backed up.\n     */\n    public void backup(String pathToDir) {\n        backup(Paths.get(pathToDir));\n    }\n\n    /** This method backs up the database while it is still operational. Only one backup can be in progress at a time.\n     *\n     * @param pathToDir directory to which the database must be backed up.\n     */\n    public void backup(Path pathToDir) {\n        if (!isPersistent()) {\n            throw new BitsyException(\n                    BitsyErrorCodes.OPERATION_UNDEFINED_FOR_NON_PERSISTENT_GRAPHS,\n                    \"Transaction log threshold is only defined for persistent graphs (with a defined path to DB)\");\n        } else {\n            ((FileBackedMemoryGraphStore) graphStore).backup(pathToDir);\n        }\n    }\n\n    protected BitsyTransaction getTx() {\n        BitsyTransaction tx = curTransaction.get();\n\n        if ((tx == null) || !tx.isOpen()) {\n            BitsyTransactionContext txContext = curTransactionContext.get();\n\n            if (txContext == null) {\n                txContext = new BitsyTransactionContext(graphStore);\n                curTransactionContext.set(txContext);\n            }\n\n            tx = new BitsyTransaction(txContext, defaultIsolationLevel, this);\n\n            curTransaction.set(tx);\n        }\n\n        return tx;\n    }\n\n    @Override\n    public ITransaction tx() {\n        return getTx();\n    }\n\n    /* UNIMPLEMENTED OLAP METHODS */\n    @Override\n    public GraphComputer compute() {\n        throw new UnsupportedOperationException(\n                \"Bitsy doesn't support the compute() method\", new BitsyException(BitsyErrorCodes.NO_OLAP_SUPPORT));\n    }\n\n    @Override\n    public GraphComputer compute(Class graphComputerClass) {\n        throw new UnsupportedOperationException(\n                \"Bitsy doesn't support the compute() method\", new BitsyException(BitsyErrorCodes.NO_OLAP_SUPPORT));\n    }\n\n    @Override\n    public <I extends Io> I io(final Io.Builder<I> builder) {\n        return (I) builder.graph(this)\n                .onMapper(m -> m.addRegistry(BitsyIoRegistryV3d0.instance()))\n                .create();\n    }\n\n    /* FEATURES */\n    @Override\n    public Graph.Features features() {\n        return bitsyFeatures;\n    }\n\n    /* CONFIGURATION */\n    @Override\n    public Configuration configuration() {\n        if (this.origConfig != null) {\n            return this.origConfig;\n        } else {\n            Configuration ans = new BaseConfiguration();\n            ans.setProperty(DB_PATH_KEY, dbPath.toString());\n            ans.setProperty(ALLOW_FULL_GRAPH_SCANS_KEY, allowFullGraphScans);\n            ans.setProperty(DEFAULT_ISOLATION_LEVEL_KEY, defaultIsolationLevel.toString());\n            ans.setProperty(TX_LOG_THRESHOLD_KEY, getTxLogThreshold());\n            ans.setProperty(REORG_FACTOR_KEY, getReorgFactor());\n            ans.setProperty(CREATE_DIR_IF_MISSING_KEY, createDirIfMissing);\n\n            ans.setProperty(VERTEX_INDICES_KEY, String.join(\",\", getIndexedKeys(Vertex.class)));\n            ans.setProperty(EDGE_INDICES_KEY, String.join(\",\", getIndexedKeys(Vertex.class)));\n\n            return ans;\n        }\n    }\n\n    private void validateHomogenousIds(final Object[] ids) {\n        final Class firstClass = ids[0].getClass();\n        for (int i = 1; i < ids.length; i++) {\n            Class curClass = ids[i].getClass();\n            if (!curClass.equals(firstClass)) {\n                throw new IllegalArgumentException(\n                        \"Argument \" + i + \" has class \" + curClass + \" which mismatches arg 0's class \" + firstClass);\n            }\n        }\n    }\n\n    @Override\n    public Vertex addVertex(Object... keyValues) {\n        if (keyValues == null) {\n            throw new IllegalArgumentException(\"Expecting non-null arguments in addVertex\");\n        } else if (keyValues.length % 2 == 1) {\n            throw new IllegalArgumentException(\n                    \"Expecting even number of items in the keyValue array. Found \" + keyValues.length);\n        }\n\n        // Validate first\n        for (int i = 0; i < keyValues.length; i = i + 2) {\n            if (keyValues[i] == T.id) {\n                // We don't support custom IDs\n                throw new UnsupportedOperationException(\n                        \"Encountered T.id in addVertex\", new BitsyException(BitsyErrorCodes.NO_CUSTOM_ID_SUPPORT));\n            } else if (keyValues[i] == null) {\n                throw new IllegalArgumentException(\"Encountered a null key in argument #\" + i);\n            } else if (keyValues[i + 1] == null) {\n                throw new IllegalArgumentException(\"Encountered a null value in argument #\" + i);\n            } else if (keyValues[i] == T.label) {\n                // That's fine\n            } else if (!(keyValues[i] instanceof String)) {\n                throw new IllegalArgumentException(\n                        \"Encountered a non-string key: \" + keyValues[i] + \" in argument #\" + i);\n            }\n        }\n\n        // Do the work\n        final String label = ElementHelper.getLabelValue(keyValues).orElse(null);\n        BitsyTransaction tx = getTx();\n        BitsyVertex vertex = new BitsyVertex(UUID.randomUUID(), label, null, tx, BitsyState.M, 0);\n\n        for (int i = 0; i < keyValues.length; i = i + 2) {\n            if (keyValues[i] == T.label) {\n                // Already found it\n            } else {\n                String key = (String) keyValues[i];\n                vertex.property(key, keyValues[i + 1]);\n            }\n        }\n\n        tx.addVertex(vertex);\n\n        return vertex;\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(Object... vertexIds) {\n        if (vertexIds.length == 0) {\n            if (!allowFullGraphScans) {\n                throw new BitsyException(BitsyErrorCodes.FULL_GRAPH_SCANS_ARE_DISABLED, \"Can not evaluate vertices()\");\n            }\n\n            final ITransaction tx = getTx();\n\n            return tx.getAllVertices();\n        } else if (vertexIds.length == 1) {\n            Vertex vertex = getVertex(vertexIds[0]);\n            if (vertex == null) {\n                return Collections.<Vertex>emptyList().iterator();\n            } else {\n                return Collections.singletonList(vertex).iterator();\n            }\n        } else {\n            validateHomogenousIds(vertexIds);\n            List<Vertex> ans = new ArrayList<Vertex>();\n            for (Object vertexId : vertexIds) {\n                Vertex vertex = getVertex(vertexId);\n                if (vertex != null) {\n                    ans.add(vertex);\n                }\n            }\n            return ans.iterator();\n        }\n    }\n\n    private Vertex getVertex(Object id) {\n        if (id == null) {\n            throw new IllegalArgumentException(\"The vertex ID passed to getVertex() is null\");\n        }\n\n        Vertex ans;\n        if (id instanceof UUID) {\n            ans = getTx().getVertex((UUID) id);\n        } else if (id instanceof String) {\n            // Get the UUID from the string representation -- may fail\n            UUID uuid;\n            try {\n                uuid = UUID.fromString((String) id);\n            } catch (IllegalArgumentException e) {\n                // Decoding failed\n                return null;\n            }\n\n            ans = getTx().getVertex(uuid);\n        } else if (id instanceof Vertex) {\n            return getTx().getVertex((UUID) ((Vertex) id).id());\n        } else {\n            // Wrong type\n            ans = null;\n        }\n\n        return ans;\n    }\n\n    private Edge getEdge(Object id) {\n        if (id == null) {\n            throw new IllegalArgumentException(\"The edge ID passed to getEdge() is null\");\n        }\n\n        if (id instanceof UUID) {\n            return getTx().getEdge((UUID) id);\n        } else if (id instanceof String) {\n            // Get the UUID from the string representation -- may fail\n            UUID uuid;\n            try {\n                uuid = UUID.fromString((String) id);\n            } catch (IllegalArgumentException e) {\n                // Decoding failed\n                return null;\n            }\n\n            return getTx().getEdge(uuid);\n        } else if (id instanceof Edge) {\n            return getTx().getEdge((UUID) ((Edge) id).id());\n        } else {\n            // Wrong type\n            return null;\n        }\n    }\n\n    public Iterator<Edge> edges(Object... edgeIds) {\n        if (edgeIds.length == 0) {\n            if (!allowFullGraphScans) {\n                throw new BitsyException(BitsyErrorCodes.FULL_GRAPH_SCANS_ARE_DISABLED, \"Can not evaluate edges()\");\n            }\n\n            final ITransaction tx = getTx();\n\n            return tx.getAllEdges();\n        } else if (edgeIds.length == 1) {\n            Edge edge = getEdge(edgeIds[0]);\n            if (edge == null) {\n                return Collections.<Edge>emptyList().iterator();\n            } else {\n                return Collections.singletonList(edge).iterator();\n            }\n        } else {\n            validateHomogenousIds(edgeIds);\n            List<Edge> ans = new ArrayList<Edge>();\n            for (Object edgeId : edgeIds) {\n                Edge edge = getEdge(edgeId);\n\n                if (edge != null) {\n                    ans.add(edge);\n                }\n            }\n            return ans.iterator();\n        }\n    }\n\n    public void shutdown() {\n        try {\n            // As per Blueprints tests, shutdown() implies automatic commit\n            BitsyTransaction tx = curTransaction.get();\n            if ((tx != null) && tx.isOpen()) {\n                tx.commit();\n                tx = null;\n            }\n\n            // Shutdown the underlying store\n            graphStore.shutdown();\n\n            // remove threadlocal to avoid OOM\n            if (curTransaction != null) {\n                try {\n                    curTransaction.remove();\n                    curTransactionContext.remove();\n                } catch (Throwable t) {\n                    // Ignore\n                }\n            }\n        } finally {\n            if (this.objectName != null) {\n                // Deregister from JMX\n                MBeanServer server = ManagementFactory.getPlatformMBeanServer();\n                try {\n                    server.unregisterMBean(objectName);\n                } catch (Exception e) {\n                    log.error(\"Error unregistering MBean named \" + objectName + \" from the MBeanServer\", e);\n                }\n                objectName = null;\n            }\n        }\n    }\n\n    // Key indexes from TP2 -- now requires TraversalStrategy\n    public <T extends Element> void createKeyIndex(String key, Class<T> elementType) {\n        graphStore.createKeyIndex(key, elementType);\n    }\n\n    public <T extends Element> void dropKeyIndex(String key, Class<T> elementType) {\n        graphStore.dropKeyIndex(key, elementType);\n    }\n\n    public <T extends Element> Set<String> getIndexedKeys(Class<T> elementType) {\n        return graphStore.getIndexedKeys(elementType);\n    }\n\n    public Iterator<BitsyVertex> verticesByIndex(final String key, final Object value) {\n        final ITransaction tx = getTx();\n\n        return tx.lookupVertices(key, value);\n    }\n\n    public Iterator<BitsyEdge> edgesByIndex(final String key, final Object value) {\n        final ITransaction tx = getTx();\n\n        return tx.lookupEdges(key, value);\n    }\n\n    public IGraphStore getStore() {\n        return graphStore;\n    }\n\n    @Override\n    public void close() throws Exception {\n        this.shutdown();\n    }\n\n    @Override\n    public Variables variables() {\n        throw new UnsupportedOperationException(\"Bitsy doesn't support variables. Please store the data in a vertex\");\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyGraphMBean.java",
    "content": "package com.lambdazen.bitsy;\n\npublic interface BitsyGraphMBean {\n    /**\n     * Returns the reorgFactor which typically determines when the V?.txt and\n     * E?.txt file will be reorganized. Reorganization is triggered only when the\n     * total number of new vertices and edges added is more than the factor\n     * multiplied by the original number of vertices and edges. Default value is 1.\n     */\n    public double getReorgFactor();\n\n    /**\n     * Set the reorgFactor. A higher number indicates fewer file operations, but\n     * more disk space and startup time in the worst case. Default value is 1.\n     */\n    public void setReorgFactor(double factor);\n\n    /**\n     * Returns the minimum number of vertices and edges that must be added\n     * before a reorganization is considered. This rule is used in combination\n     * with the reorgFactor. Default value is 1000.\n     */\n    public int getMinLinesPerReorg();\n\n    /**\n     * Modify the minimum lines to be added before a reorganization is\n     * considered. Default value is 1000.\n     */\n    public void setMinLinesPerReorg(int minLinesPerReorg);\n\n    /**\n     * Returns the transaction log threshold which is the minimum size of the\n     * transaction log (T?.txt) in bytes, before which the contents of the log\n     * are copied to V?.txt and E?.txt. Default value is 4MB.\n     */\n    public long getTxLogThreshold();\n\n    /**\n     * Modify the transaction log threshold. A higher number indicates fewer\n     * file operations, but more disk space and startup time in the worst case.\n     * Default value is 4MB.\n     */\n    public void setTxLogThreshold(long txLogThreshold);\n\n    /** This method flushes the transaction log to the V/E text files */\n    public void flushTxLog();\n\n    /** This method backs up the database while it is still operational. Only one backup can be in progress at a time.\n     *\n     * @param pathToDir directory to which the database must be backed up.\n     */\n    public void backup(String pathToDir);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyGraphSONModule.java",
    "content": "// Copyright 2017 JanusGraph Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport java.io.IOException;\nimport java.util.Collections;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport org.apache.tinkerpop.gremlin.structure.io.graphson.TinkerPopJacksonModule;\nimport org.apache.tinkerpop.shaded.jackson.core.*;\nimport org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId;\nimport org.apache.tinkerpop.shaded.jackson.databind.DeserializationContext;\nimport org.apache.tinkerpop.shaded.jackson.databind.SerializerProvider;\nimport org.apache.tinkerpop.shaded.jackson.databind.deser.std.StdDeserializer;\nimport org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeSerializer;\nimport org.apache.tinkerpop.shaded.jackson.databind.ser.std.StdSerializer;\n\n/**\n * @author Stephen Mallette (http://stephen.genoprime.com)\n */\npublic class BitsyGraphSONModule extends TinkerPopJacksonModule {\n\n    private static final String TYPE_NAMESPACE = \"bitsy\";\n\n    private static final Map<Class, String> TYPE_DEFINITIONS =\n            Collections.unmodifiableMap(new LinkedHashMap<Class, String>() {\n                {\n                    put(UUID.class, \"UUID\");\n                    put(VertexBean.class, \"VertexBean\");\n                    put(EdgeBean.class, \"EdgeBean\");\n                }\n            });\n\n    private BitsyGraphSONModule() {\n        super(\"bitsy\");\n        addSerializer(UUID.class, new UUIDSerializer());\n        addDeserializer(UUID.class, new UUIDDeserializer());\n\n        //        addSerializer(VertexBean.class, new UUIDSerializer());\n        //        addSerializer(EdgeBean.class, new UUIDSerializer());\n    }\n\n    private static final BitsyGraphSONModule INSTANCE = new BitsyGraphSONModule();\n\n    public static final BitsyGraphSONModule getInstance() {\n        return INSTANCE;\n    }\n\n    @Override\n    public Map<Class, String> getTypeDefinitions() {\n        return TYPE_DEFINITIONS;\n    }\n\n    @Override\n    public String getTypeNamespace() {\n        return TYPE_NAMESPACE;\n    }\n\n    public static class UUIDSerializer extends StdSerializer<UUID> {\n\n        public UUIDSerializer() {\n            super(UUID.class);\n        }\n\n        @Override\n        public void serialize(\n                final UUID uuid, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider)\n                throws IOException, JsonGenerationException {\n            String uuidStr = UUID.toString(uuid);\n            jsonGenerator.writeString(uuidStr);\n        }\n\n        @Override\n        public void serializeWithType(\n                final UUID uuid,\n                final JsonGenerator jsonGenerator,\n                final SerializerProvider serializerProvider,\n                final TypeSerializer typeSerializer)\n                throws IOException, JsonProcessingException {\n            // since jackson 2.9, must keep track of `typeIdDef` in order to close it properly\n            final WritableTypeId typeIdDef =\n                    typeSerializer.writeTypePrefix(jsonGenerator, typeSerializer.typeId(uuid, JsonToken.VALUE_STRING));\n            String uuidStr = UUID.toString(uuid);\n            jsonGenerator.writeString(uuidStr);\n            typeSerializer.writeTypeSuffix(jsonGenerator, typeIdDef);\n        }\n    }\n\n    public static class UUIDDeserializer extends StdDeserializer<UUID> {\n        public UUIDDeserializer() {\n            super(UUID.class);\n        }\n\n        @Override\n        public UUID deserialize(final JsonParser jsonParser, final DeserializationContext deserializationContext)\n                throws IOException, JsonProcessingException {\n            jsonParser.nextToken();\n            final String uuidStr = deserializationContext.readValue(jsonParser, String.class);\n            return UUID.fromString(uuidStr);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyIoRegistryV3d0.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport org.apache.tinkerpop.gremlin.structure.io.AbstractIoRegistry;\nimport org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryIo;\nimport org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;\nimport org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;\nimport org.apache.tinkerpop.shaded.kryo.Kryo;\nimport org.apache.tinkerpop.shaded.kryo.Serializer;\nimport org.apache.tinkerpop.shaded.kryo.io.Input;\nimport org.apache.tinkerpop.shaded.kryo.io.Output;\n\npublic class BitsyIoRegistryV3d0 extends AbstractIoRegistry {\n    private static final BitsyIoRegistryV3d0 INSTANCE = new BitsyIoRegistryV3d0();\n\n    private BitsyIoRegistryV3d0() {\n        register(GryoIo.class, UUID.class, new UUIDGryoSerializer());\n        register(GryoIo.class, VertexBean.class, new UUIDGryoSerializer());\n        register(GryoIo.class, EdgeBean.class, new UUIDGryoSerializer());\n\n        register(GraphSONIo.class, UUID.class, BitsyGraphSONModule.getInstance());\n        register(GraphSONIo.class, VertexBean.class, BitsyGraphSONModule.getInstance());\n        register(GraphSONIo.class, EdgeBean.class, BitsyGraphSONModule.getInstance());\n\n        register(GraphBinaryIo.class, UUID.class, new UUIDGraphBinarySerializer());\n        register(GraphBinaryIo.class, VertexBean.class, new UUIDGraphBinarySerializer());\n        register(GraphBinaryIo.class, EdgeBean.class, new UUIDGraphBinarySerializer());\n    }\n\n    public static BitsyIoRegistryV3d0 instance() {\n        return INSTANCE;\n    }\n\n    static final class UUIDGryoSerializer extends Serializer<UUID> {\n        @Override\n        public void write(final Kryo kryo, final Output output, final UUID uuid) {\n            output.writeLong(uuid.getMostSignificantBits());\n            output.writeLong(uuid.getLeastSignificantBits());\n        }\n\n        @Override\n        public UUID read(final Kryo kryo, final Input input, final Class<UUID> aClass) {\n            long msb = input.readLong();\n            long lsb = input.readLong();\n            return new UUID(msb, lsb);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyIsolationLevel.java",
    "content": "package com.lambdazen.bitsy;\n\npublic enum BitsyIsolationLevel {\n    READ_COMMITTED, // default\n    REPEATABLE_READ\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyProperty.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.util.NoSuchElementException;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.util.ElementHelper;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyProperty<T> implements Property<T> {\n    BitsyElement element;\n    String key;\n    T value;\n    boolean removed = false;\n\n    public BitsyProperty(BitsyElement element, String key, T value) {\n        this.element = element;\n        this.key = key;\n        this.value = value;\n    }\n\n    @Override\n    public String key() {\n        return key;\n    }\n\n    @Override\n    public T value() throws NoSuchElementException {\n        if (removed) {\n            throw new NoSuchElementException(\"This property is empty\");\n        } else {\n            return value;\n        }\n    }\n\n    @Override\n    public boolean isPresent() {\n        return !removed;\n    }\n\n    @Override\n    public Element element() {\n        return element;\n    }\n\n    @Override\n    public void remove() {\n        if (isPresent()) {\n            element.removeProperty(key);\n            this.removed = true;\n        }\n    }\n\n    // Moved to ElementHelper hashCode and equals in TP3\n    @Override\n    public int hashCode() {\n        return ElementHelper.hashCode(this);\n    }\n\n    @Override\n    public boolean equals(final Object object) {\n        return ElementHelper.areEqual(this, object);\n    }\n\n    public String toString() {\n        return StringFactory.propertyString(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyRetryException.java",
    "content": "package com.lambdazen.bitsy;\n\npublic class BitsyRetryException extends BitsyException {\n    private static final long serialVersionUID = 976641612846833462L;\n    BitsyErrorCodes code;\n\n    public BitsyRetryException(BitsyErrorCodes code) {\n        super(code);\n    }\n\n    public BitsyRetryException(BitsyErrorCodes code, String s) {\n        super(code, s);\n    }\n\n    public BitsyRetryException(BitsyErrorCodes code, String s, Throwable t) {\n        super(code, s, t);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyState.java",
    "content": "package com.lambdazen.bitsy;\n\npublic enum BitsyState {\n    U, // unmodified\n    M, // modified\n    D // deleted\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyVertex.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.store.IStringCanonicalizer;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport com.lambdazen.bitsy.store.VertexBeanJson;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.T;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.VertexProperty;\nimport org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyVertex extends BitsyElement implements Vertex {\n    private static final Direction[] directions = new Direction[] {Direction.OUT, Direction.IN};\n\n    public BitsyVertex(\n            UUID id, String label, Dictionary properties, BitsyTransaction tx, BitsyState state, int version) {\n        super(id, label, properties, tx, state, version);\n    }\n\n    public BitsyVertex(VertexBean bean, BitsyTransaction tx, BitsyState state) {\n        this(bean.getId(), bean.getLabel(), bean.getPropertiesDict(), tx, state, bean.getVersion());\n    }\n\n    @Override\n    public String label() {\n        String result = super.label();\n        return (result == null) ? Vertex.DEFAULT_LABEL : result;\n    }\n\n    @Override\n    public Iterator<Edge> edges(Direction dir, String... edgeLabels) {\n        return tx.getEdges(this, dir, edgeLabels).iterator();\n    }\n\n    public VertexBean asBean() {\n        // The TX is usually not active at this point. So no checks.\n        return new VertexBean((UUID) id, label, properties, version);\n    }\n\n    public VertexBean asBean(IStringCanonicalizer canonicalizer) {\n        if (properties != null) {\n            properties.canonicalizeKeys(canonicalizer);\n        }\n\n        return asBean();\n    }\n\n    public VertexBeanJson asJsonBean() {\n        // The TX is usually not active at this point. So no checks.\n        // TreeMap<String, Object> propertyMap = (properties == null) ? null : properties.toMap();\n        return new VertexBeanJson((UUID) id, label, properties, version, state);\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(final Direction dir, String... edgeLabels) {\n        final ArrayList<Vertex> vertices = new ArrayList<Vertex>();\n\n        for (Direction myDir : directions) {\n            if ((myDir == dir) || (dir == Direction.BOTH)) {\n                Iterator<Edge> iter = edges(myDir, edgeLabels);\n                while (iter.hasNext()) {\n                    Edge e = iter.next();\n                    Vertex toAdd = (myDir.opposite() == Direction.IN) ? e.inVertex() : e.outVertex();\n                    vertices.add(toAdd);\n                }\n            }\n        }\n\n        // Go through the edges and load the vertices\n        return vertices.iterator();\n    }\n\n    public void incrementVersion() {\n        // It is OK for the version to wrap around MAX_INT\n        this.version++;\n    }\n\n    public void remove() {\n        tx.removeVertex(this);\n    }\n\n    @Override\n    public Edge addEdge(String label, Vertex inVertex, Object... keyValues) {\n        if (keyValues.length % 2 == 1) {\n            throw new IllegalArgumentException(\n                    \"Expecting even number of items in the keyValue array. Found \" + keyValues.length);\n        }\n\n        if (label == null) {\n            throw new IllegalArgumentException(\"You have to specify a non-null String label when adding an edge\");\n        } else if (label.length() == 0) {\n            throw new IllegalArgumentException(\"You have to specify a non-empty String label when adding an edge\");\n        } else if (label.charAt(0) == '~') {\n            throw new IllegalArgumentException(\"Labels beginning with ~ are invalid\");\n        }\n\n        if (inVertex == null) {\n            throw new IllegalArgumentException(\"The inVertex supplied to addEdge() is null\");\n        }\n\n        // Validate first\n        for (int i = 0; i < keyValues.length; i = i + 2) {\n            if (keyValues[i] == T.label) {\n                throw new UnsupportedOperationException(\"Encountered T.label in addVertex\");\n            } else if (keyValues[i] == T.id) {\n                throw new UnsupportedOperationException(\n                        \"Encountered T.id in addVertex\", new BitsyException(BitsyErrorCodes.NO_CUSTOM_ID_SUPPORT));\n            } else if (keyValues[i] == null) {\n                throw new IllegalArgumentException(\"Encountered a null key in argument #\" + i);\n            } else if (keyValues[i + 1] == null) {\n                throw new IllegalArgumentException(\"Encountered a null value in argument #\" + i);\n            } else if (!(keyValues[i] instanceof String)) {\n                throw new IllegalArgumentException(\n                        \"Encountered a non-string key: \" + keyValues[i] + \" in argument #\" + i);\n            }\n        }\n\n        // Construct the edge with this as the out vertex\n        BitsyEdge edge =\n                new BitsyEdge(UUID.randomUUID(), null, tx, BitsyState.M, 0, label, (UUID) id(), (UUID) inVertex.id());\n\n        for (int i = 0; i < keyValues.length; i = i + 2) {\n            String key = (String) keyValues[i];\n            edge.property(key, keyValues[i + 1]);\n        }\n\n        tx.addEdge(edge);\n\n        return edge;\n    }\n\n    public String toString() {\n        return StringFactory.vertexString(this);\n    }\n\n    // THERE ARE TWO MORE COPIES OF THIS CODE IN ELEMENT AND EDGE\n    @Override\n    public <T> VertexProperty<T> property(String key) {\n        T value = value(key);\n        if (value == null) {\n            return VertexProperty.<T>empty();\n        } else {\n            return new BitsyVertexProperty<T>(this, key, value);\n        }\n    }\n\n    @Override\n    public <V> VertexProperty<V> property(String key, V value) {\n        super.property(key, value);\n        return new BitsyVertexProperty<V>(this, key, value);\n    }\n\n    @Override\n    public <V> VertexProperty<V> property(\n            final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues) {\n        if (cardinality != Cardinality.single) {\n            // For some reason, TP3 tests fail with this exception\n            // throw new BitsyException(BitsyErrorCodes.NO_MULTI_PROPERTY_SUPPORT, \"Encountered cardinality: \" +\n            // cardinality.toString());\n        } else if (keyValues.length != 0) {\n            throw new UnsupportedOperationException(\n                    \"Encountered key values: \" + keyValues.toString(),\n                    new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT));\n        }\n\n        return property(key, value);\n    }\n\n    // THERE ARE TWO MORE COPIES OF THIS CODE IN ELEMENT AND EDGE\n    @Override\n    public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {\n        ArrayList<VertexProperty<V>> ans = new ArrayList<VertexProperty<V>>();\n\n        if (propertyKeys.length == 0) {\n            if (this.properties == null) return Collections.emptyIterator();\n            propertyKeys = this.properties.getPropertyKeys();\n        }\n\n        for (String key : propertyKeys) {\n            VertexProperty<V> prop = property(key);\n            if (prop.isPresent()) ans.add(prop);\n        }\n        return ans.iterator();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/BitsyVertexProperty.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.Set;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.VertexProperty;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyVertexProperty<V> extends BitsyProperty<V> implements VertexProperty<V> {\n    public BitsyVertexProperty(final BitsyVertex vertex, final String key, final V value) {\n        super(vertex, key, value);\n    }\n\n    @Override\n    public Set<String> keys() {\n        return Collections.emptySet();\n    }\n\n    @Override\n    public <U> Property<U> property(final String key) {\n        throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);\n    }\n\n    @Override\n    public <U> Property<U> property(final String key, final U value) {\n        throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);\n    }\n\n    @Override\n    public Vertex element() {\n        return (BitsyVertex) super.element();\n    }\n\n    @Override\n    public <U> Iterator<Property<U>> properties(final String... propertyKeys) {\n        throw new BitsyException(BitsyErrorCodes.NO_META_PROPERTY_SUPPORT);\n    }\n\n    @Override\n    public Object id() {\n        return element().id().toString() + \":\" + key();\n    }\n\n    public String toString() {\n        return StringFactory.propertyString(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ICommitChanges.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.util.Collection;\n\npublic interface ICommitChanges {\n    public Collection<BitsyVertex> getVertexChanges();\n\n    public Collection<BitsyEdge> getEdgeChanges();\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/IEdge.java",
    "content": "package com.lambdazen.bitsy;\n\npublic interface IEdge {\n    public UUID getInVertexId();\n\n    public UUID getOutVertexId();\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/IGraphStore.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Set;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Element;\n\npublic interface IGraphStore {\n    public void commit(ICommitChanges changes);\n\n    /** Only to be used internally within the store */\n    public VertexBean getVertex(UUID id);\n\n    /** Returns a transaction-specific BitsyVertex given the tx and the ID */\n    public BitsyVertex getBitsyVertex(BitsyTransaction tx, UUID id);\n\n    /** Only to be used internally within the store */\n    public EdgeBean getEdge(UUID id);\n\n    /** Returns a transaction-specific BitsyEdge given the tx and the ID */\n    public BitsyEdge getBitsyEdge(BitsyTransaction tx, UUID id);\n\n    public List<EdgeBean> getEdges(UUID vertexId, Direction dir, String[] edgeLabels);\n\n    public Collection<VertexBean> getAllVertices();\n\n    public Collection<EdgeBean> getAllEdges();\n\n    public <T extends Element> void createKeyIndex(String key, Class<T> elementType);\n\n    public <T extends Element> void dropKeyIndex(String key, Class<T> elementType);\n\n    public <T extends Element> Set<String> getIndexedKeys(Class<T> elementType);\n\n    public void shutdown();\n\n    public Collection<VertexBean> lookupVertices(String key, Object value);\n\n    public Collection<EdgeBean> lookupEdges(String key, Object value);\n\n    public boolean allowFullGraphScans();\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ITransaction.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.util.Iterator;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Transaction;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\npublic interface ITransaction extends Transaction {\n    public void save(boolean commit);\n\n    public void validateForQuery(BitsyElement bitsyElement) throws BitsyException;\n\n    public Vertex getVertex(UUID outVertexId) throws BitsyException;\n\n    public Edge getEdge(UUID id) throws BitsyException;\n\n    public Iterable<Edge> getEdges(BitsyVertex bitsyVertex, Direction dir, String... edgeLabels) throws BitsyException;\n\n    public void markForPropertyUpdate(BitsyElement bitsyElement) throws BitsyException;\n\n    public void addVertex(BitsyVertex vertex) throws BitsyException;\n\n    public void removeVertex(BitsyVertex vertex) throws BitsyException;\n\n    public void addEdge(BitsyEdge edge) throws BitsyException;\n\n    public void removeEdge(BitsyEdge edge) throws BitsyException;\n\n    public Iterator<Vertex> getAllVertices();\n\n    public Iterator<Edge> getAllEdges();\n\n    public Iterator<BitsyVertex> lookupVertices(String key, Object value);\n\n    public Iterator<BitsyEdge> lookupEdges(String key, Object value);\n\n    public BitsyIsolationLevel getIsolationLevel();\n\n    public void setIsolationLevel(BitsyIsolationLevel level);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/PortDatabase.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.nio.charset.Charset;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n/** This class ports the database files across major versions */\npublic class PortDatabase {\n    public static final List<String> SUPPORTED_VERSIONS = Arrays.asList(new String[] {\"1.0\", \"1.5\"});\n\n    private static final String[] FILE_NAMES =\n            new String[] {\"metaA.txt\", \"metaB.txt\", \"vA.txt\", \"vB.txt\", \"eA.txt\", \"eB.txt\", \"txA.txt\", \"txB.txt\"};\n    private static final Charset UTF8 = Charset.forName(\"UTF-8\");\n\n    String targetVersion;\n    Path sourcePath;\n    Path targetPath;\n    String sourceVersion;\n    String error = null;\n\n    public PortDatabase(String[] args) throws IOException {\n        if (args.length == 0) {\n            setError(\"No arguments provided\");\n            return;\n        } else if (args.length != 4) {\n            setError(\"Expecting 4 arguments\");\n            return;\n        }\n\n        this.targetVersion = null;\n        int i;\n        for (i = 0; i < args.length - 1; i++) {\n            if (args[i].equals(\"-toVersion\")) {\n                targetVersion = args[i + 1];\n                break;\n            }\n        }\n\n        String sourceDir = (i == 0) ? args[2] : args[0];\n        String targetDir = (i == 2) ? args[1] : args[3];\n\n        if (targetVersion == null) {\n            setError(\"Could not find -toVersion flag followed by a version number\");\n            return;\n        } else if (!SUPPORTED_VERSIONS.contains(targetVersion)) {\n            setError(\"The version number \" + targetVersion\n                    + \" provided in the -toVersion flag is not supported. You must provide one of the following: \"\n                    + SUPPORTED_VERSIONS);\n            return;\n        }\n\n        this.sourcePath = Paths.get(sourceDir);\n        this.targetPath = Paths.get(targetDir);\n\n        if (!Files.isDirectory(sourcePath)) {\n            setError(\"Source path \" + sourceDir + \" does not point to a directory\");\n            return;\n        }\n\n        if (!Files.isDirectory(targetPath)) {\n            setError(\"Target path \" + targetDir + \" does not point to a directory\");\n            return;\n        }\n\n        this.sourceVersion = getVersion(sourcePath);\n        if (sourceVersion == null) {\n            return;\n        }\n\n        if (!SUPPORTED_VERSIONS.contains(sourceVersion)) {\n            setError(\"The version number \" + sourceVersion\n                    + \" found in the source database is not supported. You must provide a database created by one of these versions of Bitsy: \"\n                    + SUPPORTED_VERSIONS);\n            return;\n        }\n\n        if (sourceVersion.equals(targetVersion)) {\n            setError(\"The source and target version numbers are the same: Version \" + sourceVersion);\n            return;\n        }\n\n        System.out.println(\"Porting database in \" + sourceDir + \" from version \" + sourceVersion + \" to version \"\n                + targetVersion + \" under \" + targetDir);\n\n        portDatabase();\n\n        System.out.println(\"Success\");\n    }\n\n    private void portDatabase() throws IOException {\n        Converter converter;\n        if (sourceVersion.equals(\"1.0\") && targetVersion.equals(\"1.5\")) {\n            converter = new V10ToV15Coverter();\n        } else if (sourceVersion.equals(\"1.5\") && targetVersion.equals(\"1.0\")) {\n            converter = new V15ToV10Coverter();\n        } else {\n            setError(\"PortDatabase does not support porting from source version \" + sourceVersion\n                    + \" to target version \" + targetVersion);\n            return;\n        }\n\n        for (String fileName : FILE_NAMES) {\n            Path path = sourcePath.resolve(fileName);\n\n            InputStream fis = null;\n            BufferedReader br = null;\n            OutputStream fos = null;\n\n            try {\n                fis = Files.newInputStream(path);\n                fos = Files.newOutputStream(targetPath.resolve(fileName));\n                br = new BufferedReader(new InputStreamReader(fis, UTF8));\n\n                String line;\n                int lineNo = 0;\n                while ((line = br.readLine()) != null) {\n                    String outLine = converter.convert(line, lineNo, fileName);\n                    if (outLine != null) {\n                        fos.write(outLine.getBytes(UTF8));\n                        fos.write('\\n');\n                    }\n                }\n            } finally {\n                if (br != null) {\n                    br.close();\n                }\n\n                if (fis != null) {\n                    fis.close();\n                }\n\n                if (fos != null) {\n                    fos.close();\n                }\n            }\n        }\n    }\n\n    private String getVersion(Path sourcePath) throws IOException {\n        Path mA = sourcePath.resolve(\"metaA.txt\");\n        Path mB = sourcePath.resolve(\"metaB.txt\");\n\n        String version = \"1.0\";\n        boolean missingFiles = true;\n        if (Files.exists(mA)) {\n            String versionA = getVersionFromPath(mA);\n            if (versionA != null) {\n                version = versionA;\n            }\n            missingFiles = false;\n        }\n\n        if (Files.exists(mB)) {\n            String versionB = getVersionFromPath(mB);\n            if (versionB != null) {\n                version = versionB;\n            }\n            missingFiles = false;\n        }\n\n        if (missingFiles) {\n            setError(\"Neither metaA.txt nor metaB.txt can be found in \" + sourcePath);\n            return null;\n        } else {\n            return version;\n        }\n    }\n\n    public String getVersionFromPath(Path metaPath) throws IOException {\n        String fileName = metaPath.toString();\n        try (BufferedReader br = Files.newBufferedReader(metaPath, StandardCharsets.UTF_8)) {\n            String line;\n            int lineNo = 0;\n            while ((line = br.readLine()) != null) {\n                lineNo++;\n\n                int hashPos = line.lastIndexOf('#');\n                if (hashPos < 0) {\n                    throw new BitsyException(\n                            BitsyErrorCodes.CHECKSUM_MISMATCH,\n                            \"Line \" + lineNo + \" in file \" + fileName + \" has no hash-code. Encountered \" + line);\n                } else {\n                    String hashCode = line.substring(hashPos + 1);\n                    String expHashCode = toHex(line.substring(0, hashPos + 1).hashCode());\n\n                    if (!hashCode.endsWith(expHashCode)) {\n                        throw new BitsyException(\n                                BitsyErrorCodes.CHECKSUM_MISMATCH,\n                                \"Line \" + lineNo + \" in file \" + fileName + \" has the wrong hash-code \" + hashCode\n                                        + \". Expected \" + expHashCode);\n                    } else {\n                        // All OK\n                        char typeChar = line.charAt(0);\n                        String version = line.substring(2, hashPos);\n\n                        if (typeChar == 'M') {\n                            return version;\n                        }\n                    }\n                }\n            }\n        }\n\n        return null;\n    }\n\n    private void setError(String error) {\n        this.error = error;\n    }\n\n    private String getError() {\n        return error;\n    }\n\n    private static void printUsage(String error) {\n        if (error != null) {\n            System.err.println(\"ERROR: \" + error);\n        }\n\n        System.err.println(\n                \"Usage: java com.lambdazen.bitsy.PortDatabase -toVersion <target version number> <source directory> <target directory>\");\n    }\n\n    public static void main(String[] args) {\n        try {\n            PortDatabase task = new PortDatabase(args);\n\n            if (task.getError() != null) {\n                printUsage(task.getError());\n                System.exit(1);\n            }\n        } catch (Exception e) {\n            e.printStackTrace();\n            System.exit(1);\n        }\n    }\n\n    // Faster than Integer.toHexString()\n    private static final char[] HEX_CHAR_ARR = \"0123456789abcdef\".toCharArray();\n\n    private static String toHex(int input) {\n        final char[] sb = new char[8];\n        final int len = (sb.length - 1);\n        for (int i = 0; i <= len; i++) { // MSB\n            sb[i] = HEX_CHAR_ARR[((int) (input >>> ((len - i) << 2))) & 0xF];\n        }\n        return new String(sb);\n    }\n\n    public interface Converter {\n        public String convert(String line, int lineNo, String fileName);\n    }\n\n    public class V10ToV15Coverter implements Converter {\n        Pattern edgePat = Pattern.compile(\"^(E=\\\\{[^{}]*,\\\"p\\\":)\\\\[\\\"java.util.TreeMap\\\",(.*)\\\\]\\\\}#[0-9a-zA-Z]*$\");\n\n        @Override\n        public String convert(String line, int lineNo, String fileName) {\n            if (line.startsWith(\"H=\") && fileName.startsWith(\"meta\")) {\n                String versionLine = \"M=1.5#\";\n                return line + \"\\n\" + versionLine + toHex(versionLine.hashCode());\n            } else if (line.startsWith(\"E=\")) {\n                Matcher m = edgePat.matcher(line);\n                if (!m.find()) {\n                    return line;\n                } else {\n                    // Move from TreeMap to Map\n                    line = m.group(1) + m.group(2) + \"}#\";\n\n                    return line + toHex(line.hashCode());\n                }\n            } else {\n                return line;\n            }\n        }\n    }\n\n    public class V15ToV10Coverter implements Converter {\n        Pattern edgePat = Pattern.compile(\"^(E=\\\\{[^{}]*,\\\"p\\\":)(.*)\\\\}#[0-9a-zA-Z]*$\");\n\n        @Override\n        public String convert(String line, int lineNo, String fileName) {\n            if (line.startsWith(\"M=\") && fileName.startsWith(\"meta\")) {\n                // Skip the version\n                return null;\n            } else if (line.startsWith(\"E=\")) {\n                Matcher m = edgePat.matcher(line);\n                if (!m.find()) {\n                    return line;\n                } else {\n                    // Move from TreeMap to Map\n                    line = m.group(1) + \"[\\\"java.util.TreeMap\\\",\" + m.group(2) + \"]}#\";\n\n                    return line + toHex(line.hashCode());\n                }\n            } else {\n                return line;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ThreadedBitsyGraph.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport com.lambdazen.bitsy.tx.BitsyTransactionContext;\n\npublic class ThreadedBitsyGraph extends BitsyGraph {\n    BitsyGraph underlyingGraph;\n    BitsyTransaction tx;\n\n    public ThreadedBitsyGraph(BitsyGraph g) {\n        // Using protected constructor that doesn't create a graph store\n        super('_', g.isFullGraphScanAllowed());\n\n        this.underlyingGraph = g;\n        this.tx = null;\n    }\n\n    public String toString() {\n        return underlyingGraph.toString();\n    }\n\n    @Override\n    public Features features() {\n        return underlyingGraph.features();\n    }\n\n    @Override\n    protected BitsyTransaction getTx() {\n        // Overriding the getTx() method ensures that the work will be done on\n        // the local transaction, NOT the ThreadLocal transaction\n        if ((tx == null) || (!tx.isOpen())) {\n            this.tx = new BitsyTransaction(\n                    new BitsyTransactionContext(underlyingGraph.getStore()),\n                    getDefaultIsolationLevel(),\n                    underlyingGraph);\n        }\n\n        return tx;\n    }\n\n    @Override\n    /** This method can be used to check if the current threaded-graph is actively executing a transaction */\n    public boolean isTransactionActive() {\n        return (tx != null);\n    }\n\n    public BitsyIsolationLevel getDefaultIsolationLevel() {\n        return underlyingGraph.getDefaultIsolationLevel();\n    }\n\n    public void setDefaultIsolationLevel(BitsyIsolationLevel level) {\n        underlyingGraph.setDefaultIsolationLevel(level);\n    }\n\n    public BitsyIsolationLevel getTxIsolationLevel() {\n        return getTx().getIsolationLevel();\n    }\n\n    public void setTxIsolationLevel(BitsyIsolationLevel level) {\n        getTx().setIsolationLevel(level);\n    }\n\n    @Override\n    public void shutdown() {\n        // As per Blueprints tests, shutdown() implies automatic commit\n        if (tx == null) {\n            // Nothing to do\n        } else {\n            try {\n                // Stop the old transaction if it exists\n                tx.commit();\n            } finally {\n                // Remove this transaction -- independent of success/failure\n                this.tx = null;\n            }\n        }\n\n        // Don't mess with the graph store -- this is only a ThreadedGraph, not the main one\n    }\n\n    //    @Deprecated\n    //    public void stopTransaction(Conclusion conclusion) {\n    //        stopTx(conclusion == Conclusion.SUCCESS);\n    //    }\n\n    //    @Override\n    //    public void commit() {\n    //        tx.save(commit);\n    //    }\n    //\n    //    @Override\n    //    public void rollback() {\n    //        stopTx(false);\n    //    }\n    //\n    //    public void stopTx(boolean commit) {\n    //        if (tx == null) {\n    //            // Nothing to do\n    //        } else {\n    //            try {\n    //                // Stop the old transaction if it exists\n    //                tx.save(commit);\n    //            } finally {\n    //                // Remove this transaction -- independent of success/failure\n    //                this.tx = null;\n    //            }\n    //        }\n    //    }\n    //\n    //    @Override\n    //    public TransactionalGraph startTransaction() {\n    //        throw new UnsupportedOperationException(\"Can not startTransaction on a threaded transaction graph\");\n    //    }\n    //\n    //    @Override\n    //    public void shutdown() {\n    //        // As per Blueprints tests, shutdown() implies automatic commit\n    //        stopTx(true);\n    //\n    //        // Don't mess with the graph store -- this is only a ThreadedGraph, not the main one\n    //    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/UUID.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\n/** This class captures a UUID and is modeled after java.util.UUID */\npublic class UUID implements Comparable<UUID> {\n    // Java guarantees that\n    // \"Reads and writes are atomic for reference variables and for most primitive variables (all types except long and\n    // double).\"\n    // Therefore, mostSigBits and leastSigBits must not be changed during the lifetime of this object.\n    // Also, these objects must not be accessible to other threads without a memory flush/fence/barrier\n    // Typically this memory barrier is handled by the ConcurrentHashMap that holds the vertex/edge bean.\n    private final long mostSigBits;\n    private final long leastSigBits;\n\n    public UUID(long msb, long lsb) {\n        this.mostSigBits = msb;\n        this.leastSigBits = lsb;\n    }\n\n    @JsonIgnore\n    public long getMostSignificantBits() {\n        return mostSigBits;\n    }\n\n    @JsonIgnore\n    public long getLeastSignificantBits() {\n        return leastSigBits;\n    }\n\n    public String toString() {\n        return uuidRepr();\n    }\n\n    public String uuidRepr() {\n        return new java.util.UUID(mostSigBits, leastSigBits).toString();\n    }\n\n    public static UUID fromString(String str) {\n        java.util.UUID ans = java.util.UUID.fromString(str);\n\n        return new UUID(ans.getMostSignificantBits(), ans.getLeastSignificantBits());\n    }\n\n    public static UUID randomUUID() {\n        java.util.UUID ans = java.util.UUID.randomUUID();\n\n        return new UUID(ans.getMostSignificantBits(), ans.getLeastSignificantBits());\n    }\n\n    public int compareTo(UUID other) {\n        if (this.mostSigBits < other.mostSigBits) {\n            return -1;\n        } else if (this.mostSigBits > other.mostSigBits) {\n            return 1;\n        } else if (this.leastSigBits < other.leastSigBits) {\n            return -1;\n        } else if (this.leastSigBits > other.leastSigBits) {\n            return 1;\n        } else {\n            return 0;\n        }\n    }\n\n    @Override\n    public int hashCode() {\n        // Same as java.util.UUID\n        long hilo = mostSigBits ^ leastSigBits;\n        return ((int) (hilo >> 32)) ^ (int) hilo;\n    }\n\n    @Override\n    public boolean equals(Object obj) {\n        if (obj == null) {\n            return false;\n        } else if (this == obj) {\n            return true;\n        } else {\n            try {\n                UUID other = (UUID) obj;\n                return (mostSigBits == other.getMostSignificantBits())\n                        && (leastSigBits == other.getLeastSignificantBits());\n            } catch (ClassCastException e) {\n                return false;\n            }\n        }\n    }\n\n    public static String toString(UUID obj) {\n        return new java.util.UUID(obj.getMostSignificantBits(), obj.getLeastSignificantBits()).toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/UUIDGraphBinarySerializer.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.io.IOException;\nimport org.apache.tinkerpop.gremlin.structure.io.Buffer;\nimport org.apache.tinkerpop.gremlin.structure.io.binary.DataType;\nimport org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryReader;\nimport org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter;\nimport org.apache.tinkerpop.gremlin.structure.io.binary.types.CustomTypeSerializer;\n\npublic class UUIDGraphBinarySerializer implements CustomTypeSerializer<UUID> {\n\n    private final byte[] typeInfoBuffer = new byte[] {0, 0, 0, 0};\n\n    @Override\n    public String getTypeName() {\n        return \"bitsy.UUID\";\n    }\n\n    @Override\n    public DataType getDataType() {\n        return DataType.CUSTOM;\n    }\n\n    @Override\n    public UUID read(Buffer buffer, GraphBinaryReader context) throws IOException {\n        // {custom type info}, {value_flag} and {value}\n        // No custom_type_info\n        if (buffer.readInt() != 0) {\n            throw new IOException(\"{custom_type_info} should not be provided for this custom type\");\n        }\n\n        return readValue(buffer, context, true);\n    }\n\n    @Override\n    public UUID readValue(Buffer buffer, GraphBinaryReader context, boolean nullable) throws IOException {\n        if (nullable) {\n            final byte valueFlag = buffer.readByte();\n            if ((valueFlag & 1) == 1) {\n                return null;\n            }\n        }\n\n        // Read the byte length of the value bytes\n        final int valueLength = buffer.readInt();\n\n        if (valueLength <= 0) {\n            throw new IOException(String.format(\"Unexpected value length: %d\", valueLength));\n        }\n\n        if (valueLength > buffer.readableBytes()) {\n            throw new IOException(\n                    String.format(\"Not enough readable bytes: %d (expected %d)\", valueLength, buffer.readableBytes()));\n        }\n\n        long msb = context.readValue(buffer, Long.class, false);\n        long lsb = context.readValue(buffer, Long.class, false);\n        return new UUID(msb, lsb);\n    }\n\n    @Override\n    public void write(UUID value, Buffer buffer, GraphBinaryWriter context) throws IOException {\n        // Write {custom type info}, {value_flag} and {value}\n        buffer.writeBytes(typeInfoBuffer);\n\n        writeValue(value, buffer, context, true);\n    }\n\n    @Override\n    public void writeValue(UUID value, Buffer buffer, GraphBinaryWriter context, boolean nullable) throws IOException {\n        if (value == null) {\n            if (!nullable) {\n                throw new IOException(\"Unexpected null value when nullable is false\");\n            }\n\n            context.writeValueFlagNull(buffer);\n            return;\n        }\n\n        if (nullable) {\n            context.writeValueFlagNone(buffer);\n        }\n\n        final Long msb = value.getMostSignificantBits();\n        final Long lsb = value.getLeastSignificantBits();\n\n        // value_length = name_byte_length + long + long\n        buffer.writeInt(4 + 8 + 8);\n\n        context.writeValue(msb, buffer, false);\n        context.writeValue(lsb, buffer, false);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport com.lambdazen.bitsy.store.IStringCanonicalizer;\n\n/**\n * This is an re-organizing (not immutable) map from String to Object. The set\n * and remove methods return a reference to a new map with the value.\n */\npublic interface Dictionary {\n    public int size();\n\n    public Object getProperty(String key);\n\n    public String[] getPropertyKeys();\n\n    public Dictionary setProperty(String key, Object value);\n\n    public Dictionary removeProperty(String key);\n\n    public Dictionary copyOf();\n\n    //\tpublic TreeMap<String, Object> toMap();\n\n    public void canonicalizeKeys(IStringCanonicalizer canonicalizer);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary1.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\n/** This class implements a dictionary with one element */\npublic class Dictionary1 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 1;\n\n    String key0;\n    Object value0;\n\n    // Expand constructor\n    public Dictionary1(String key, Object value) {\n        this.key0 = key;\n        this.value0 = value;\n    }\n\n    // Contract constructor\n    public Dictionary1(Dictionary2 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n    }\n\n    // Copy constructor\n    public Dictionary1(Dictionary1 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n    }\n\n    @Override\n    protected String[] keys() {\n        return new String[] {key0};\n    }\n\n    @Override\n    protected Object[] values() {\n        return new Object[] {value0};\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary1(this);\n    }\n\n    protected int contractThreshold() {\n        return 0;\n    }\n\n    protected Dictionary contract() {\n        return null;\n    }\n\n    protected Dictionary expand(String key, Object value) {\n        return new Dictionary2(this, key, value);\n    }\n\n    protected void write(int index, String key, Object value) {\n        key0 = key;\n        value0 = value;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary11.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary11 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 11;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    String key3;\n    Object value3;\n\n    String key4;\n    Object value4;\n\n    String key5;\n    Object value5;\n\n    String key6;\n    Object value6;\n\n    String key7;\n    Object value7;\n\n    String key8;\n    Object value8;\n\n    String key9;\n    Object value9;\n\n    String key10;\n    Object value10;\n\n    // Expand constructor\n    public Dictionary11(Dictionary8 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n\n        // Last key\n        this.key8 = key;\n        this.value8 = value;\n    }\n\n    // Contract constructor\n    public Dictionary11(Dictionary16 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n\n        this.key8 = base.key8;\n        this.value8 = base.value8;\n\n        this.key9 = base.key9;\n        this.value9 = base.value9;\n\n        this.key10 = base.key10;\n        this.value10 = base.value10;\n    }\n\n    // Copy constructor\n    public Dictionary11(Dictionary11 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n\n        this.key8 = base.key8;\n        this.value8 = base.value8;\n\n        this.key9 = base.key9;\n        this.value9 = base.value9;\n\n        this.key10 = base.key10;\n        this.value10 = base.value10;\n    }\n\n    // FromMap constructor\n    public Dictionary11(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n\n        this.key3 = lookupKey(keys, 3);\n        this.value3 = lookupValue(values, 3);\n\n        this.key4 = lookupKey(keys, 4);\n        this.value4 = lookupValue(values, 4);\n\n        this.key5 = lookupKey(keys, 5);\n        this.value5 = lookupValue(values, 5);\n\n        this.key6 = lookupKey(keys, 6);\n        this.value6 = lookupValue(values, 6);\n\n        this.key7 = lookupKey(keys, 7);\n        this.value7 = lookupValue(values, 7);\n\n        this.key8 = lookupKey(keys, 8);\n        this.value8 = lookupValue(values, 8);\n\n        this.key9 = lookupKey(keys, 9);\n        this.value9 = lookupValue(values, 9);\n\n        this.key10 = lookupKey(keys, 10);\n        this.value10 = lookupValue(values, 10);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        if (index < 6) {\n            switch (index) {\n                case 0:\n                    key0 = key;\n                    value0 = value;\n                    break;\n\n                case 1:\n                    key1 = key;\n                    value1 = value;\n                    break;\n\n                case 2:\n                    key2 = key;\n                    value2 = value;\n                    break;\n\n                case 3:\n                    key3 = key;\n                    value3 = value;\n                    break;\n\n                case 4:\n                    key4 = key;\n                    value4 = value;\n                    break;\n\n                case 5:\n                    key5 = key;\n                    value5 = value;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else {\n            switch (index) {\n                case 6:\n                    key6 = key;\n                    value6 = value;\n                    break;\n\n                case 7:\n                    key7 = key;\n                    value7 = value;\n                    break;\n\n                case 8:\n                    key8 = key;\n                    value8 = value;\n                    break;\n\n                case 9:\n                    key9 = key;\n                    value9 = value;\n                    break;\n\n                case 10:\n                    key10 = key;\n                    value10 = value;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary16(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary8.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary8(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary11(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary16.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport java.util.Arrays;\n\npublic class Dictionary16 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 16;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    String key3;\n    Object value3;\n\n    String key4;\n    Object value4;\n\n    String key5;\n    Object value5;\n\n    String key6;\n    Object value6;\n\n    String key7;\n    Object value7;\n\n    String key8;\n    Object value8;\n\n    String key9;\n    Object value9;\n\n    String key10;\n    Object value10;\n\n    String key11;\n    Object value11;\n\n    String key12;\n    Object value12;\n\n    String key13;\n    Object value13;\n\n    String key14;\n    Object value14;\n\n    String key15;\n    Object value15;\n\n    // Expand constructor\n    public Dictionary16(Dictionary11 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n\n        this.key8 = base.key8;\n        this.value8 = base.value8;\n\n        this.key9 = base.key9;\n        this.value9 = base.value9;\n\n        this.key10 = base.key10;\n        this.value10 = base.value10;\n\n        // Last key\n        this.key11 = key;\n        this.value11 = value;\n    }\n\n    // Contract constructor\n    public Dictionary16(DictionaryMax base) {\n        String[] keys = Arrays.copyOf(base.keys(), 16);\n        Object[] values = Arrays.copyOf(base.values(), 16);\n\n        this.key0 = keys[0];\n        this.value0 = values[0];\n\n        this.key1 = keys[1];\n        this.value1 = values[1];\n\n        this.key2 = keys[2];\n        this.value2 = values[2];\n\n        this.key3 = keys[3];\n        this.value3 = values[3];\n\n        this.key4 = keys[4];\n        this.value4 = values[4];\n\n        this.key5 = keys[5];\n        this.value5 = values[5];\n\n        this.key6 = keys[6];\n        this.value6 = values[6];\n\n        this.key7 = keys[7];\n        this.value7 = values[7];\n\n        this.key8 = keys[8];\n        this.value8 = values[8];\n\n        this.key9 = keys[9];\n        this.value9 = values[9];\n\n        this.key10 = keys[10];\n        this.value10 = values[10];\n\n        this.key11 = keys[11];\n        this.value11 = values[11];\n\n        this.key12 = keys[12];\n        this.value12 = values[12];\n\n        this.key13 = keys[13];\n        this.value13 = values[13];\n\n        this.key14 = keys[14];\n        this.value14 = values[14];\n\n        this.key15 = keys[15];\n        this.value15 = values[15];\n    }\n\n    // Copy constructor\n    public Dictionary16(Dictionary16 base) {\n        String[] keys = Arrays.copyOf(base.keys(), 16);\n        Object[] values = Arrays.copyOf(base.values(), 16);\n\n        this.key0 = keys[0];\n        this.value0 = values[0];\n\n        this.key1 = keys[1];\n        this.value1 = values[1];\n\n        this.key2 = keys[2];\n        this.value2 = values[2];\n\n        this.key3 = keys[3];\n        this.value3 = values[3];\n\n        this.key4 = keys[4];\n        this.value4 = values[4];\n\n        this.key5 = keys[5];\n        this.value5 = values[5];\n\n        this.key6 = keys[6];\n        this.value6 = values[6];\n\n        this.key7 = keys[7];\n        this.value7 = values[7];\n\n        this.key8 = keys[8];\n        this.value8 = values[8];\n\n        this.key9 = keys[9];\n        this.value9 = values[9];\n\n        this.key10 = keys[10];\n        this.value10 = values[10];\n\n        this.key11 = keys[11];\n        this.value11 = values[11];\n\n        this.key12 = keys[12];\n        this.value12 = values[12];\n\n        this.key13 = keys[13];\n        this.value13 = values[13];\n\n        this.key14 = keys[14];\n        this.value14 = values[14];\n\n        this.key15 = keys[15];\n        this.value15 = values[15];\n    }\n\n    // FromMap constructor\n    public Dictionary16(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n\n        this.key3 = lookupKey(keys, 3);\n        this.value3 = lookupValue(values, 3);\n\n        this.key4 = lookupKey(keys, 4);\n        this.value4 = lookupValue(values, 4);\n\n        this.key5 = lookupKey(keys, 5);\n        this.value5 = lookupValue(values, 5);\n\n        this.key6 = lookupKey(keys, 6);\n        this.value6 = lookupValue(values, 6);\n\n        this.key7 = lookupKey(keys, 7);\n        this.value7 = lookupValue(values, 7);\n\n        this.key8 = lookupKey(keys, 8);\n        this.value8 = lookupValue(values, 8);\n\n        this.key9 = lookupKey(keys, 9);\n        this.value9 = lookupValue(values, 9);\n\n        this.key10 = lookupKey(keys, 10);\n        this.value10 = lookupValue(values, 10);\n\n        this.key11 = lookupKey(keys, 11);\n        this.value11 = lookupValue(values, 11);\n\n        this.key12 = lookupKey(keys, 12);\n        this.value12 = lookupValue(values, 12);\n\n        this.key13 = lookupKey(keys, 13);\n        this.value13 = lookupValue(values, 13);\n\n        this.key14 = lookupKey(keys, 14);\n        this.value14 = lookupValue(values, 14);\n\n        this.key15 = lookupKey(keys, 15);\n        this.value15 = lookupValue(values, 15);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {\n            key0, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15\n        };\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {\n            value0, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12,\n            value13, value14, value15\n        };\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        if (index < 4) {\n            switch (index) {\n                case 0:\n                    key0 = key;\n                    value0 = value;\n                    break;\n\n                case 1:\n                    key1 = key;\n                    value1 = value;\n                    break;\n\n                case 2:\n                    key2 = key;\n                    value2 = value;\n                    break;\n\n                case 3:\n                    key3 = key;\n                    value3 = value;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else if (index < 8) {\n            switch (index) {\n                case 4:\n                    key4 = key;\n                    value4 = value;\n                    break;\n\n                case 5:\n                    key5 = key;\n                    value5 = value;\n                    break;\n\n                case 6:\n                    key6 = key;\n                    value6 = value;\n                    break;\n\n                case 7:\n                    key7 = key;\n                    value7 = value;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else if (index < 12) {\n            switch (index) {\n                case 8:\n                    key8 = key;\n                    value8 = value;\n                    break;\n\n                case 9:\n                    key9 = key;\n                    value9 = value;\n                    break;\n\n                case 10:\n                    key10 = key;\n                    value10 = value;\n                    break;\n\n                case 11:\n                    key11 = key;\n                    value11 = value;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else {\n            switch (index) {\n                case 12:\n                    key12 = key;\n                    value12 = value;\n                    break;\n\n                case 13:\n                    key13 = key;\n                    value13 = value;\n                    break;\n\n                case 14:\n                    key14 = key;\n                    value14 = value;\n                    break;\n\n                case 15:\n                    key15 = key;\n                    value15 = value;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new DictionaryMax(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary11.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary11(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary16(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary2.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary2 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 2;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    // Expand constructor\n    public Dictionary2(Dictionary1 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        // Last key\n        this.key1 = key;\n        this.value1 = value;\n    }\n\n    // Contract constructor\n    public Dictionary2(Dictionary3 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n    }\n\n    // Copy constructor\n    public Dictionary2(Dictionary2 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n    }\n\n    // FromMap constructor\n    public Dictionary2(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        switch (index) {\n            case 0:\n                key0 = key;\n                value0 = value;\n                break;\n\n            case 1:\n                key1 = key;\n                value1 = value;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary3(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary1.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary1(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary2(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary3.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary3 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 3;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    // Expand constructor\n    public Dictionary3(Dictionary2 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        // Last key\n        this.key2 = key;\n        this.value2 = value;\n    }\n\n    // Contract constructor\n    public Dictionary3(Dictionary4 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n    }\n\n    // Copy constructor\n    public Dictionary3(Dictionary3 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n    }\n\n    // FromMap constructor\n    public Dictionary3(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1, key2};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1, value2};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        switch (index) {\n            case 0:\n                key0 = key;\n                value0 = value;\n                break;\n\n            case 1:\n                key1 = key;\n                value1 = value;\n                break;\n\n            case 2:\n                key2 = key;\n                value2 = value;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary4(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary2.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary2(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary3(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary4.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary4 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 4;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    String key3;\n    Object value3;\n\n    // Expand constructor\n    public Dictionary4(Dictionary3 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        // Last key\n        this.key3 = key;\n        this.value3 = value;\n    }\n\n    // Contract constructor\n    public Dictionary4(Dictionary6 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n    }\n\n    // Copy constructor\n    public Dictionary4(Dictionary4 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n    }\n\n    // FromMap constructor\n    public Dictionary4(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n\n        this.key3 = lookupKey(keys, 3);\n        this.value3 = lookupValue(values, 3);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1, key2, key3};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1, value2, value3};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        switch (index) {\n            case 0:\n                key0 = key;\n                value0 = value;\n                break;\n\n            case 1:\n                key1 = key;\n                value1 = value;\n                break;\n\n            case 2:\n                key2 = key;\n                value2 = value;\n                break;\n\n            case 3:\n                key3 = key;\n                value3 = value;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary6(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary3.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary3(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary4(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary6.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary6 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 6;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    String key3;\n    Object value3;\n\n    String key4;\n    Object value4;\n\n    String key5;\n    Object value5;\n\n    // Expand constructor\n    public Dictionary6(Dictionary4 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        // Last key\n        this.key4 = key;\n        this.value4 = value;\n    }\n\n    // Contract constructor\n    public Dictionary6(Dictionary8 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n    }\n\n    // Copy constructor\n    public Dictionary6(Dictionary6 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n    }\n\n    // FromMap constructor\n    public Dictionary6(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n\n        this.key3 = lookupKey(keys, 3);\n        this.value3 = lookupValue(values, 3);\n\n        this.key4 = lookupKey(keys, 4);\n        this.value4 = lookupValue(values, 4);\n\n        this.key5 = lookupKey(keys, 5);\n        this.value5 = lookupValue(values, 5);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1, key2, key3, key4, key5};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1, value2, value3, value4, value5};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        switch (index) {\n            case 0:\n                key0 = key;\n                value0 = value;\n                break;\n\n            case 1:\n                key1 = key;\n                value1 = value;\n                break;\n\n            case 2:\n                key2 = key;\n                value2 = value;\n                break;\n\n            case 3:\n                key3 = key;\n                value3 = value;\n                break;\n\n            case 4:\n                key4 = key;\n                value4 = value;\n                break;\n\n            case 5:\n                key5 = key;\n                value5 = value;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary8(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary4.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary4(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary6(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/Dictionary8.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\npublic class Dictionary8 extends PrimitiveDictionary implements Dictionary {\n    public static final int CAPACITY = 8;\n\n    String key0;\n    Object value0;\n\n    String key1;\n    Object value1;\n\n    String key2;\n    Object value2;\n\n    String key3;\n    Object value3;\n\n    String key4;\n    Object value4;\n\n    String key5;\n    Object value5;\n\n    String key6;\n    Object value6;\n\n    String key7;\n    Object value7;\n\n    // Expand constructor\n    public Dictionary8(Dictionary6 base, String key, Object value) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        // Last key\n        this.key6 = key;\n        this.value6 = value;\n    }\n\n    // Contract constructor\n    public Dictionary8(Dictionary11 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n    }\n\n    // Copy constructor\n    public Dictionary8(Dictionary8 base) {\n        this.key0 = base.key0;\n        this.value0 = base.value0;\n\n        this.key1 = base.key1;\n        this.value1 = base.value1;\n\n        this.key2 = base.key2;\n        this.value2 = base.value2;\n\n        this.key3 = base.key3;\n        this.value3 = base.value3;\n\n        this.key4 = base.key4;\n        this.value4 = base.value4;\n\n        this.key5 = base.key5;\n        this.value5 = base.value5;\n\n        this.key6 = base.key6;\n        this.value6 = base.value6;\n\n        this.key7 = base.key7;\n        this.value7 = base.value7;\n    }\n\n    // FromMap constructor\n    public Dictionary8(String[] keys, Object[] values) {\n        this.key0 = lookupKey(keys, 0);\n        this.value0 = lookupValue(values, 0);\n\n        this.key1 = lookupKey(keys, 1);\n        this.value1 = lookupValue(values, 1);\n\n        this.key2 = lookupKey(keys, 2);\n        this.value2 = lookupValue(values, 2);\n\n        this.key3 = lookupKey(keys, 3);\n        this.value3 = lookupValue(values, 3);\n\n        this.key4 = lookupKey(keys, 4);\n        this.value4 = lookupValue(values, 4);\n\n        this.key5 = lookupKey(keys, 5);\n        this.value5 = lookupValue(values, 5);\n\n        this.key6 = lookupKey(keys, 6);\n        this.value6 = lookupValue(values, 6);\n\n        this.key7 = lookupKey(keys, 7);\n        this.value7 = lookupValue(values, 7);\n    }\n\n    @Override\n    String[] keys() {\n        return new String[] {key0, key1, key2, key3, key4, key5, key6, key7};\n    }\n\n    @Override\n    Object[] values() {\n        return new Object[] {value0, value1, value2, value3, value4, value5, value6, value7};\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        if (index < 4) {\n            switch (index) {\n                case 0:\n                    key0 = key;\n                    value0 = value;\n                    break;\n\n                case 1:\n                    key1 = key;\n                    value1 = value;\n                    break;\n\n                case 2:\n                    key2 = key;\n                    value2 = value;\n                    break;\n\n                case 3:\n                    key3 = key;\n                    value3 = value;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else {\n            switch (index) {\n                case 4:\n                    key4 = key;\n                    value4 = value;\n                    break;\n\n                case 5:\n                    key5 = key;\n                    value5 = value;\n                    break;\n\n                case 6:\n                    key6 = key;\n                    value6 = value;\n                    break;\n\n                case 7:\n                    key7 = key;\n                    value7 = value;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        }\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        return new Dictionary11(this, key, value);\n    }\n\n    @Override\n    int contractThreshold() {\n        return Dictionary6.CAPACITY;\n    }\n\n    @Override\n    Dictionary contract() {\n        return new Dictionary6(this);\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new Dictionary8(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/DictionaryFactory.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport java.util.Map;\n\npublic class DictionaryFactory {\n    public static Dictionary fromMap(Map<String, Object> properties) {\n        if (properties == null) {\n            return null;\n        }\n\n        int size = properties.size();\n        String[] keys = new String[size];\n        Object[] values = new Object[size];\n\n        int counter = 0;\n        for (Map.Entry<String, Object> entry : properties.entrySet()) {\n            keys[counter] = entry.getKey();\n            values[counter] = entry.getValue();\n            counter++;\n        }\n\n        // assert counter == size;\n\n        if (size == 0) {\n            return null;\n        } else if (size <= 1) {\n            return new Dictionary1(keys[0], values[0]);\n        } else if (size <= 2) {\n            return new Dictionary2(keys, values);\n        } else if (size <= 3) {\n            return new Dictionary3(keys, values);\n        } else if (size <= 4) {\n            return new Dictionary4(keys, values);\n        } else if (size <= 6) {\n            return new Dictionary6(keys, values);\n        } else if (size <= 8) {\n            return new Dictionary8(keys, values);\n        } else if (size <= 11) {\n            return new Dictionary11(keys, values);\n        } else if (size <= 16) {\n            return new Dictionary16(keys, values);\n        } else {\n            return new DictionaryMax(keys, values);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/DictionaryMax.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport java.util.Arrays;\n\npublic class DictionaryMax extends PrimitiveDictionary implements Dictionary {\n    int capacity;\n    String[] keys;\n    Object[] values;\n\n    // Expand constructor\n    public DictionaryMax(Dictionary16 base, String key, Object value) {\n        this.capacity = 24;\n        keys = Arrays.copyOf(base.keys(), capacity);\n        values = Arrays.copyOf(base.values(), capacity);\n\n        keys[16] = key;\n        values[16] = value;\n    }\n\n    // Copy constructor\n    public DictionaryMax(DictionaryMax base) {\n        this.capacity = base.capacity;\n        keys = Arrays.copyOf(base.keys(), capacity);\n        values = Arrays.copyOf(base.values(), capacity);\n    }\n\n    // FromMap constructor\n    public DictionaryMax(String[] keys, Object[] values) {\n        this.capacity = Math.max(24, keys.length + keys.length / 2);\n\n        this.keys = Arrays.copyOf(keys, capacity);\n        this.values = Arrays.copyOf(values, capacity);\n    }\n\n    @Override\n    String[] keys() {\n        return keys;\n    }\n\n    @Override\n    Object[] values() {\n        return values;\n    }\n\n    @Override\n    void write(int index, String key, Object value) {\n        keys[index] = key;\n        values[index] = value;\n    }\n\n    @Override\n    Dictionary expand(String key, Object value) {\n        int newCapacity = capacity + (capacity / 2);\n        keys = Arrays.copyOf(keys, newCapacity);\n        values = Arrays.copyOf(values, newCapacity);\n\n        keys[capacity] = key;\n        values[capacity] = value;\n\n        this.capacity = newCapacity;\n\n        return this;\n    }\n\n    @Override\n    int contractThreshold() {\n        return capacity / 2;\n    }\n\n    @Override\n    Dictionary contract() {\n        if (capacity < 14) {\n            // Move to Dictionary16\n            return new Dictionary16(this);\n        } else {\n            int newCapacity = capacity * 3 / 4;\n            keys = Arrays.copyOf(keys, newCapacity);\n            values = Arrays.copyOf(values, newCapacity);\n            this.capacity = newCapacity;\n\n            return this;\n        }\n    }\n\n    @Override\n    public Dictionary copyOf() {\n        return new DictionaryMax(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/dict/PrimitiveDictionary.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport com.lambdazen.bitsy.store.IStringCanonicalizer;\nimport java.util.Arrays;\n\npublic abstract class PrimitiveDictionary implements Dictionary {\n    public PrimitiveDictionary() {\n        // Nothing to do\n    }\n\n    abstract String[] keys();\n\n    abstract Object[] values();\n\n    abstract void write(int index, String key, Object value);\n\n    abstract Dictionary expand(String key, Object value);\n\n    abstract int contractThreshold();\n\n    abstract Dictionary contract();\n\n    public abstract Dictionary copyOf();\n\n    public int size() {\n        String[] keys = keys();\n\n        int i;\n        for (i = 0; i < keys.length; i++) {\n            if (keys[i] == null) {\n                break;\n            }\n        }\n\n        return i;\n    }\n\n    public String[] getPropertyKeys() {\n        String[] keys = keys();\n\n        int i;\n        for (i = 0; i < keys.length; i++) {\n            if (keys[i] == null) {\n                break;\n            }\n        }\n\n        return Arrays.copyOf(keys, i);\n    }\n\n    @Override\n    public Object getProperty(String key) {\n        String[] keys = keys();\n        Object[] values = values();\n\n        for (int i = 0; i < keys.length; i++) {\n            String curKey = keys[i];\n\n            if (curKey == null) {\n                // End of keys\n                return null;\n            } else if (curKey.equals(key)) {\n                return values[i];\n            }\n        }\n\n        return null;\n    }\n\n    @Override\n    public Dictionary setProperty(String key, Object value) {\n        String[] keys = keys();\n        Object[] values = values();\n\n        boolean overwroteValue = false;\n        int i;\n        for (i = 0; i < keys.length; i++) {\n            String curKey = keys[i];\n\n            if (curKey == null) {\n                // End of keys\n                break;\n            } else if (keys[i].equals(key)) {\n                values[i] = value;\n                write(i, keys[i], value);\n                overwroteValue = true;\n            }\n        }\n\n        if (overwroteValue) {\n            // Stick with this\n            return this;\n        } else {\n            if (i == keys.length) {\n                // Reached end, need to move up\n                return expand(key, value);\n            } else {\n                // Not yet at the end\n                write(i, key, value);\n\n                return this;\n            }\n        }\n    }\n\n    @Override\n    public void canonicalizeKeys(IStringCanonicalizer canonicalizer) {\n        String[] keys = keys();\n        Object[] values = null;\n\n        int i = 0;\n        for (i = 0; i < keys.length; i++) {\n            String origKey = keys[i];\n            String newKey = canonicalizer.canonicalize(origKey);\n\n            // Avoid step if already canonical\n            if (newKey != origKey) {\n                if (values == null) {\n                    // Don't generate values unless required\n                    values = values();\n                }\n\n                write(i, newKey, values[i]);\n            }\n\n            i++;\n        }\n    }\n\n    @Override\n    public Dictionary removeProperty(String key) {\n        String[] keys = keys();\n        Object[] values = values();\n\n        int overwritePos = -1;\n        int i;\n        for (i = 0; i < keys.length; i++) {\n            String curKey = keys[i];\n\n            if (curKey == null) {\n                // End of keys\n                break;\n            } else if (keys[i].equals(key)) {\n                overwritePos = i;\n            }\n        }\n\n        if (overwritePos == -1) {\n            // Couldn't find key\n            return this;\n        } else {\n            // Overwrite from end to here\n            int lastIdx = i - 1;\n            if (overwritePos != lastIdx) {\n                write(overwritePos, keys[lastIdx], values[lastIdx]);\n            }\n            write(lastIdx, null, null);\n\n            if (lastIdx <= contractThreshold()) {\n                // The new size is at or below the contract threshold\n                return contract();\n            } else {\n                return this;\n            }\n        }\n    }\n\n    protected String lookupKey(String[] keys, int i) {\n        return (i < keys.length) ? keys[i] : null;\n    }\n\n    protected Object lookupValue(Object[] values, int i) {\n        return (i < values.length) ? values[i] : null;\n    }\n\n    public String toString() {\n        StringBuilder ans = new StringBuilder(\"PrimitiveDictionary(size = \" + size());\n        for (String key : getPropertyKeys()) {\n            ans.append(\", \" + key + \": \" + getProperty(key));\n        }\n        ans.append(\")\");\n        return ans.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/ArraySet.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\nimport java.util.Arrays;\n\n/**\n * This class uses an array-based set implementation rather than SetMax and\n * CompactMultiSetMax classes that implement a hash-based set. Neither\n * implementation throws ConcurrentModificationException on reads, but expect\n * writes to be serialized.\n */\npublic class ArraySet<T> implements Set<T> {\n    int size;\n    Object[] elements;\n\n    public ArraySet(Object[] elements) {\n        this(elements, elements.length);\n    }\n\n    protected ArraySet(Object[] elements, int size) {\n        this.size = size;\n        this.elements = new Object[size + size / 2];\n\n        for (int i = 0; i < size; i++) {\n            this.elements[i] = (T) elements[i];\n        }\n    }\n\n    @Override\n    public int size() {\n        return size;\n    }\n\n    @Override\n    public Object[] getElements() {\n        return Arrays.copyOf(elements, size);\n    }\n\n    @Override\n    public Object removeElement(T elem) {\n        // Go over elements and remove the one\n        for (int i = 0; i < size; i++) {\n            if (elem.equals(elements[i])) {\n                if (i < size - 1) {\n                    elements[i] = elements[size - 1];\n                }\n\n                this.size--;\n                elements[size] = null;\n\n                break;\n            }\n        }\n\n        if (size < 16) {\n            return new Set24<T>(getElements());\n        } else if (size < elements.length / 2) {\n            // Using the constructor that cuts the size -- to avoid two array creations\n            return new ArraySet<T>(elements, size);\n        } else {\n            // Use the same object\n            return this;\n        }\n    }\n\n    @Override\n    public Set<T> addElement(T elem) {\n        for (int i = 0; i < size; i++) {\n            if (elem.equals(elements[i])) {\n                // Nothing to do\n                return this;\n            }\n        }\n\n        if (size < elements.length) {\n            elements[size] = elem;\n            this.size++;\n            return this;\n        } else {\n            Set<T> ans = new ArraySet<T>(elements);\n            ans.addElement(elem);\n            return ans;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/ClassifierGetter.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic interface ClassifierGetter<C, T> {\n    public C getClassifier(T obj);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/CompactMultiSetMax.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * The compact multi-set takes an element and a classifier on that element. It\n * supports a get that takes the classifier and returns the matches. This class\n * is NOT thread-safe, but can support multiple readers as long as there is only\n * one writer.\n *\n * This class is used for two purposes. The first is to store adjacency lists by\n * label. The classifier picks up the label from the Edge. The second purpose is\n * to provide SetMax with a thread-safe HashSet implementation.\n */\npublic class CompactMultiSetMax<C, T> {\n    public static final int MIN_TO_RESIZE = 8;\n\n    int occupied = 0;\n    boolean safe;\n    Object[] elements;\n\n    public CompactMultiSetMax(int initSize, boolean safe) {\n        this.elements = new Object[initSize];\n        this.occupied = 0;\n        this.safe = safe;\n    }\n\n    public int getOccupiedCells() {\n        return this.occupied;\n    }\n\n    public CompactMultiSetMax<C, T> add(T obj, ClassifierGetter<C, T> c) {\n        Object classifier = c.getClassifier(obj);\n\n        addElementNoRehash(classifier.hashCode(), obj);\n\n        int len = elements.length;\n        if (occupied >= len - (len / 4)) { // 0.75 load factor\n            return rehash(len * 2, c);\n        } else {\n            return this;\n        }\n    }\n\n    protected void addElementNoRehash(int hashCode, T obj) {\n        int index = (hashCode & 0x7FFFFFFF) % elements.length;\n\n        if (elements[index] == null) {\n            occupied++;\n        }\n\n        if (safe) {\n            elements[index] = CompactSet.<T>addSafe(elements[index], obj);\n        } else {\n            elements[index] = CompactSet.<T>add(elements[index], obj);\n        }\n    }\n\n    private CompactMultiSetMax<C, T> rehash(int newLength, ClassifierGetter<C, T> c) {\n        CompactMultiSetMax<C, T> ans = new CompactMultiSetMax<C, T>(newLength, safe); // use the same safe boolean\n\n        for (Object elem : elements) {\n            for (Object item : CompactSet.getElements(elem)) {\n                Object classifier = c.getClassifier((T) item);\n                ans.addElementNoRehash(classifier.hashCode(), (T) item);\n            }\n        }\n\n        return ans;\n    }\n\n    public CompactMultiSetMax<C, T> remove(T obj, ClassifierGetter<C, T> c) {\n        Object classifier = c.getClassifier(obj);\n\n        removeElementNoHash(classifier.hashCode(), obj);\n\n        int len = elements.length;\n        if ((occupied > MIN_TO_RESIZE) && (occupied < len / 2)) {\n            return rehash(len / 2, c);\n        } else {\n            return this;\n        }\n    }\n\n    protected void removeElementNoHash(int hashCode, T obj) {\n        int index = (hashCode & 0x7FFFFFFF) % elements.length;\n\n        Object oldVal = elements[index];\n        if (oldVal == null) {\n            return;\n        } else {\n            Object newVal = CompactSet.<T>remove(oldVal, obj);\n            elements[index] = newVal;\n            if (newVal == null) {\n                occupied--;\n            }\n        }\n    }\n\n    /*\n     * Returns a CompactSet-compatible object with the given classifier. Note that\n     * extra elements could be returned -- hence \"super set\". It is the\n     * responsibility of the caller to weed these out\n     */\n    public Object[] getSuperSetWithClassifier(C key) {\n        if (key == null) {\n            return getAllElements();\n        } else {\n            int index = (key.hashCode() & 0x7FFFFFFF) % elements.length;\n\n            return CompactSet.getElements(elements[index]);\n        }\n    }\n\n    public Object[] getAllElements() {\n        List<Object> ans = new ArrayList<Object>();\n\n        for (int i = 0; i < elements.length; i++) {\n            Object elem = elements[i];\n\n            for (Object item : CompactSet.getElements(elem)) {\n                if (item != null) {\n                    // This check is needed because item could be null when\n                    // dealing with lock-free reads that occur during a write.\n                    // The system will retry the read based on the sequence\n                    // number -- the important thing is to\n                    // not throw an exception\n                    ans.add(item);\n                }\n            }\n        }\n\n        return ans.toArray();\n    }\n\n    // This method goes over the elements to see if this compact set can be fit inside a Set24\n    public boolean sizeBiggerThan24() {\n        int currentSize = 0;\n        for (int i = 0; i < elements.length; i++) {\n            Object elem = elements[i];\n            if (elem == null) {\n                // Empty cell\n                continue;\n            } else if (elem instanceof ArraySet) {\n                // Don't reorg till the ArraySet reduces to Set24\n                return true;\n            } else if (elem instanceof SetMax) {\n                // Don't reorg till the SetMax reduces to Set24\n                return true;\n            } else {\n                currentSize += CompactSet.size(elem);\n            }\n\n            if (currentSize > 24) {\n                return true;\n            }\n        }\n\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/CompactSet.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class CompactSet {\n    public static int size(Object set) {\n        if (set == null) {\n            return 0;\n        } else if (set instanceof Set) {\n            return ((Set) set).size();\n        } else {\n            return 1;\n        }\n    }\n\n    public static Object[] getElements(Object set) {\n        if (set == null) {\n            return new Object[0];\n        } else if (set instanceof Set) {\n            return ((Set<?>) set).getElements();\n        } else {\n            return new Object[] {set};\n        }\n    }\n\n    public static <T> Object add(Object set, T elem) {\n        if (set == null) {\n            return elem;\n        } else if (set instanceof Set) {\n            return ((Set) set).addElement(elem);\n        } else {\n            if (set.equals(elem)) {\n                return set;\n            } else {\n                return new Set2(set, elem);\n            }\n        }\n    }\n\n    public static <T> Object addSafe(Object set, T elem) {\n        if ((set instanceof Set24) && (CompactSet.size(set) == 24)) {\n            // Move to ArraySet instead of SetMax to avoid cyclic dependency from CompactMultiSetMax and SetMax\n            set = new ArraySet<T>(CompactSet.getElements(set));\n        }\n\n        return CompactSet.<T>add(set, elem);\n    }\n\n    public static <T> Object remove(Object set, T elem) {\n        if (set == null) {\n            return null;\n        } else if (set instanceof Set) {\n            return ((Set) set).removeElement(elem);\n        } else {\n            if ((set == elem) || (set.equals(elem))) {\n                return null;\n            } else {\n                return set;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/PrimitiveSet.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\nimport java.util.Arrays;\n\npublic abstract class PrimitiveSet<T> implements Set<T> {\n    public PrimitiveSet() {\n        // Nothing to do\n    }\n\n    abstract Object[] elements();\n\n    abstract void write(int index, T elem);\n\n    abstract Set<T> expand(T elem);\n\n    abstract int contractThreshold();\n\n    abstract Object contract();\n\n    public int size() {\n        Object[] elems = elements();\n\n        return size(elems);\n    }\n\n    private int size(Object[] elems) {\n        int i;\n        for (i = 0; i < elems.length; i++) {\n            if (elems[i] == null) {\n                break;\n            }\n        }\n\n        return i;\n    }\n\n    public Object[] getElements() {\n        Object[] elems = elements();\n\n        int i;\n        for (i = 0; i < elems.length; i++) {\n            if (elems[i] == null) {\n                break;\n            }\n        }\n\n        return Arrays.copyOf(elems, i);\n    }\n\n    public Set<T> addElement(T elem) {\n        Object[] elems = elements();\n        int size = elems.length;\n\n        boolean duplicate = false;\n        int i;\n        for (i = 0; i < size; i++) {\n            T curElem = (T) elems[i];\n\n            if (curElem == null) {\n                // End of keys\n                break;\n            } else if (elems[i].equals(elem)) {\n                duplicate = true;\n            }\n        }\n\n        if (duplicate) {\n            // Stick with this\n            return this;\n        } else {\n            if (i == size) {\n                // Reached end, need to move up\n                return expand(elem);\n            } else {\n                // Not yet at the end\n                write(i, elem);\n\n                return this;\n            }\n        }\n    }\n\n    @Override\n    public Object removeElement(T elem) {\n        Object[] elems = elements();\n        int size = elems.length;\n\n        int overwritePos = -1;\n        int i;\n        for (i = 0; i < size; i++) {\n            Object curElem = elems[i];\n\n            if (curElem == null) {\n                // End of keys\n                break;\n            } else if (curElem.equals(elem)) {\n                overwritePos = i;\n            }\n        }\n\n        if (overwritePos == -1) {\n            // Couldn't find key\n            return this;\n        } else {\n            // Overwrite from end to here\n            int lastIdx = i - 1;\n            if (overwritePos != lastIdx) {\n                write(overwritePos, (T) elems[lastIdx]);\n            }\n            write(lastIdx, null);\n\n            if (lastIdx <= contractThreshold()) {\n                // The new size is at or below the contract threshold\n                return contract();\n            } else {\n                return this;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\n/** A bag keeps an unordered, unstable collection of elements */\npublic interface Set<T> {\n    public int size();\n\n    public Object[] getElements();\n\n    public Object removeElement(T elem);\n\n    public Set<T> addElement(T elem);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set12.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set12<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1, elem2, elem3, elem4, elem5, elem6, elem7, elem8, elem9, elem10, elem11;\n\n    public Set12(Set8<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n        this.elem6 = oldSet.elem6;\n        this.elem7 = oldSet.elem7;\n        this.elem8 = elem;\n    }\n\n    public Set12(Set24<T> oldSet) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n        this.elem6 = oldSet.elem6;\n        this.elem7 = oldSet.elem7;\n        this.elem8 = oldSet.elem8;\n        this.elem9 = oldSet.elem9;\n        this.elem10 = oldSet.elem10;\n        this.elem11 = oldSet.elem11;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1, elem2, elem3, elem4, elem5, elem6, elem7, elem8, elem9, elem10, elem11};\n    }\n\n    protected void write(int index, T elem) {\n        if (index < 4) {\n            switch (index) {\n                case 0:\n                    this.elem0 = elem;\n                    break;\n\n                case 1:\n                    this.elem1 = elem;\n                    break;\n\n                case 2:\n                    this.elem2 = elem;\n                    break;\n\n                case 3:\n                    this.elem3 = elem;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else if (index < 8) {\n            switch (index) {\n                case 4:\n                    this.elem4 = elem;\n                    break;\n\n                case 5:\n                    this.elem5 = elem;\n                    break;\n\n                case 6:\n                    this.elem6 = elem;\n                    break;\n\n                case 7:\n                    this.elem7 = elem;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        } else {\n            switch (index) {\n                case 8:\n                    this.elem8 = elem;\n                    break;\n\n                case 9:\n                    this.elem9 = elem;\n                    break;\n\n                case 10:\n                    this.elem10 = elem;\n                    break;\n\n                case 11:\n                    this.elem11 = elem;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set24<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 8;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set8<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set2.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set2<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1;\n\n    public Set2(T elem0, T elem1) {\n        this.elem0 = elem0;\n        this.elem1 = elem1;\n    }\n\n    public Set2(Set3<T> oldBag) {\n        this.elem0 = oldBag.elem0;\n        this.elem1 = oldBag.elem1;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1};\n    }\n\n    protected void write(int index, T elem) {\n        switch (index) {\n            case 0:\n                elem0 = elem;\n                break;\n\n            case 1:\n                elem1 = elem;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set3<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 1;\n    }\n\n    @Override\n    Object contract() {\n        return this.elem0;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set24.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set24<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0,\n            elem1,\n            elem2,\n            elem3,\n            elem4,\n            elem5,\n            elem6,\n            elem7,\n            elem8,\n            elem9,\n            elem10,\n            elem11,\n            elem12,\n            elem13,\n            elem14,\n            elem15,\n            elem16,\n            elem17,\n            elem18,\n            elem19,\n            elem20,\n            elem21,\n            elem22,\n            elem23;\n\n    public Set24(Set12<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n        this.elem6 = oldSet.elem6;\n        this.elem7 = oldSet.elem7;\n        this.elem8 = oldSet.elem8;\n        this.elem9 = oldSet.elem9;\n        this.elem10 = oldSet.elem10;\n        this.elem11 = oldSet.elem11;\n        this.elem12 = elem;\n    }\n\n    public Set24(Object[] elements) {\n        this.elem0 = lookup(elements, 0);\n        this.elem1 = lookup(elements, 1);\n        this.elem2 = lookup(elements, 2);\n        this.elem3 = lookup(elements, 3);\n        this.elem4 = lookup(elements, 4);\n        this.elem5 = lookup(elements, 5);\n        this.elem6 = lookup(elements, 6);\n        this.elem7 = lookup(elements, 7);\n        this.elem8 = lookup(elements, 8);\n        this.elem9 = lookup(elements, 9);\n        this.elem10 = lookup(elements, 10);\n        this.elem11 = lookup(elements, 11);\n        this.elem12 = lookup(elements, 12);\n        this.elem13 = lookup(elements, 13);\n        this.elem14 = lookup(elements, 14);\n        this.elem15 = lookup(elements, 15);\n        this.elem16 = lookup(elements, 16);\n        this.elem17 = lookup(elements, 17);\n        this.elem18 = lookup(elements, 18);\n        this.elem19 = lookup(elements, 19);\n        this.elem20 = lookup(elements, 20);\n        this.elem21 = lookup(elements, 21);\n        this.elem22 = lookup(elements, 22);\n        this.elem23 = lookup(elements, 23);\n    }\n\n    private T lookup(Object[] arr, int index) {\n        return (index < arr.length) ? (T) arr[index] : null;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {\n            elem0, elem1, elem2, elem3, elem4, elem5, elem6, elem7, elem8, elem9, elem10, elem11, elem12, elem13,\n            elem14, elem15, elem16, elem17, elem18, elem19, elem20, elem21, elem22, elem23\n        };\n    }\n\n    protected void write(int index, T elem) {\n        if (index < 12) {\n            if (index < 4) {\n                switch (index) {\n                    case 0:\n                        this.elem0 = elem;\n                        break;\n\n                    case 1:\n                        this.elem1 = elem;\n                        break;\n\n                    case 2:\n                        this.elem2 = elem;\n                        break;\n\n                    case 3:\n                        this.elem3 = elem;\n                        break;\n\n                    default:\n                        throw new RuntimeException(\"Bug in code\");\n                }\n            } else if (index < 8) {\n                switch (index) {\n                    case 4:\n                        this.elem4 = elem;\n                        break;\n\n                    case 5:\n                        this.elem5 = elem;\n                        break;\n\n                    case 6:\n                        this.elem6 = elem;\n                        break;\n\n                    case 7:\n                        this.elem7 = elem;\n                        break;\n\n                    default:\n                        throw new IllegalArgumentException(\"Invalid index \" + index);\n                }\n            } else {\n                switch (index) {\n                    case 8:\n                        this.elem8 = elem;\n                        break;\n\n                    case 9:\n                        this.elem9 = elem;\n                        break;\n\n                    case 10:\n                        this.elem10 = elem;\n                        break;\n\n                    case 11:\n                        this.elem11 = elem;\n                        break;\n\n                    default:\n                        throw new IllegalArgumentException(\"Invalid index \" + index);\n                }\n            }\n        } else {\n            if (index < 16) {\n                switch (index) {\n                    case 12:\n                        this.elem12 = elem;\n                        break;\n\n                    case 13:\n                        this.elem13 = elem;\n                        break;\n\n                    case 14:\n                        this.elem14 = elem;\n                        break;\n\n                    case 15:\n                        this.elem15 = elem;\n                        break;\n\n                    default:\n                        throw new RuntimeException(\"Bug in code\");\n                }\n            } else if (index < 20) {\n                switch (index) {\n                    case 16:\n                        this.elem16 = elem;\n                        break;\n\n                    case 17:\n                        this.elem17 = elem;\n                        break;\n\n                    case 18:\n                        this.elem18 = elem;\n                        break;\n\n                    case 19:\n                        this.elem19 = elem;\n                        break;\n\n                    default:\n                        throw new IllegalArgumentException(\"Invalid index \" + index);\n                }\n            } else {\n                switch (index) {\n                    case 20:\n                        this.elem20 = elem;\n                        break;\n\n                    case 21:\n                        this.elem21 = elem;\n                        break;\n\n                    case 22:\n                        this.elem22 = elem;\n                        break;\n\n                    case 23:\n                        this.elem23 = elem;\n                        break;\n\n                    default:\n                        throw new IllegalArgumentException(\"Invalid index \" + index);\n                }\n            }\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new SetMax<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 12;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set12<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set3.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set3<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1, elem2;\n\n    public Set3(Set2<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = elem;\n    }\n\n    public Set3(Set4<T> oldSet) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1, elem2};\n    }\n\n    protected void write(int index, T elem) {\n        switch (index) {\n            case 0:\n                elem0 = elem;\n                break;\n\n            case 1:\n                elem1 = elem;\n                break;\n\n            case 2:\n                elem2 = elem;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set4<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 2;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set2<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set4.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set4<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1, elem2, elem3;\n\n    public Set4(Set3<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = elem;\n    }\n\n    public Set4(Set6<T> oldSet) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1, elem2, elem3};\n    }\n\n    protected void write(int index, T elem) {\n        switch (index) {\n            case 0:\n                elem0 = elem;\n                break;\n\n            case 1:\n                elem1 = elem;\n                break;\n\n            case 2:\n                elem2 = elem;\n                break;\n\n            case 3:\n                elem3 = elem;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set6<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 3;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set3<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set6.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set6<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1, elem2, elem3, elem4, elem5;\n\n    public Set6(Set4<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = elem;\n    }\n\n    public Set6(Set8<T> oldSet) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1, elem2, elem3, elem4, elem5};\n    }\n\n    protected void write(int index, T elem) {\n        switch (index) {\n            case 0:\n                elem0 = elem;\n                break;\n\n            case 1:\n                elem1 = elem;\n                break;\n\n            case 2:\n                elem2 = elem;\n                break;\n\n            case 3:\n                elem3 = elem;\n                break;\n\n            case 4:\n                elem4 = elem;\n                break;\n\n            case 5:\n                elem5 = elem;\n                break;\n\n            default:\n                throw new IllegalArgumentException(\"Invalid index \" + index);\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set8<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 4;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set4<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/Set8.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class Set8<T> extends PrimitiveSet<T> implements Set<T> {\n    T elem0, elem1, elem2, elem3, elem4, elem5, elem6, elem7;\n\n    public Set8(Set6<T> oldSet, T elem) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n        this.elem6 = elem;\n    }\n\n    public Set8(Set12<T> oldSet) {\n        this.elem0 = oldSet.elem0;\n        this.elem1 = oldSet.elem1;\n        this.elem2 = oldSet.elem2;\n        this.elem3 = oldSet.elem3;\n        this.elem4 = oldSet.elem4;\n        this.elem5 = oldSet.elem5;\n        this.elem6 = oldSet.elem6;\n        this.elem7 = oldSet.elem7;\n    }\n\n    @Override\n    public Object[] elements() {\n        return new Object[] {elem0, elem1, elem2, elem3, elem4, elem5, elem6, elem7};\n    }\n\n    protected void write(int index, T elem) {\n        if (index < 4) {\n            switch (index) {\n                case 0:\n                    this.elem0 = elem;\n                    break;\n\n                case 1:\n                    this.elem1 = elem;\n                    break;\n\n                case 2:\n                    this.elem2 = elem;\n                    break;\n\n                case 3:\n                    this.elem3 = elem;\n                    break;\n\n                default:\n                    throw new RuntimeException(\"Bug in code\");\n            }\n        } else {\n            switch (index) {\n                case 4:\n                    this.elem4 = elem;\n                    break;\n\n                case 5:\n                    this.elem5 = elem;\n                    break;\n\n                case 6:\n                    this.elem6 = elem;\n                    break;\n\n                case 7:\n                    this.elem7 = elem;\n                    break;\n\n                default:\n                    throw new IllegalArgumentException(\"Invalid index \" + index);\n            }\n        }\n    }\n\n    @Override\n    Set<T> expand(T elem) {\n        return new Set12<T>(this, elem);\n    }\n\n    @Override\n    int contractThreshold() {\n        return 6;\n    }\n\n    @Override\n    Set<T> contract() {\n        return new Set6<T>(this);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/ads/set/SetMax.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\npublic class SetMax<T> implements Set<T> {\n    private static final long serialVersionUID = 129583038274146507L;\n\n    private static final ClassifierGetter identityClassifer = new ClassifierGetter() {\n        @Override\n        public Object getClassifier(Object obj) {\n            return obj;\n        }\n    };\n\n    int size;\n    CompactMultiSetMax<T, T> hashSet;\n\n    public SetMax(Set24<T> oldSet, Object elem) {\n        // When using a compact multi-set inside a set, it is better to use\n        // safe-mode to avoid a cyclic dependency when all hash-codes are same\n        hashSet = new CompactMultiSetMax<T, T>(32, true);\n\n        Object[] elems = oldSet.getElements();\n        for (int i = 0; i < elems.length; i++) {\n            T curElem = (T) elems[i];\n            hashSet.addElementNoRehash(curElem.hashCode(), curElem);\n        }\n\n        T curElem = (T) elem;\n        hashSet.addElementNoRehash(curElem.hashCode(), curElem);\n\n        this.size = 1 + elems.length;\n\n        assert (this.size == 25);\n    }\n\n    @Override\n    public int size() {\n        // Expensive operation -- could be inaccurate for lock-free reads\n        // Doesn't matter because the read will retry\n        return getElements().length;\n    }\n\n    @Override\n    public Object[] getElements() {\n        return hashSet.getAllElements();\n    }\n\n    @Override\n    public Set<T> removeElement(T elem) {\n        if (hashSet.elements.length <= 32) {\n            // Don't resize under 32 -- Better to move to Set24\n            hashSet.removeElementNoHash(elem.hashCode(), elem);\n        } else {\n            // Resize is OK\n            hashSet = hashSet.remove(elem, identityClassifer);\n        }\n\n        // The first check increases the chance of the second (more expensive one) succeeding\n        if ((hashSet.getOccupiedCells() <= 13) && (size() <= 24)) {\n            // The new size is at or below 24\n            return new Set24<T>(getElements());\n        } else {\n            return this;\n        }\n    }\n\n    @Override\n    public Set<T> addElement(T elem) {\n        // Resize is OK on add\n        hashSet = hashSet.add(elem, identityClassifer);\n\n        return this;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/gremlin/BitsyGraphStep.java",
    "content": "package com.lambdazen.bitsy.gremlin;\n\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.wrapper.BitsyAutoReloadingGraph;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Objects;\nimport org.apache.tinkerpop.gremlin.process.traversal.Compare;\nimport org.apache.tinkerpop.gremlin.process.traversal.P;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;\nimport org.apache.tinkerpop.gremlin.process.traversal.util.AndP;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.T;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\nimport org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;\n\n// Bitsy graph step based Tinkerpop's Neo4j implementation\npublic final class BitsyGraphStep<S, E extends Element> extends GraphStep<S, E> implements HasContainerHolder {\n\n    private final List<HasContainer> hasContainers = new ArrayList<>();\n\n    public BitsyGraphStep(final GraphStep<S, E> originalGraphStep) {\n        super(\n                originalGraphStep.getTraversal(),\n                originalGraphStep.getReturnClass(),\n                originalGraphStep.isStartStep(),\n                originalGraphStep.getIds());\n        originalGraphStep.getLabels().forEach(this::addLabel);\n        this.setIteratorSupplier(\n                () -> (Iterator<E>) (Vertex.class.isAssignableFrom(this.returnClass) ? this.vertices() : this.edges()));\n    }\n\n    private BitsyGraph getBitsyGraph() {\n        Graph baseGraph = this.getTraversal().getGraph().get();\n        final BitsyGraph graph;\n        if (baseGraph instanceof BitsyAutoReloadingGraph) {\n            return ((BitsyAutoReloadingGraph) baseGraph).getBaseGraph();\n        } else {\n            return (BitsyGraph) baseGraph;\n        }\n    }\n\n    private Iterator<? extends Vertex> vertices() {\n        return lookupVertices(getBitsyGraph(), this.hasContainers, this.ids);\n    }\n\n    private Iterator<Vertex> lookupVertices(\n            final BitsyGraph graph, final List<HasContainer> hasContainers, final Object... ids) {\n        // ids are present, filter on them first\n        if (ids != null && ids.length > 0)\n            return IteratorUtils.filter(graph.vertices(ids), vertex -> HasContainer.testAll(vertex, hasContainers));\n\n        // Labels aren't indexed in Bitsy, only keys -- so do a full scan\n        for (final HasContainer hasContainer : hasContainers) {\n            if (Compare.eq == hasContainer.getBiPredicate()\n                    && !Objects.equals(hasContainer.getKey(), T.label.getAccessor())) {\n                if (graph.getIndexedKeys(Vertex.class).contains(hasContainer.getKey())) {\n                    // Find a vertex by key/value\n                    return IteratorUtils.stream(graph.verticesByIndex(hasContainer.getKey(), hasContainer.getValue()))\n                            .map(vertex -> (Vertex) vertex)\n                            .filter(vertex -> HasContainer.testAll(vertex, hasContainers))\n                            .iterator();\n                }\n            }\n        }\n        return IteratorUtils.filter(graph.vertices(), vertex -> HasContainer.testAll(vertex, hasContainers));\n    }\n\n    private Iterator<? extends Edge> edges() {\n        // return IteratorUtils.filter(this.getTraversal().getGraph().get().edges(this.ids), edge ->\n        // HasContainer.testAll(edge, this.hasContainers));\n        return lookupEdges(getBitsyGraph(), this.hasContainers, this.ids);\n    }\n\n    private Iterator<Edge> lookupEdges(\n            final BitsyGraph graph, final List<HasContainer> hasContainers, final Object... ids) {\n        // ids are present, filter on them first\n        if (ids != null && ids.length > 0)\n            return IteratorUtils.filter(graph.edges(ids), vertex -> HasContainer.testAll(vertex, hasContainers));\n\n        // Labels aren't indexed in Bitsy, only keys -- so do a full scan\n        for (final HasContainer hasContainer : hasContainers) {\n            if (Compare.eq == hasContainer.getBiPredicate()\n                    && !Objects.equals(hasContainer.getKey(), T.label.getAccessor())) {\n                if (graph.getIndexedKeys(Vertex.class).contains(hasContainer.getKey())) {\n                    // Find a vertex by key/value\n                    return IteratorUtils.stream(graph.edgesByIndex(hasContainer.getKey(), hasContainer.getValue()))\n                            .map(edge -> (Edge) edge)\n                            .filter(edge -> HasContainer.testAll(edge, hasContainers))\n                            .iterator();\n                }\n            }\n        }\n        return IteratorUtils.filter(graph.edges(), vertex -> HasContainer.testAll(vertex, hasContainers));\n    }\n\n    @Override\n    public String toString() {\n        if (this.hasContainers.isEmpty()) return super.toString();\n        else\n            return 0 == this.ids.length\n                    ? StringFactory.stepString(\n                            this, this.returnClass.getSimpleName().toLowerCase(), this.hasContainers)\n                    : StringFactory.stepString(\n                            this,\n                            this.returnClass.getSimpleName().toLowerCase(),\n                            Arrays.toString(this.ids),\n                            this.hasContainers);\n    }\n\n    @Override\n    public List<HasContainer> getHasContainers() {\n        return Collections.unmodifiableList(this.hasContainers);\n    }\n\n    @Override\n    public void addHasContainer(final HasContainer hasContainer) {\n        if (hasContainer.getPredicate() instanceof AndP) {\n            for (final P<?> predicate : ((AndP<?>) hasContainer.getPredicate()).getPredicates()) {\n                this.addHasContainer(new HasContainer(hasContainer.getKey(), predicate));\n            }\n        } else this.hasContainers.add(hasContainer);\n    }\n\n    @Override\n    public int hashCode() {\n        return super.hashCode() ^ this.hasContainers.hashCode();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/gremlin/BitsyTraversalStrategy.java",
    "content": "package com.lambdazen.bitsy.gremlin;\n\nimport org.apache.tinkerpop.gremlin.process.traversal.Step;\nimport org.apache.tinkerpop.gremlin.process.traversal.Traversal;\nimport org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.HasContainerHolder;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer;\nimport org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;\nimport org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;\n\n// Bitsy traversal strategy based Tinkerpop's Neo4j implementation\npublic class BitsyTraversalStrategy extends AbstractTraversalStrategy<TraversalStrategy.ProviderOptimizationStrategy>\n        implements TraversalStrategy.ProviderOptimizationStrategy {\n    private static final long serialVersionUID = 6405194525894707932L;\n    private static final BitsyTraversalStrategy INSTANCE = new BitsyTraversalStrategy();\n\n    private BitsyTraversalStrategy() {}\n\n    @Override\n    public void apply(final Traversal.Admin<?, ?> traversal) {\n        for (final GraphStep originalGraphStep : TraversalHelper.getStepsOfClass(GraphStep.class, traversal)) {\n            final BitsyGraphStep<?, ?> bitsyGraphStep = new BitsyGraphStep<>(originalGraphStep);\n            TraversalHelper.replaceStep(originalGraphStep, bitsyGraphStep, traversal);\n            Step<?, ?> currentStep = bitsyGraphStep.getNextStep();\n            while (currentStep instanceof HasStep || currentStep instanceof NoOpBarrierStep) {\n                if (currentStep instanceof HasStep) {\n                    for (final HasContainer hasContainer : ((HasContainerHolder) currentStep).getHasContainers()) {\n                        if (!GraphStep.processHasContainerIds(bitsyGraphStep, hasContainer))\n                            bitsyGraphStep.addHasContainer(hasContainer);\n                    }\n                    TraversalHelper.copyLabels(currentStep, currentStep.getPreviousStep(), false);\n                    traversal.removeStep(currentStep);\n                }\n                currentStep = currentStep.getNextStep();\n            }\n        }\n    }\n\n    public static BitsyTraversalStrategy instance() {\n        return INSTANCE;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/BitsyIndex.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.ads.set.CompactSet;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.concurrent.ConcurrentHashMap;\n\npublic abstract class BitsyIndex<T> {\n    Map<Object, Object> index;\n\n    public BitsyIndex() {\n        this.index = new ConcurrentHashMap<Object, Object>();\n    }\n\n    public abstract Object getValue(T bean);\n\n    public abstract T copy(T bean);\n\n    public void load(Iterator<T> initialContents) {\n        while (initialContents.hasNext()) {\n            T elem = initialContents.next();\n            add(elem);\n        }\n    }\n\n    public List<T> get(Object value) {\n        Object idxValue = index.get(value);\n\n        if (idxValue == null) {\n            return Collections.emptyList();\n        } else {\n            Object[] objs = CompactSet.getElements(idxValue);\n            List<T> ans = new ArrayList<T>(objs.length);\n            int len = objs.length;\n            for (int i = 0; i < len; i++) {\n                // Always check for nulls on getElements() because reads don't acquire locks\n                if (objs[i] != null) {\n                    ans.add(copy((T) objs[i]));\n                }\n            }\n\n            return ans;\n        }\n    }\n\n    public void add(T bean) {\n        Object value = getValue(bean);\n        if (value == null) {\n            // Nothing to do\n            return;\n        }\n\n        // No need to synchronize, because there is a read-write lock\n        Object origSet = index.get(value);\n        Object newSet = CompactSet.<T>add(origSet, bean);\n\n        if (origSet != newSet) {\n            index.put(value, newSet);\n        }\n    }\n\n    public void remove(T bean) {\n        Object value = getValue(bean);\n        if (value == null) {\n            // Nothing to do\n            return;\n        }\n\n        // No need to synchronize, because there is a read-write lock\n        Object origSet = index.get(value);\n        Object newSet = CompactSet.<T>remove(origSet, bean);\n\n        if (origSet != newSet) {\n            if (newSet == null) {\n                index.remove(value);\n            } else {\n                index.put(value, newSet);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/BitsyIndexMap.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport java.util.Collection;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentHashMap;\n\npublic class BitsyIndexMap<BeanType, IndexType extends BitsyIndex<BeanType>> {\n    // Read operations on IndexMap don't require locks.\n    Map<String, IndexType> indexMap;\n\n    public BitsyIndexMap() {\n        this.indexMap = new ConcurrentHashMap<String, IndexType>();\n    }\n\n    // LOCK-FREE methods: The member indexNames can not be used.\n    /** This method returns a copy of the edges/vertices held for the given key and value */\n    public Collection<BeanType> get(String key, Object value) {\n        IndexType index = indexMap.get(key);\n\n        if (index == null) {\n            throw new BitsyException(\n                    BitsyErrorCodes.MISSING_INDEX,\n                    \"An index on \" + key\n                            + \" must be created before querying vertices/edges by that key. Defined indexes: \"\n                            + indexMap.keySet());\n        } else {\n            return index.get(value);\n        }\n    }\n\n    // LOCKED methods\n    public void add(BeanType bean) {\n        for (IndexType index : indexMap.values()) {\n            index.add(bean);\n        }\n    }\n\n    public void remove(BeanType bean) {\n        if (bean == null) {\n            // Nothing to do\n            return;\n        }\n\n        for (IndexType index : indexMap.values()) {\n            index.remove(bean);\n        }\n    }\n\n    protected void addKeyIndex(String key, IndexType index) {\n        if (indexMap.containsKey(key)) {\n            throw new BitsyException(BitsyErrorCodes.INDEX_ALREADY_EXISTS, \"Index on vertex key '\" + key + \"'\");\n        }\n\n        indexMap.put(key, index);\n    }\n\n    public void dropKeyIndex(String key) {\n        indexMap.remove(key);\n    }\n\n    public Set<String> getIndexedKeys() {\n        return new HashSet<String>(indexMap.keySet());\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/EdgeIndex.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport java.util.Iterator;\n\npublic class EdgeIndex extends BitsyIndex<EdgeBean> {\n    String key;\n\n    public EdgeIndex(String key, Iterator<EdgeBean> initialContents) {\n        super();\n\n        this.key = key;\n\n        load(initialContents);\n    }\n\n    @Override\n    public Object getValue(EdgeBean bean) {\n        Dictionary props = bean.getPropertiesDict();\n        return (props == null) ? null : props.getProperty(key);\n    }\n\n    @Override\n    public EdgeBean copy(EdgeBean bean) {\n        return new EdgeBean(bean);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/EdgeIndexMap.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport java.util.Iterator;\n\npublic class EdgeIndexMap extends BitsyIndexMap<EdgeBean, EdgeIndex> {\n    public EdgeIndexMap() {\n        super();\n    }\n\n    public void createKeyIndex(String key, Iterator<EdgeBean> iter) {\n        EdgeIndex index = new EdgeIndex(key, iter);\n        addKeyIndex(key, index);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/IndexHelper.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.BitsyElement;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport java.util.ArrayList;\nimport java.util.Collection;\n\npublic class IndexHelper {\n    public static <T extends BitsyElement> Collection<T> filterElementsByKeyValue(\n            Collection<T> elems, String key, Object value) {\n        ArrayList<T> ans = new ArrayList<T>();\n\n        for (T elem : elems) {\n            if (elem.getState() == BitsyState.D) {\n                continue;\n            }\n\n            Object elemVal = elem.value(key);\n\n            if ((elemVal != null) && (elemVal.equals(value))) {\n                ans.add(elem);\n            }\n        }\n\n        return ans;\n    }\n\n    public static Collection<VertexBean> filterVertexBeansByKeyValue(\n            Collection<VertexBean> elems, String key, Object value) {\n        ArrayList<VertexBean> ans = new ArrayList<VertexBean>();\n\n        for (VertexBean elem : elems) {\n            Object elemVal = (elem.getProperties() == null)\n                    ? null\n                    : (elem.getProperties().get(key));\n\n            if ((elemVal != null) && (elemVal.equals(value))) {\n                ans.add(elem);\n            }\n        }\n\n        return ans;\n    }\n\n    public static Collection<EdgeBean> filterEdgeBeansByKeyValue(Collection<EdgeBean> elems, String key, Object value) {\n        ArrayList<EdgeBean> ans = new ArrayList<EdgeBean>();\n\n        for (EdgeBean elem : elems) {\n            Object elemVal = (elem.getPropertiesDict() == null)\n                    ? null\n                    : (elem.getPropertiesDict().getProperty(key));\n\n            if ((elemVal != null) && (elemVal.equals(value))) {\n                ans.add(elem);\n            }\n        }\n\n        return ans;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/VertexIndex.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.store.VertexBean;\nimport java.util.Iterator;\nimport java.util.Map;\n\npublic class VertexIndex extends BitsyIndex<VertexBean> {\n    String key;\n\n    public VertexIndex(String key, Iterator<VertexBean> initialContents) {\n        super();\n\n        this.key = key;\n\n        load(initialContents);\n    }\n\n    @Override\n    public Object getValue(VertexBean bean) {\n        Map<String, Object> props = bean.getProperties();\n        return (props == null) ? null : props.get(key);\n    }\n\n    @Override\n    public VertexBean copy(VertexBean bean) {\n        return new VertexBean(bean);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/index/VertexIndexMap.java",
    "content": "package com.lambdazen.bitsy.index;\n\nimport com.lambdazen.bitsy.store.VertexBean;\nimport java.util.Iterator;\n\npublic class VertexIndexMap extends BitsyIndexMap<VertexBean, VertexIndex> {\n    public VertexIndexMap() {\n        super();\n    }\n\n    public void createKeyIndex(String key, Iterator<VertexBean> iter) {\n        VertexIndex index = new VertexIndex(key, iter);\n        addKeyIndex(key, index);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/jsr223/BitsyGremlinPlugin.java",
    "content": "package com.lambdazen.bitsy.jsr223;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyElement;\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.BitsyIoRegistryV3d0;\nimport com.lambdazen.bitsy.BitsyProperty;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.BitsyVertexProperty;\nimport com.lambdazen.bitsy.ThreadedBitsyGraph;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport org.apache.tinkerpop.gremlin.jsr223.AbstractGremlinPlugin;\nimport org.apache.tinkerpop.gremlin.jsr223.DefaultImportCustomizer;\nimport org.apache.tinkerpop.gremlin.jsr223.ImportCustomizer;\n\npublic class BitsyGremlinPlugin extends AbstractGremlinPlugin {\n    private static final String NAME = \"lambdazen.bitsy\";\n\n    private static ImportCustomizer imports() {\n        return DefaultImportCustomizer.build()\n                .addClassImports(\n                        BitsyEdge.class,\n                        BitsyElement.class,\n                        BitsyGraph.class,\n                        ThreadedBitsyGraph.class,\n                        BitsyProperty.class,\n                        BitsyVertex.class,\n                        BitsyVertexProperty.class,\n                        UUID.class,\n                        BitsyTransaction.class,\n                        BitsyIoRegistryV3d0.class)\n                .create();\n    }\n\n    private static final BitsyGremlinPlugin INSTANCE = new BitsyGremlinPlugin();\n\n    public BitsyGremlinPlugin() {\n        super(NAME, imports());\n    }\n\n    public static BitsyGremlinPlugin instance() {\n        return INSTANCE;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/AdjacencyMap.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.IEdge;\nimport com.lambdazen.bitsy.UUID;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.NavigableMap;\nimport java.util.TreeMap;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\n\n/** This map is used to keep track of edges between vertices in the transaction context. */\npublic class AdjacencyMap {\n    Map<UUID, TreeMap<Endpoint, Integer>> outV;\n    Map<UUID, TreeMap<Endpoint, Integer>> inV;\n    IEdgeRemover edgeRemover;\n\n    public AdjacencyMap(boolean isConcurrent, IEdgeRemover edgeRemover) {\n        this.edgeRemover = edgeRemover;\n        this.outV = new HashMap<UUID, TreeMap<Endpoint, Integer>>();\n        this.inV = new HashMap<UUID, TreeMap<Endpoint, Integer>>();\n    }\n\n    public void clear() {\n        outV.clear();\n        inV.clear();\n    }\n\n    public void addEdge(UUID edgeId, UUID outVId, String label, UUID inVId, int version) {\n        // Update in and out vertices\n        addToTreeMap(outV, outVId, new Endpoint(label, edgeId), version);\n        addToTreeMap(inV, inVId, new Endpoint(label, edgeId), version);\n    }\n\n    private void addToTreeMap(Map<UUID, TreeMap<Endpoint, Integer>> adjMap, UUID id, Endpoint endpoint, int version) {\n        TreeMap<Endpoint, Integer> value = adjMap.get(id);\n        if (value == null) {\n            value = new TreeMap<Endpoint, Integer>();\n            adjMap.put(id, value);\n        }\n\n        value.put(endpoint, version);\n    }\n\n    public void removeEdge(UUID edgeId, UUID outVId, String label, UUID inVId) {\n        // If the combination of given parameters don't match an existing edge, it won't be removed\n        if (removeMatchingKeys(outV.get(outVId), new Endpoint(label, edgeId), null, null)) {\n            outV.remove(outVId);\n        }\n\n        if (removeMatchingKeys(inV.get(inVId), new Endpoint(label, edgeId), null, null)) {\n            inV.remove(inVId);\n        }\n    }\n\n    public void removeVertex(UUID vertexId) {\n        // Remove incoming and outgoing vertices\n        if (removeMatchingKeys(outV.get(vertexId), new Endpoint(null, null), inV, Direction.OUT)) {\n            outV.remove(vertexId);\n        }\n\n        if (removeMatchingKeys(inV.get(vertexId), new Endpoint(null, null), outV, Direction.IN)) {\n            inV.remove(vertexId);\n        }\n    }\n\n    public List<UUID> getEdges(UUID vertexId, Direction dir, String[] edgeLabels) {\n        NavigableMap<Endpoint, Integer> map = (dir == Direction.IN) ? inV.get(vertexId) : outV.get(vertexId);\n\n        if (map == null) {\n            return Collections.emptyList();\n        }\n\n        Endpoint[] matches;\n\n        // Var-args appear as empty arrays\n        if ((edgeLabels == null) || edgeLabels.length == 0) {\n            matches = new Endpoint[] {new Endpoint(null, null)};\n        } else {\n            int len = edgeLabels.length;\n            matches = new Endpoint[len];\n            for (int i = 0; i < len; i++) {\n                matches[i] = new Endpoint(edgeLabels[i], null);\n            }\n        }\n\n        List<UUID> edgeIds = new ArrayList<UUID>();\n\n        for (Endpoint match : matches) {\n            findMatchingValues(map, match, edgeIds);\n        }\n\n        return edgeIds;\n    }\n\n    // This method removes all keys that match the given value\n    private boolean removeMatchingKeys(\n            NavigableMap<Endpoint, Integer> map,\n            Endpoint endpoint,\n            Map<UUID, TreeMap<Endpoint, Integer>> otherMap,\n            Direction dir) {\n        if (map == null) {\n            return false;\n        }\n\n        // Mark this endpoint as a marker, because it is used to do a tailMap traversal to remove matching edges\n        endpoint.setMarker();\n\n        // Find the first key\n        Endpoint floorKey = map.floorKey(endpoint);\n\n        Map<Endpoint, Integer> view;\n        if (floorKey == null) {\n            // This means that the element being searched is the minimum\n            view = map;\n        } else {\n            view = map.tailMap(floorKey);\n        }\n\n        Iterator<Map.Entry<Endpoint, Integer>> entryIter = view.entrySet().iterator();\n\n        boolean isFirst = true;\n        while (entryIter.hasNext()) {\n            Map.Entry<Endpoint, Integer> entry = entryIter.next();\n            Endpoint key = entry.getKey();\n\n            if (endpoint.isMatch(key)) {\n                // Remove it from this index\n                entryIter.remove();\n\n                // and from the underlying edge map if necessary\n                if (dir != null) { // Direction is null if this is a recursive all\n                    // Remove the edge if the map is provided for this purpose\n                    UUID edgeId = key.getEdgeId();\n\n                    IEdge edge = edgeRemover.removeEdge(edgeId);\n\n                    assert (edge != null);\n\n                    // Remove the other endpoint of this edge. NOTE: Self loops are not allowed.\n                    Endpoint otherEndpoint;\n                    UUID otherVertexId;\n                    if (dir == Direction.OUT) {\n                        otherVertexId = edge.getInVertexId();\n                        otherEndpoint = new Endpoint(key.getEdgeLabel(), key.getEdgeId());\n                    } else {\n                        otherVertexId = edge.getOutVertexId();\n                        otherEndpoint = new Endpoint(key.getEdgeLabel(), key.getEdgeId());\n                    }\n\n                    if (removeMatchingKeys(otherMap.get(otherVertexId), otherEndpoint, null, null)) {\n                        otherMap.remove(otherVertexId);\n                    }\n                }\n            } else {\n                // Done with removes -- the tree map is sorted\n                if (isFirst) {\n                    // continue\n                } else {\n                    break;\n                }\n            }\n\n            isFirst = false;\n        }\n\n        return (map.size() == 0);\n    }\n\n    // This method removes all keys that match the given value\n    private void findMatchingValues(NavigableMap<Endpoint, Integer> map, Endpoint endpoint, List<UUID> result) {\n        // Mark this endpoint as a marker, because it is used to do a tailMap traversal to query matching edges\n        endpoint.setMarker();\n\n        // Find the first key\n        Endpoint floorKey = map.floorKey(endpoint);\n\n        Map<Endpoint, Integer> view;\n        if (floorKey == null) {\n            // This means that the element being searched is the minimum\n            view = map;\n        } else {\n            view = map.tailMap(floorKey);\n        }\n\n        boolean isFirst = true;\n        for (Map.Entry<Endpoint, Integer> entry : view.entrySet()) {\n            Endpoint key = entry.getKey();\n\n            if (endpoint.isMatch(key)) {\n                // Matching entry, must be added to result\n                result.add(key.getEdgeId());\n            } else {\n                // Done with the search -- the tree map is sorted\n\n                if (isFirst) {\n                    // continue\n                } else {\n                    break;\n                }\n            }\n\n            isFirst = false;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/AdjacencyMapForBeans.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.ads.set.ClassifierGetter;\nimport com.lambdazen.bitsy.ads.set.CompactMultiSetMax;\nimport com.lambdazen.bitsy.ads.set.CompactSet;\nimport com.lambdazen.bitsy.ads.set.Set24;\nimport com.lambdazen.bitsy.ads.set.SetMax;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\n\n/** This map is used to keep track of edges between vertices in the memory graph store. */\npublic class AdjacencyMapForBeans {\n    IEdgeRemover edgeRemover;\n    ClassifierGetter<String, EdgeBean> edgeBeanClassifier;\n\n    public AdjacencyMapForBeans(boolean isConcurrent, IEdgeRemover edgeRemover) {\n        this.edgeRemover = edgeRemover;\n        this.edgeBeanClassifier = new ClassifierGetter<String, EdgeBean>() {\n            @Override\n            public String getClassifier(EdgeBean eBean) {\n                return eBean.getLabel();\n            }\n        };\n    }\n\n    public void addEdge(EdgeBean eBean) {\n        // Update in and out vertices\n        VertexBean outV = eBean.outVertex;\n        VertexBean inV = eBean.inVertex;\n\n        outV.outEdges = addEdgeToAdjList(outV.outEdges, eBean);\n        inV.inEdges = addEdgeToAdjList(inV.inEdges, eBean);\n    }\n\n    private Object addEdgeToAdjList(Object adjList, EdgeBean eBean) {\n        if (adjList instanceof CompactMultiSetMax) {\n            CompactMultiSetMax<String, EdgeBean> adjListMultiSet = (CompactMultiSetMax<String, EdgeBean>) adjList;\n\n            return adjListMultiSet.add(eBean, edgeBeanClassifier);\n        } else {\n            Object ans = CompactSet.<EdgeBean>add(adjList, eBean);\n\n            if (ans instanceof SetMax) {\n                return convertToMultiSet((SetMax) ans);\n            } else {\n                return ans;\n            }\n        }\n    }\n\n    /** This method removes the edges without calling edgeRemover.removeEdge() */\n    protected void removeEdgeWithoutCallback(EdgeBean eBean) {\n        if (eBean == null) {\n            return;\n        }\n\n        // Update in and out vertices\n        VertexBean outV = eBean.outVertex;\n        VertexBean inV = eBean.inVertex;\n\n        outV.outEdges =\n                removeEdgeFromAdjList(outV.outEdges, eBean); // CompactSet.<EdgeBean>remove(outV.outEdges, eBean);\n        inV.inEdges = removeEdgeFromAdjList(inV.inEdges, eBean);\n        ; // CompactSet.<EdgeBean>remove(inV.inEdges, eBean);\n    }\n\n    private Object removeEdgeFromAdjList(Object adjList, EdgeBean eBean) {\n        if (adjList instanceof CompactMultiSetMax) {\n            CompactMultiSetMax<String, EdgeBean> adjListMultiSet = (CompactMultiSetMax<String, EdgeBean>) adjList;\n\n            CompactMultiSetMax<String, EdgeBean> ans = adjListMultiSet.remove(eBean, edgeBeanClassifier);\n\n            // The first check is fast and increases the chances of hitting the second one\n            if ((ans.getOccupiedCells() <= 13) && !ans.sizeBiggerThan24()) {\n                return convertToSet(ans);\n            } else {\n                return ans;\n            }\n        } else {\n            return CompactSet.<EdgeBean>remove(adjList, eBean);\n        }\n    }\n\n    private Object[] getEdgesFromAdjList(Object adjList) {\n        if (adjList instanceof CompactMultiSetMax) {\n            CompactMultiSetMax<String, EdgeBean> adjListMultiSet = (CompactMultiSetMax<String, EdgeBean>) adjList;\n\n            return adjListMultiSet.getAllElements();\n        } else {\n            return CompactSet.getElements(adjList);\n        }\n    }\n\n    private Object convertToSet(CompactMultiSetMax<String, EdgeBean> set) {\n        // The size is guaranteed to be between 13 and 24\n        // The Set24 will automatically adjust on a remove if it is too big\n        return new Set24<EdgeBean>(set.getAllElements());\n    }\n\n    private Object convertToMultiSet(SetMax<EdgeBean> set) {\n        // Use safe = false, which means that the multi-set can use the default SetMax implementation\n        CompactMultiSetMax<String, EdgeBean> ans = new CompactMultiSetMax<String, EdgeBean>(36, false);\n\n        for (Object obj : set.getElements()) {\n            if (obj != null) {\n                ans.add((EdgeBean) obj, edgeBeanClassifier);\n            }\n        }\n\n        return ans;\n    }\n\n    public void removeVertex(VertexBean vBean) {\n        if (vBean == null) {\n            return;\n        }\n\n        // Remove outgoing edges\n        for (Object obj : getEdgesFromAdjList(vBean.outEdges)) {\n            EdgeBean eBean = (EdgeBean) obj;\n            eBean.inVertex.inEdges = removeEdgeFromAdjList(\n                    eBean.inVertex.inEdges, eBean); // CompactSet.<EdgeBean>remove(eBean.inVertex.inEdges, eBean);\n\n            // Callback\n            edgeRemover.removeEdge(eBean.getId());\n        }\n\n        vBean.outEdges = null;\n\n        // Remove incoming edges\n        for (Object obj : getEdgesFromAdjList(vBean.inEdges)) {\n            EdgeBean eBean = (EdgeBean) obj;\n            eBean.outVertex.outEdges = removeEdgeFromAdjList(\n                    eBean.outVertex.outEdges, eBean); // CompactSet.<EdgeBean>remove(eBean.outVertex.outEdges, eBean);\n\n            // Callback\n            edgeRemover.removeEdge(eBean.getId());\n        }\n\n        vBean.inEdges = null;\n    }\n\n    public List<EdgeBean> getEdges(VertexBean vBean, Direction dir, String[] edgeLabels) {\n        if (vBean == null) {\n            return Collections.emptyList();\n        }\n\n        boolean outDirection = (dir == Direction.OUT);\n\n        Object edges = outDirection ? vBean.outEdges : vBean.inEdges;\n        if (edges == null) {\n            return Collections.emptyList();\n        }\n\n        // Need a new list\n        List<EdgeBean> ans = new ArrayList<EdgeBean>();\n\n        boolean origMatch = (edgeLabels == null) || edgeLabels.length == 0;\n\n        boolean multiSet = (edges instanceof CompactMultiSetMax<?, ?>);\n        String[] edgeLabelsToQuery = (multiSet && (!origMatch)) ? edgeLabels : new String[] {null};\n\n        for (String edgeLabelToQuery : edgeLabelsToQuery) {\n            Object[] edgeBeans;\n            if (multiSet) {\n                edgeBeans = ((CompactMultiSetMax<String, EdgeBean>) edges).getSuperSetWithClassifier(edgeLabelToQuery);\n            } else {\n                edgeBeans = CompactSet.getElements(edges);\n            }\n\n            for (Object obj : edgeBeans) {\n                // Always check for nulls on getElements() because reads don't acquire locks\n                if (obj == null) {\n                    continue;\n                }\n\n                boolean match = origMatch;\n\n                EdgeBean eBean = (EdgeBean) obj;\n\n                if (!match) {\n                    String eLabel = eBean.getLabel();\n                    if (edgeLabelToQuery != null) {\n                        match = eLabel.equals(edgeLabelToQuery);\n                    } else {\n                        for (String label : edgeLabels) {\n                            if (eLabel.equals(label)) {\n                                match = true;\n                                break;\n                            }\n                        }\n                    }\n                }\n\n                if (match) {\n                    // Always copy objects that are directly picked up from the memory store\n                    // These objects can be updated later while the query is in progress\n                    ans.add(new EdgeBean(eBean));\n                }\n            }\n        }\n\n        return ans;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/BackupJob.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyException;\nimport java.nio.file.Path;\n\npublic class BackupJob extends JobWithCountDownLatch implements IVeReorgJob {\n    private Path backupDir;\n    private BitsyException bex;\n\n    public BackupJob(Path backupDir) {\n        this.backupDir = backupDir;\n    }\n\n    public Path getBackupDir() {\n        return backupDir;\n    }\n\n    public BitsyException getException() {\n        return bex;\n    }\n\n    public void setException(BitsyException bex) {\n        this.bex = bex;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/CompactAndCopyTask.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.IGraphStore;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * This class takes an array of input file logs and appends their contents (in\n * order) it to separate V and E file logs. It automatically checks the store to\n * see if the records are latest, and drops any records that are obsolete.\n */\npublic class CompactAndCopyTask implements Runnable {\n    private static final Logger log = LoggerFactory.getLogger(CompactAndCopyTask.class);\n\n    // 4KB initial buffer size to avoid too many resizings\n    private static final int INIT_STRING_BUFFER_SIZE = 4096;\n\n    CommittableFileLog[] inputs;\n    CommittableFileLog vLog;\n    CommittableFileLog eLog;\n    IGraphStore store;\n    int addedLines;\n    long nextTxCounter;\n\n    public CompactAndCopyTask(\n            CommittableFileLog[] inputs,\n            CommittableFileLog vos,\n            CommittableFileLog eos,\n            IGraphStore store,\n            long nextTxCounter) {\n        this.inputs = inputs;\n        this.vLog = vos;\n        this.eLog = eos;\n        this.store = store;\n        this.addedLines = 0;\n        this.nextTxCounter = nextTxCounter;\n    }\n\n    public void run() {\n        StringBuilder tempV = new StringBuilder(INIT_STRING_BUFFER_SIZE);\n        StringBuilder tempE = new StringBuilder(INIT_STRING_BUFFER_SIZE);\n\n        // If the first log is not a tx log, this is a reorg\n        // A reorg goes through the entire set of database files, which means\n        // that D records can be dropped.\n        boolean isReorg = !inputs[0].isTxLog();\n\n        int i = 0;\n        String fileName = null;\n        int lineNo = 0;\n\n        BitsyException toThrow = null;\n        try {\n            for (i = 0; i < inputs.length; i++) {\n                CommittableFileLog inputLog = inputs[i];\n\n                try {\n                    fileName = inputLog.getPath().toString();\n\n                    inputLog.openForRead();\n\n                    // In transational mode, only transactions that are completed will be writted to V/E txt files\n                    boolean isTransactional = inputLog.isTxLog()\n                            && (i == inputs.length - 1); // Only the last TX LOG may be incomplete in recovery mode\n\n                    String line;\n                    lineNo = 0;\n                    while ((line = inputLog.readLine()) != null) {\n                        lineNo++;\n\n                        // When parsing a record\n                        Record rec = Record.parseRecord(line, lineNo, fileName);\n\n                        if (rec.checkObsolete(store, isReorg, lineNo, fileName)) {\n                            // log.debug(\"Ignoring obsolete record {}\", line);\n                            continue;\n                        }\n\n                        RecordType recType = rec.getType();\n                        if ((recType == RecordType.E) || (recType == RecordType.V)) {\n                            addedLines++;\n                        }\n\n                        if (!isTransactional) {\n                            if (lineNo % 10000 == 0) {\n                                // Write out the temporary data to the files\n                                vLog.append(tempV.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n                                eLog.append(tempE.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n\n                                // Reset the temporary buffers\n                                tempV.setLength(0);\n                                tempE.setLength(0);\n                            }\n\n                            // No special handling is needed\n                            switch (recType) {\n                                case T: // Transaction marker can be ignored\n                                case L: // Old log marker can be ignored -- only happens during rollover\n                                    break;\n\n                                case E:\n                                    // eLog.append(line.getBytes(FileBackedMemoryGraphStore.utf8));\n                                    // eLog.append(newLine);\n                                    tempE.append(line);\n                                    tempE.append('\\n');\n                                    break;\n\n                                case V:\n                                    // vLog.append(line.getBytes(FileBackedMemoryGraphStore.utf8));\n                                    // vLog.append(newLine);\n                                    tempV.append(line);\n                                    tempV.append('\\n');\n                                    break;\n\n                                default:\n                                    throw new BitsyException(\n                                            BitsyErrorCodes.INTERNAL_ERROR,\n                                            \"Unhandled record type \" + recType + \" in file \" + fileName + \" at line \"\n                                                    + lineNo);\n                            }\n                        } else {\n                            // A transactional file -- this requires each block that ends with a T records to be flushed\n                            switch (recType) {\n                                case L: // Old log marker can be ignored\n                                    break;\n\n                                case T:\n                                    // Write out the temporary data to the files\n                                    vLog.append(tempV.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n                                    eLog.append(tempE.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n\n                                    // Reset the temporary buffers\n                                    tempV.setLength(0);\n                                    tempE.setLength(0);\n\n                                    // All set\n                                    break;\n\n                                case E:\n                                    tempE.append(line);\n                                    tempE.append('\\n');\n                                    break;\n\n                                case V:\n                                    tempV.append(line);\n                                    tempV.append('\\n');\n                                    break;\n\n                                default:\n                                    throw new BitsyException(\n                                            BitsyErrorCodes.INTERNAL_ERROR,\n                                            \"Unhandled record type \" + recType + \" in file \" + fileName + \" at line \"\n                                                    + lineNo);\n                            }\n                        }\n                    }\n\n                    if (!isTransactional) {\n                        // Write out the temporary data to the files\n                        vLog.append(tempV.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n                        eLog.append(tempE.toString().getBytes(FileBackedMemoryGraphStore.utf8));\n\n                        // Reset the temporary buffers\n                        tempV.setLength(0);\n                        tempE.setLength(0);\n                    }\n                } finally {\n                    // Close is in finally to make sure that the input files are closed before next reorg\n                    inputLog.close();\n                }\n            }\n\n            // After all inputs log(s) have been processed, an L entry is added to recover the V/E logs in case of crash\n            // in the middle of the NEXT copy process\n            String logRec = Record.generateDBLine(RecordType.L, \"\" + nextTxCounter);\n            vLog.append(logRec.getBytes(FileBackedMemoryGraphStore.utf8));\n            eLog.append(logRec.getBytes(FileBackedMemoryGraphStore.utf8));\n        } catch (BitsyException e) {\n            // There was an error in the hash-code or elsewhere. This is not a recoverable error -- may be the next load\n            // can fix it.\n            log.error(\n                    \"Unrecoverable error while copying database files during a \"\n                            + ((isReorg) ? \"reorganization\" : \"transaction flush\"),\n                    e);\n\n            toThrow = e;\n        } catch (Exception e) {\n            // This is an IO error\n            toThrow = new BitsyException(\n                    BitsyErrorCodes.ERROR_READING_FROM_FILE, \"File \" + fileName + \" at line \" + lineNo, e);\n            log.error(\n                    \"Unrecoverable error while copying database files during a \"\n                            + ((isReorg) ? \"reorganization\" : \"transaction flush\"),\n                    e);\n        } finally {\n            try {\n                vLog.commit();\n            } catch (BitsyException e) {\n                log.error(\"Error while committing file \" + vLog.getPath(), e);\n                if (toThrow != null) {\n                    toThrow = e;\n                }\n            }\n\n            try {\n                eLog.commit();\n            } catch (BitsyException e) {\n                log.error(\"Error while committing file \" + eLog.getPath(), e);\n                if (toThrow != null) {\n                    toThrow = e;\n                }\n            }\n        }\n\n        // The exception may have happened in the catch-block or inside the commit. But only the first one (toThrow) is\n        // the root cause\n        if (toThrow != null) {\n            throw toThrow;\n        }\n    }\n\n    public int getOutputLines() {\n        return addedLines;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/EdgeBean.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.lambdazen.bitsy.IEdge;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport java.io.Serializable;\nimport java.util.TreeMap;\n\n@JsonPropertyOrder({\"class\", \"id\", \"v\", \"s\", \"o\", \"l\", \"i\", \"p\"})\npublic class EdgeBean extends UUID implements IEdge, Serializable {\n    private static final long serialVersionUID = -5962479601393604124L;\n\n    Dictionary properties;\n    String label;\n    VertexBean outVertex;\n    VertexBean inVertex;\n    int version;\n\n    public EdgeBean(\n            UUID id, Dictionary properties, int version, String label, VertexBean outVertex, VertexBean inVertex) {\n        super(id.getMostSignificantBits(), id.getLeastSignificantBits());\n\n        this.properties = properties;\n        this.version = version;\n        this.label = label;\n        this.outVertex = outVertex;\n        this.inVertex = inVertex;\n    }\n\n    /** Shallow copy constructor */\n    public EdgeBean(EdgeBean orig) {\n        super(orig.getMostSignificantBits(), orig.getLeastSignificantBits());\n\n        this.version = orig.version;\n        this.properties = orig.properties;\n        this.label = orig.label;\n        this.outVertex = orig.outVertex;\n        this.inVertex = orig.inVertex;\n    }\n\n    // Use UUID's toString()\n    //    public String toString() {\n    //        return \"EdgeBean(id = \" + getIdStr() + \", props \" + getProperties() + \", version = \" + version + \", label\n    // = \" + label + \", outV = \" + outVertex + \", inV = \" + inVertex + \")\";\n    //    }\n\n    @JsonIgnore\n    public UUID getId() {\n        // I am the ID! Saves on object creation and equals checks.\n        return this;\n    }\n\n    @JsonProperty(\"id\")\n    public String getIdStr() {\n        return uuidRepr();\n    }\n\n    @JsonProperty(\"p\")\n    public TreeMap<String, Object> getProperties() {\n        if (properties == null) {\n            return null;\n        } else {\n            TreeMap<String, Object> ans = new TreeMap<String, Object>();\n\n            for (String key : properties.getPropertyKeys()) {\n                ans.put(key, properties.getProperty(key));\n            }\n\n            return ans;\n        }\n    }\n\n    @JsonIgnore\n    public Dictionary getPropertiesDict() {\n        return properties;\n    }\n\n    @JsonProperty(\"v\")\n    public int getVersion() {\n        return version;\n    }\n\n    @JsonIgnore\n    public UUID getInVertexId() {\n        return inVertex.getId();\n    }\n\n    @JsonIgnore\n    public UUID getOutVertexId() {\n        return outVertex.getId();\n    }\n\n    @JsonProperty(\"l\")\n    public String getLabel() {\n        return label;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/EdgeBeanJson.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.ads.dict.DictionaryFactory;\nimport java.util.TreeMap;\n\npublic class EdgeBeanJson extends EdgeBean {\n    private static final long serialVersionUID = 3554788509798848887L;\n\n    private UUID outVertexId, inVertexId;\n    private BitsyState state;\n\n    @JsonCreator\n    public EdgeBeanJson(\n            @JsonProperty(\"id\") String idStr,\n            @JsonProperty(\"p\") TreeMap<String, Object> properties,\n            @JsonProperty(\"v\") int version,\n            @JsonProperty(\"l\") String label,\n            @JsonProperty(\"o\") String outVertexIdStr,\n            @JsonProperty(\"i\") String inVertexIdStr,\n            @JsonProperty(\"s\") BitsyState state) {\n        this(\n                UUID.fromString(idStr),\n                DictionaryFactory.fromMap(properties),\n                version,\n                label,\n                UUID.fromString(outVertexIdStr),\n                UUID.fromString(inVertexIdStr),\n                state);\n    }\n\n    public EdgeBeanJson(\n            UUID id,\n            Dictionary properties,\n            int version,\n            String label,\n            UUID outVertexId,\n            UUID inVertexId,\n            BitsyState state) {\n        super(id, properties, version, label, null, null);\n\n        this.outVertexId = outVertexId;\n        this.inVertexId = inVertexId;\n        this.state = state;\n    }\n\n    @JsonIgnore\n    @Override\n    public UUID getInVertexId() {\n        return inVertexId;\n    }\n\n    @JsonIgnore\n    @Override\n    public UUID getOutVertexId() {\n        return outVertexId;\n    }\n\n    @JsonProperty(\"i\")\n    public String getInVertexIdStr() {\n        return UUID.toString(inVertexId);\n    }\n\n    @JsonProperty(\"o\")\n    public String getOutVertexIdStr() {\n        return UUID.toString(outVertexId);\n    }\n\n    @JsonProperty(\"s\")\n    public BitsyState getState() {\n        return state;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/Endpoint.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.UUID;\nimport java.io.Serializable;\n\n/** This class represents an end-point of an edge */\npublic class Endpoint implements Serializable, Comparable<Endpoint> {\n    private static final long serialVersionUID = 3826290623768933884L;\n\n    String edgeLabel;\n    UUID edgeId;\n\n    transient boolean marker;\n\n    public Endpoint(String edgeLabel, UUID edgeId) {\n        this.edgeLabel = edgeLabel;\n        this.edgeId = edgeId;\n        this.marker = false;\n    }\n\n    public String toString() {\n        return \"Endpoint(label = \" + edgeLabel + \", edgeId = \" + edgeId + \", marker = \" + marker + \")\";\n    }\n\n    public void setMarker() {\n        marker = true;\n    }\n\n    public boolean isMarker() {\n        return marker;\n    }\n\n    public String getEdgeLabel() {\n        return edgeLabel;\n    }\n\n    public UUID getEdgeId() {\n        return edgeId;\n    }\n\n    public int compareTo(Endpoint other) {\n        int ans = 0;\n\n        // A null edgeLabel implies the 'first' edge for the given vertex\n        if (edgeLabel == null) {\n            if (isMarker()) {\n                return -1;\n            }\n\n            if (other.getEdgeLabel() != null) {\n                return -1;\n            }\n        }\n\n        // A null on the other implies that the other edge is first\n        if (other.getEdgeLabel() == null) {\n            if (other.isMarker()) {\n                return 1;\n            }\n\n            if (edgeLabel != null) {\n                return 1;\n            } else {\n                // Continue down to edge ID comparison\n            }\n        } else {\n            // Comes here if both edge labels are non null\n            ans = edgeLabel.compareTo(other.getEdgeLabel());\n            if (ans != 0) {\n                return ans;\n            }\n\n            // Continue down to edge ID comparison\n        }\n\n        // Both vertex and edge labels match.\n        if (edgeId == null) {\n            assert isMarker();\n            return -1;\n        }\n\n        if (other.getEdgeId() == null) {\n            assert other.isMarker();\n            return 1;\n        }\n\n        ans = edgeId.compareTo(other.getEdgeId());\n        if (ans != 0) {\n            return ans;\n        }\n\n        if (isMarker()) {\n            return -1;\n        } else if (other.isMarker()) {\n            return 1;\n        } else {\n            return 0;\n        }\n    }\n\n    public boolean equals(Object o) {\n        if (o instanceof Endpoint) {\n            return compareTo((Endpoint) o) == 0;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * This method must only be called on marker endpoints, i.e., end-points\n     * used for matching existing Endpoints in the B-Tree. It returns true if\n     * the given Endpoint matches this marker\n     */\n    public boolean isMatch(Endpoint other) {\n        assert isMarker() : \"isMatch can only be used on marker end-points\";\n\n        // Same structure as compareTo, except that nulls 'match' IDs (not <)\n        int ans = 0;\n\n        // A null edgeLabel implies that all endpoints of that vertex must be\n        // matched\n        if (edgeLabel == null) {\n            return true;\n        }\n\n        if (other.getEdgeLabel() == null) {\n            // This is not a match because the existing Endpoint no label, but\n            // the marker does\n            return false;\n        }\n\n        ans = edgeLabel.compareTo(other.getEdgeLabel());\n        if (ans != 0) {\n            return false;\n        }\n\n        // A null edgeId implies the 'first' edge for the given vertex for the\n        // given edgeLabel\n        if (edgeId == null) {\n            return true;\n        }\n\n        return (edgeId.compareTo(other.getEdgeId()) == 0);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/FileBackedMemoryGraphStore.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonInclude;\nimport com.fasterxml.jackson.annotation.JsonInclude.Include;\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.MapperFeature;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.SerializationFeature;\nimport com.fasterxml.jackson.databind.json.JsonMapper;\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport com.lambdazen.bitsy.IGraphStore;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport com.lambdazen.bitsy.util.BufferFlusher;\nimport com.lambdazen.bitsy.util.BufferPotential;\nimport com.lambdazen.bitsy.util.BufferQueuer;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport com.lambdazen.bitsy.util.DoubleBuffer;\nimport com.lambdazen.bitsy.util.DoubleBuffer.BufferName;\nimport com.lambdazen.bitsy.util.DoubleBufferWithExecWork;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.StringWriter;\nimport java.nio.ByteBuffer;\nimport java.nio.charset.Charset;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.nio.file.StandardCopyOption;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Random;\nimport java.util.Set;\nimport java.util.concurrent.atomic.AtomicBoolean;\nimport java.util.concurrent.atomic.AtomicInteger;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/** This class represents a memory graph store that is backed by a durable files */\npublic class FileBackedMemoryGraphStore implements IGraphStore {\n    private static final Logger log = LoggerFactory.getLogger(FileBackedMemoryGraphStore.class);\n\n    private static final String META_PREFIX = \"meta\";\n    private static final String META_B_TXT = \"metaB.txt\";\n    private static final String META_A_TXT = \"metaA.txt\";\n    private static final String E_B_TXT = \"eB.txt\";\n    private static final String E_A_TXT = \"eA.txt\";\n    private static final String V_B_TXT = \"vB.txt\";\n    private static final String V_A_TXT = \"vA.txt\";\n    private static final String TX_B_TXT = \"txB.txt\";\n    private static final String TX_A_TXT = \"txA.txt\";\n\n    // Commit 10K ops per load in the V/E files\n    public static final int DEFAULT_LOAD_OPS_PER_COMMIT = 10000;\n    public static final int DEFAULT_MIN_LINES_BEFORE_REORG = 1000;\n\n    public static final Random rand = new Random();\n\n    public static final Charset utf8 = StandardCharsets.UTF_8;\n    private static final int JOIN_TIMEOUT = 60000; // 1 minute\n\n    private static AtomicInteger idCounter = new AtomicInteger(1);\n    private static AtomicBoolean backupInProgress = new AtomicBoolean(false);\n\n    private int id;\n    private ObjectMapper mapper;\n    private MemoryGraphStore memStore;\n    private Path dbPath;\n\n    private CommittableFileLog txA;\n    private CommittableFileLog txB;\n    private CommittableFileLog vA;\n    private CommittableFileLog vB;\n    private CommittableFileLog eA;\n    private CommittableFileLog eB;\n    private CommittableFileLog mA;\n    private CommittableFileLog mB;\n\n    private DoubleBuffer<TxUnit> txToTxLogBuf;\n    private DoubleBufferWithExecWork<ITxBatchJob> txLogToVEBuf;\n    private DoubleBufferWithExecWork<IVeReorgJob> veReorgBuf;\n\n    private TxLogFlushPotential txLogFlushPotential;\n    private VEObsolescencePotential veReorgPotential;\n\n    private long logCounter;\n\n    private BufferName lastFlushedBuffer = null;\n    private Object flushCompleteSignal = new Object();\n\n    // Major version number\n    public static String CURRENT_MAJOR_VERSION_NUMBER = \"1.5\";\n    private String majorVersionNumber = \"1.0\";\n\n    public FileBackedMemoryGraphStore(MemoryGraphStore memStore, Path dbPath, long txLogThreshold, double reorgFactor) {\n        this(memStore, dbPath, txLogThreshold, reorgFactor, false);\n    }\n\n    public FileBackedMemoryGraphStore(\n            MemoryGraphStore memStore,\n            Path dbPath,\n            long txLogThreshold,\n            double reorgFactor,\n            boolean createDirIfMissing) {\n        this.id = idCounter.getAndIncrement();\n        this.memStore = memStore;\n        this.dbPath = dbPath;\n        log.info(\"Starting graph \" + toString());\n\n        JsonMapper.Builder builder = JsonMapper.builder();\n        // Indentation must be turned off\n        builder.configure(SerializationFeature.INDENT_OUTPUT, false);\n        builder.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);\n        mapper = builder.build();\n        mapper.configOverride(Map.class)\n                .setInclude(JsonInclude.Value.construct(JsonInclude.Include.NON_NULL, JsonInclude.Include.NON_NULL));\n        mapper.setSerializationInclusion(Include.NON_NULL);\n        mapper.activateDefaultTyping(mapper.getPolymorphicTypeValidator());\n\n        if (!dbPath.toFile().isDirectory()) {\n            if (!createDirIfMissing) {\n                throw new BitsyException(\n                        BitsyErrorCodes.BAD_DB_PATH,\n                        \"Expecting \" + dbPath + \" to be a folder. Exists? \"\n                                + dbPath.toFile().exists());\n            } else {\n                if (!dbPath.toFile().exists()) {\n                    try {\n                        Files.createDirectory(dbPath);\n                    } catch (IOException ex) {\n                        throw new BitsyException(BitsyErrorCodes.BAD_DB_PATH, \"Couldn't create \" + dbPath);\n                    }\n                }\n            }\n        }\n\n        // Start off the Log Counter as 1. openForRead() will update this to the maximum so far.\n        this.logCounter = 1;\n\n        this.txA = openFileLog(TX_A_TXT, true);\n        this.txB = openFileLog(TX_B_TXT, true);\n        this.vA = openFileLog(V_A_TXT, false);\n        this.vB = openFileLog(V_B_TXT, false);\n        this.eA = openFileLog(E_A_TXT, false);\n        this.eB = openFileLog(E_B_TXT, false);\n        this.mA = openFileLog(META_A_TXT, false);\n        this.mB = openFileLog(META_B_TXT, false);\n\n        log.debug(\"Initial log counter is {}\", logCounter);\n\n        // Find the earlier of the two\n        CommittableFileLog vToLoad = getEarlierBuffer(vA, vB);\n        CommittableFileLog eToLoad = getEarlierBuffer(eA, eB);\n        CommittableFileLog[] txToLoad = getOrderedTxLogs(txA, txB);\n\n        List<CommittableFileLog> logsToLoad = new ArrayList<CommittableFileLog>();\n\n        logsToLoad.add(vToLoad);\n        logsToLoad.add(eToLoad);\n        logsToLoad.addAll(Arrays.asList(txToLoad));\n\n        // Load the records from files to the memory graphs store\n        log.debug(\"Loading logs in this order: {}\", logsToLoad);\n\n        LoadTask loadTask;\n        try {\n            loadTask = new LoadTask(\n                    logsToLoad.toArray(new CommittableFileLog[0]),\n                    (MemoryGraphStore) memStore,\n                    DEFAULT_LOAD_OPS_PER_COMMIT,\n                    mapper,\n                    false);\n            loadTask.run();\n        } catch (BitsyException e) {\n            // Failed -- not try in repair mode\n            log.info(\"Loading the database failed -- Trying again in repair mode\");\n            memStore.reset();\n            loadTask = new LoadTask(\n                    logsToLoad.toArray(new CommittableFileLog[0]),\n                    (MemoryGraphStore) memStore,\n                    DEFAULT_LOAD_OPS_PER_COMMIT,\n                    mapper,\n                    true);\n            loadTask.run();\n        }\n\n        long initialVE = loadTask.getTotalVE();\n\n        loadVersionAndIndexes();\n        if (!majorVersionNumber.equals(CURRENT_MAJOR_VERSION_NUMBER)) {\n            log.error(\n                    \"Can not load database with major version number {}. Expecting major version number {}\",\n                    majorVersionNumber,\n                    CURRENT_MAJOR_VERSION_NUMBER);\n\n            throw new BitsyException(\n                    BitsyErrorCodes.MAJOR_VERSION_MISMATCH,\n                    \"Database has major version number \" + majorVersionNumber + \". Expecting major version \"\n                            + CURRENT_MAJOR_VERSION_NUMBER);\n        }\n\n        // Find out the transaction log that must be queued into first\n        BufferName txBufName = (txToLoad[1] == txA) ? BufferName.A : BufferName.B;\n        Long nextTxCounter = txToLoad[1].getCounter();\n        assert nextTxCounter != null;\n\n        // Find Tx file to flush\n        CommittableFileLog txToFlush = txToLoad[0];\n\n        // Set up the file channels / buffered streams\n        txToFlush.openForRead();\n        prepareForAppend(vToLoad);\n        prepareForAppend(eToLoad);\n\n        CompactAndCopyTask txFlushTask =\n                new CompactAndCopyTask(new CommittableFileLog[] {txToFlush}, vToLoad, eToLoad, memStore, nextTxCounter);\n        txFlushTask.run();\n        if (txFlushTask.getOutputLines() > 0) {\n            log.debug(\"Flushed partially flushed Tx Log {} to {} and {}\", txToFlush, vToLoad, eToLoad);\n        }\n\n        // Clear the TX file\n        txToFlush.openForOverwrite(logCounter++);\n\n        // Clear the unused V and E buffers\n        CommittableFileLog vToClear = (vToLoad == vA) ? vB : vA;\n        CommittableFileLog eToClear = (eToLoad == eA) ? eB : eA;\n        vToClear.openForOverwrite(null);\n        eToClear.openForOverwrite(null);\n\n        // Find latest V and E buffers\n        BufferName vBufName = (vToLoad == vA) ? BufferName.A : BufferName.B;\n        BufferName eBufName = (eToLoad == eA) ? BufferName.A : BufferName.B;\n\n        // See if for some reason, the V and E files have been swapped. This could happen if a reorg happens partially\n        if (vBufName != eBufName) {\n            // Yes. Now the edge will flip from A to B or vice versa\n            CommittableFileLog eToSave = (eToLoad == eA) ? eB : eA;\n\n            eToLoad.openForRead();\n            eToSave.openForOverwrite(logCounter++);\n\n            log.info(\"Moving out-of-sync edge file from {} to {}\", eToLoad, eToSave);\n            CompactAndCopyTask eCopyTask = new CompactAndCopyTask(\n                    new CommittableFileLog[] {eToLoad}, vToLoad, eToSave, memStore, nextTxCounter);\n            eCopyTask.run();\n\n            eToLoad.openForOverwrite(null);\n            eToLoad.close();\n        }\n\n        this.txToTxLogBuf = new DoubleBuffer<TxUnit>(\n                new BufferPotential<TxUnit>() {\n                    @Override\n                    public boolean addWork(TxUnit newWork) {\n                        return true;\n                    }\n\n                    @Override\n                    public void reset() {\n                        // Nothing to do\n                    }\n                },\n                new TxUnitFlusher(),\n                \"MemToTxLogWriter-\" + id);\n\n        this.txLogFlushPotential = new TxLogFlushPotential(txLogThreshold);\n\n        this.txLogToVEBuf = new DoubleBufferWithExecWork<ITxBatchJob>(\n                txLogFlushPotential,\n                new TxBatchQueuer(),\n                new TxBatchFlusher(),\n                \"TxFlusher-\" + id,\n                false, // Don't keep track of the list of all Txs written to log\n                false, // It is OK for the flusher and queuer to run at the same time\n                txBufName); // Start enqueuing into the Tx from the last start/stop\n\n        this.veReorgPotential = new VEObsolescencePotential(DEFAULT_MIN_LINES_BEFORE_REORG, reorgFactor, initialVE);\n        this.veReorgBuf = new DoubleBufferWithExecWork<IVeReorgJob>(\n                veReorgPotential,\n                new TxLogQueuer(),\n                new TxLogFlusher(),\n                \"VEReorg-\" + id,\n                false, // Don't keep track of the entire list of TxLogs -- too much memory\n                true, // Ensure that the flusher and queuer don't run at the same time\n                vBufName); // Start enqueuing into the V/E file from the last start/stop\n    }\n\n    public TxLogFlushPotential getTxLogFlushPotential() {\n        return txLogFlushPotential;\n    }\n\n    public VEObsolescencePotential getVEReorgPotential() {\n        return veReorgPotential;\n    }\n\n    private void loadVersionAndIndexes() {\n        CommittableFileLog inputLog = getEarlierBuffer(mA, mB);\n\n        try {\n            inputLog.openForRead();\n            String fileName = inputLog.getPath().toString();\n\n            int lineNo = 1;\n            String line;\n            while ((line = inputLog.readLine()) != null) {\n                Record rec = Record.parseRecord(line, lineNo++, fileName);\n\n                if (rec.getType() == RecordType.I) {\n                    IndexBean iBean = mapper.readValue(rec.getJson(), IndexBean.class);\n\n                    memStore.createKeyIndex(iBean.getKey(), iBean.getIndexClass());\n                } else if (rec.getType() == RecordType.M) {\n                    this.majorVersionNumber = rec.getJson();\n                } else {\n                    throw new BitsyException(\n                            BitsyErrorCodes.DATABASE_IS_CORRUPT,\n                            \"Only M and I records are valid in the metadata file. Found \" + line + \" in line number \"\n                                    + lineNo + \" of file \" + fileName);\n                }\n            }\n\n            inputLog.close();\n        } catch (Exception e) {\n            if (e instanceof BitsyException) {\n                throw (BitsyException) e;\n            } else {\n                throw new BitsyException(\n                        BitsyErrorCodes.DATABASE_IS_CORRUPT, \"Unable to load indexes due to the given exception\", e);\n            }\n        }\n    }\n\n    private void saveVersionAndIndexes() {\n        CommittableFileLog oldLog = getEarlierBuffer(mA, mB);\n        CommittableFileLog outputLog = (oldLog == mA) ? mB : mA;\n\n        try {\n            outputLog.openForOverwrite(logCounter++);\n\n            // Save the version\n            outputLog.append(Record.generateDBLine(RecordType.M, CURRENT_MAJOR_VERSION_NUMBER)\n                    .getBytes(utf8));\n\n            // Vertex indexes\n            for (String key : memStore.getIndexedKeys(Vertex.class)) {\n                IndexBean indexBean = new IndexBean(0, key);\n                byte[] line = Record.generateDBLine(RecordType.I, mapper.writeValueAsString(indexBean))\n                        .getBytes(utf8);\n                outputLog.append(line);\n            }\n\n            // Edge indexes\n            for (String key : memStore.getIndexedKeys(Edge.class)) {\n                IndexBean indexBean = new IndexBean(1, key);\n                byte[] line = Record.generateDBLine(RecordType.I, mapper.writeValueAsString(indexBean))\n                        .getBytes(utf8);\n                outputLog.append(line);\n            }\n\n            outputLog.commit();\n            outputLog.close();\n\n            oldLog.openForOverwrite(null);\n            oldLog.close();\n        } catch (Exception e) {\n            if (e instanceof BitsyException) {\n                throw (BitsyException) e;\n            } else {\n                throw new BitsyException(\n                        BitsyErrorCodes.DATABASE_IS_CORRUPT, \"Unable to load indexes due to the given exception\", e);\n            }\n        }\n    }\n\n    private CommittableFileLog[] getOrderedTxLogs(CommittableFileLog txLog1, CommittableFileLog txLog2) {\n        assert txLog1.getCounter() != null;\n        assert txLog2.getCounter() != null;\n        assert txLog1.getCounter().longValue() != txLog2.getCounter().longValue();\n\n        if (txLog1.getCounter().longValue() < txLog2.getCounter().longValue()) {\n            return new CommittableFileLog[] {txLog1, txLog2};\n        } else {\n            return new CommittableFileLog[] {txLog2, txLog1};\n        }\n    }\n\n    private CommittableFileLog getEarlierBuffer(CommittableFileLog log1, CommittableFileLog log2) {\n        if (log1.getCounter() == null) {\n            return log2;\n        } else if (log2.getCounter() == null) {\n            return log1;\n        } else {\n            assert log1.getCounter().longValue() != log2.getCounter().longValue();\n\n            return (log1.getCounter().longValue() < log2.getCounter().longValue()) ? log1 : log2;\n        }\n    }\n\n    public String toString() {\n        return \"FileBackedMemoryGraphStore-\" + id + \"(path = \" + dbPath + \")\";\n    }\n\n    public void shutdown() {\n        log.info(\"Stopping graph {}\", toString());\n        this.txLogToVEBuf.stop(JOIN_TIMEOUT);\n        this.veReorgBuf.stop(JOIN_TIMEOUT);\n        this.txToTxLogBuf.stop(JOIN_TIMEOUT);\n\n        txA.close();\n        txB.close();\n        vA.close();\n        vB.close();\n        eA.close();\n        eB.close();\n        mA.close();\n        mB.close();\n\n        this.memStore.shutdown();\n    }\n\n    private CommittableFileLog openFileLog(String fileName, boolean isTxLog) throws BitsyException {\n        Path toOpen = dbPath.resolve(fileName);\n        try {\n            CommittableFileLog cfl = new CommittableFileLog(toOpen, isTxLog);\n\n            // First check if the file exists\n            if (!cfl.exists()) {\n                // Otherwise create it using openForOverwrite\n                cfl.openForOverwrite(logCounter++);\n\n                // Set the version for meta files\n                if (fileName.startsWith(META_PREFIX)) {\n                    cfl.append(Record.generateDBLine(RecordType.M, CURRENT_MAJOR_VERSION_NUMBER)\n                            .getBytes(utf8));\n                }\n\n                cfl.close();\n            }\n\n            // Then open for read\n            cfl.openForRead();\n\n            log.debug(\"Checking file: {} with log counter {}. Size = {}\", cfl.getPath(), cfl.getCounter(), cfl.size());\n\n            if ((cfl.getCounter() != null) && (cfl.getCounter().longValue() >= logCounter)) {\n                this.logCounter = cfl.getCounter().longValue() + 1;\n            }\n\n            return cfl;\n        } catch (IOException e) {\n            throw new BitsyException(BitsyErrorCodes.ERROR_INITIALIZING_DB_FILES, \"File: \" + toOpen, e);\n        }\n    }\n\n    private void prepareForAppend(CommittableFileLog cfl) {\n        if (cfl.getCounter() == null) {\n            // An empty file. Need to write the header first\n            log.debug(\"Overwriting file: {}\", cfl);\n            cfl.openForOverwrite(logCounter++);\n        } else {\n            cfl.openForAppend();\n        }\n    }\n\n    @Override\n    public VertexBean getVertex(UUID id) {\n        return memStore.getVertex(id);\n    }\n\n    @Override\n    public EdgeBean getEdge(UUID id) {\n        return memStore.getEdge(id);\n    }\n\n    @Override\n    public BitsyVertex getBitsyVertex(BitsyTransaction tx, UUID id) {\n        return memStore.getBitsyVertex(tx, id);\n    }\n\n    @Override\n    public BitsyEdge getBitsyEdge(BitsyTransaction tx, UUID id) {\n        return memStore.getBitsyEdge(tx, id);\n    }\n\n    @Override\n    public List<EdgeBean> getEdges(UUID vertexId, Direction dir, String[] edgeLabels) {\n        return memStore.getEdges(vertexId, dir, edgeLabels);\n    }\n\n    @Override\n    public void commit(ICommitChanges changes) {\n        if ((changes.getVertexChanges().size() == 0)\n                && (changes.getEdgeChanges().size() == 0)) {\n            return;\n        }\n\n        // Phase I: Serialize the objects to make sure that they can go into the file\n        TxUnit txw;\n        StringWriter lineOutput = new StringWriter(); // Reused for vertex and edge lines\n        try {\n            StringWriter vWriter = new StringWriter();\n            for (BitsyVertex v : changes.getVertexChanges()) {\n                // Increment the version before the commit\n                v.incrementVersion();\n\n                VertexBeanJson vBean = v.asJsonBean();\n                // vWriter.write(Record.generateDBLine(RecordType.V, mapper.writeValueAsString(vBean)));\n\n                Record.generateVertexLine(lineOutput, mapper, vBean);\n                vWriter.write(lineOutput.toString());\n            }\n\n            StringWriter eWriter = new StringWriter();\n            for (BitsyEdge e : changes.getEdgeChanges()) {\n                // Increment the version before the commit\n                e.incrementVersion();\n\n                EdgeBeanJson eBean = e.asJsonBean();\n                // eWriter.write(Record.generateDBLine(RecordType.E, mapper.writeValueAsString(eBean)));\n\n                Record.generateEdgeLine(lineOutput, mapper, eBean);\n                eWriter.write(lineOutput.toString());\n            }\n\n            byte[] vBytes = vWriter.getBuffer().toString().getBytes(utf8);\n            byte[] eBytes = eWriter.getBuffer().toString().getBytes(utf8);\n\n            // Transaction boundary. Has a random integer and its hashcode to verify end of Tx.\n            byte[] tBytes =\n                    Record.generateDBLine(RecordType.T, \"\" + rand.nextInt()).getBytes(utf8);\n\n            txw = new TxUnit(ByteBuffer.wrap(vBytes), ByteBuffer.wrap(eBytes), ByteBuffer.wrap(tBytes));\n        } catch (JsonProcessingException e) {\n            throw new BitsyException(BitsyErrorCodes.SERIALIZATION_ERROR, \"Encountered error\", e);\n        } catch (IOException e) {\n            throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Unable to serialize to StringBuffer\", e);\n        }\n\n        // Phase II: Update the memory store and push the commits to the double\n        // buffer. The write-lock inside the commit() is active during the call to\n        // add the transaction to the buffer. This ensures that the transactions\n        // are written in the same order as they enter the memory store.\n        final TxUnit txwf = txw;\n\n        // Note that the memory store reject the transaction by throwing an exception, such as BitsyRetryException\n        memStore.commit(changes, false, new Runnable() {\n            @Override\n            public void run() {\n                txToTxLogBuf.addWork(txwf);\n            }\n        });\n\n        // Phase III: Push the commits through\n        try {\n            txw.getCountDownLatch().await();\n        } catch (InterruptedException e) {\n            BitsyException toThrow = new BitsyException(\n                    BitsyErrorCodes.TRANSACTION_INTERRUPTED,\n                    \"Exception while waiting for transaction log to commit\",\n                    e);\n\n            log.error(\"Error while committing transaction\", toThrow);\n\n            throw toThrow;\n        }\n\n        BitsyException toThrow = txw.getException();\n        if (toThrow != null) {\n            throw toThrow;\n        }\n    }\n\n    /** This method flushes the transaction log to the V/E text files */\n    public void flushTxLog() {\n        synchronized (flushCompleteSignal) {\n            BufferName enqueueBuffer;\n            synchronized (txLogToVEBuf.getPot()) {\n                // Enqueue the backup task\n                enqueueBuffer = txLogToVEBuf.getEnqueueBuffer();\n                FlushNowJob flushJob = new FlushNowJob();\n                txLogToVEBuf.addAndExecuteWork(flushJob);\n            }\n\n            try {\n                do {\n                    log.debug(\"Waiting for flush to complete in buffer {}\", enqueueBuffer);\n                    flushCompleteSignal.wait();\n                    log.debug(\"Flush complete in buffer {}\", lastFlushedBuffer);\n                } while (lastFlushedBuffer != enqueueBuffer);\n            } catch (InterruptedException e) {\n                BitsyException toThrow = new BitsyException(\n                        BitsyErrorCodes.FLUSH_INTERRUPTED,\n                        \"Exception while waiting for a transaction-log flush to be performed\",\n                        e);\n\n                log.error(\"Error while flushing the transaction log\", toThrow);\n\n                throw toThrow;\n            }\n        }\n    }\n\n    /** This method backs up the database while it is still operational. Only one backup can be in progress at a time.\n     *\n     * @param backupDir directory to which the database must be backed up.\n     */\n    public void backup(Path backupDir) {\n        if (!backupInProgress.compareAndSet(false, true)) {\n            throw new BitsyException(BitsyErrorCodes.BACKUP_IN_PROGRESS);\n        } else {\n            try {\n                File backupDirFile = backupDir.toFile();\n\n                if (!backupDirFile.isDirectory()) {\n                    throw new BitsyException(\n                            BitsyErrorCodes.BAD_BACKUP_PATH, \"Expecting \" + backupDir + \" to be a folder\");\n                }\n\n                // Flush the transaction buffer\n                flushTxLog();\n\n                // Enqueue the backup task\n                BackupJob backupJob = new BackupJob(backupDir);\n                veReorgBuf.addAndExecuteWork(backupJob);\n\n                // Wait for the response\n                try {\n                    backupJob.getCountDownLatch().await();\n                } catch (InterruptedException e) {\n                    BitsyException toThrow = new BitsyException(\n                            BitsyErrorCodes.BACKUP_INTERRUPTED,\n                            \"Exception while waiting for a backup to be performed\",\n                            e);\n\n                    log.error(\"Error while backing up the database\", toThrow);\n\n                    throw toThrow;\n                }\n\n                BitsyException toThrow = backupJob.getException();\n                if (toThrow != null) {\n                    throw toThrow;\n                }\n            } finally {\n                backupInProgress.set(false);\n            }\n        }\n    }\n\n    /** This class represents a \"flush-now\" action on the transaction log */\n    public class FlushNowJob implements ITxBatchJob {}\n\n    /** This class handles the flushing of the Memory to TxLog double buffer */\n    public class TxUnitFlusher implements BufferFlusher<TxUnit> {\n        @Override\n        public void flushBuffer(BufferName bufName, final List<TxUnit> workList)\n                throws BitsyException, InterruptedException {\n            // Queue the batch of transactions into the transaction log\n            txLogToVEBuf.addAndExecuteWork(new TxBatch(workList));\n        }\n    }\n\n    /** This class handles the queueing of the TxLog to VE files double buffer, which performs the actual work of the TxLogWriteFlusher */\n    public class TxBatchQueuer implements BufferQueuer<ITxBatchJob> {\n        @Override\n        public void onQueue(BufferName bufName, ITxBatchJob batchJob) throws BitsyException {\n            if (batchJob instanceof FlushNowJob) {\n                // Nothing to do -- the flush will be automatically triggered by TxLogFlush\n            } else if (!(batchJob instanceof TxBatch)) {\n                log.error(\"Unsupported type of work in TxLogFlushPotential: {}\", batchJob.getClass());\n            } else {\n                TxBatch trans = (TxBatch) batchJob;\n\n                CommittableFileLog cfl = (bufName == BufferName.A) ? txA : txB;\n\n                prepareForAppend(cfl);\n\n                BitsyException bex = null;\n                try {\n                    int size = 0;\n                    for (TxUnit work : trans.getTxUnitList()) {\n                        size += work.writeToFile(cfl);\n                    }\n\n                    // Force the contents into the TA/B file\n                    cfl.commit();\n\n                    // Set the size to calculate potential\n                    trans.setSize(size);\n\n                    log.trace(\"Wrote {} bytes to {}\", size, cfl.getPath());\n                } catch (BitsyException e) {\n                    bex = e;\n                    throw e;\n                } finally {\n                    // Done with the write -- others can proceed\n                    for (TxUnit work : trans.getTxUnitList()) {\n                        if (bex != null) {\n                            work.setException(bex);\n                        }\n\n                        // Whether/not the operation was successful, the work can not be redone\n                        work.getCountDownLatch().countDown();\n                    }\n                }\n            }\n        }\n    }\n\n    /** This class handles the flushing of TxLog to VE double buffer */\n    public class TxBatchFlusher implements BufferFlusher<ITxBatchJob> {\n        @Override\n        public void flushBuffer(BufferName bufName, List<ITxBatchJob> x) throws BitsyException {\n            // Write the transaction log to the appropriate V/E files\n            CommittableFileLog txLogToFlush = (bufName == BufferName.A) ? txA : txB;\n            veReorgBuf.addAndExecuteWork(new TxLog(txLogToFlush));\n\n            synchronized (flushCompleteSignal) {\n                // An explicit flush operation using flushTxLog() will wait for this signal\n                lastFlushedBuffer = bufName;\n                log.debug(\"Tx log in buffer {} has been flushed\", lastFlushedBuffer);\n                flushCompleteSignal.notifyAll();\n            }\n        }\n    }\n\n    /** This class handles the queueing of the TxLog to VE files double buffer, which performs the actual work of the TxLogWriteFlusher */\n    public class TxLogQueuer implements BufferQueuer<IVeReorgJob> {\n        @Override\n        public void onQueue(BufferName bufName, IVeReorgJob job) throws BitsyException {\n            CommittableFileLog cflV = (bufName == BufferName.A) ? vA : vB;\n            CommittableFileLog cflE = (bufName == BufferName.A) ? eA : eB;\n\n            if (job instanceof TxLog) {\n                // A transaction log must be flushed to V/E text files\n                TxLog txLog = (TxLog) job;\n                CommittableFileLog inputLog = txLog.getCommittableFileLog();\n                CommittableFileLog otherTxLog = (inputLog == txA) ? txB : txA;\n\n                prepareForAppend(cflV);\n                prepareForAppend(cflE);\n\n                inputLog.openForRead();\n\n                // Move and compact the transaction log into the vertex and edge logs\n                Long nextTxCounter = otherTxLog.getCounter();\n                assert nextTxCounter != null;\n\n                CompactAndCopyTask cp = new CompactAndCopyTask(\n                        new CommittableFileLog[] {inputLog}, cflV, cflE, memStore, nextTxCounter);\n                cp.run();\n\n                log.debug(\"Done writing to: {} of size {}\", cflV.getPath(), cflV.size());\n                log.debug(\"Done writing to: {} of size {}\", cflE.getPath(), cflE.size());\n\n                txLog.setReorgPotDiff(cp.getOutputLines());\n\n                // Zap the txLog for the next flush\n                log.debug(\"Zapping transaction log {}\", inputLog);\n                inputLog.openForOverwrite(logCounter++);\n\n            } else if (job instanceof BackupJob) {\n                // A backup of V/E text files must be performed\n                BackupJob backupJob = (BackupJob) job;\n                Path backupDir = backupJob.getBackupDir();\n\n                try {\n                    // 1. Create empty tx logs\n                    Long txACounter = txA.getCounter();\n                    CommittableFileLog cflOutA = new CommittableFileLog(backupDir.resolve(Paths.get(TX_A_TXT)), true);\n                    cflOutA.openForOverwrite(txACounter);\n                    cflOutA.close();\n\n                    Long txBCounter = txB.getCounter();\n                    CommittableFileLog cflOutB = new CommittableFileLog(backupDir.resolve(Paths.get(TX_B_TXT)), true);\n                    cflOutB.openForOverwrite(txBCounter);\n                    cflOutB.close();\n\n                    // 2. Copy V?.txt to VA.txt\n                    cflV.close();\n                    Path sourceV = cflV.getPath();\n                    Path targetV = backupDir.resolve(Paths.get(V_A_TXT));\n\n                    log.debug(\"Copying {} to {}\", sourceV, targetV);\n                    Files.copy(sourceV, targetV, StandardCopyOption.REPLACE_EXISTING);\n\n                    // 3. Copy E?.txt to EA.txt\n                    cflE.close();\n                    Path sourceE = cflE.getPath();\n                    Path targetE = backupDir.resolve(Paths.get(E_A_TXT));\n\n                    log.debug(\"Copying {} to {}\", sourceE, targetE);\n                    Files.copy(sourceE, targetE, StandardCopyOption.REPLACE_EXISTING);\n\n                    // 4. Copy meta?.txt to metaA.txt --  -- all metadata file ops are synchronized on the mA object\n                    synchronized (mA) {\n                        // Index copy must be synchronized on this class\n                        CommittableFileLog cflM = getEarlierBuffer(mA, mB);\n                        cflM.close();\n                        Path sourceM = cflM.getPath();\n                        Path targetM = backupDir.resolve(Paths.get(META_A_TXT));\n\n                        log.debug(\"Copying {} to {}\", sourceM, targetM);\n                        Files.copy(sourceM, targetM, StandardCopyOption.REPLACE_EXISTING);\n                    }\n                } catch (Exception e) {\n                    backupJob.setException(new BitsyException(\n                            BitsyErrorCodes.BACKUP_FAILED,\n                            \"Encountered exception while backing up the database to \" + backupDir,\n                            e));\n                } finally {\n                    backupJob.getCountDownLatch().countDown();\n                }\n\n                log.info(\"Completed backup to directory {}\", backupDir);\n            }\n        }\n    }\n\n    /** This class handles the reorganization of the V and E A/B files */\n    public class TxLogFlusher implements BufferFlusher<IVeReorgJob> {\n        @Override\n        public void flushBuffer(BufferName bufName, List<IVeReorgJob> x) throws BitsyException {\n            CommittableFileLog sourceV = (bufName == BufferName.A) ? vA : vB;\n            CommittableFileLog sourceE = (bufName == BufferName.A) ? eA : eB;\n\n            CommittableFileLog targetV = (bufName == BufferName.B) ? vA : vB;\n            CommittableFileLog targetE = (bufName == BufferName.B) ? eA : eB;\n\n            log.debug(\n                    \"Re-organizing {} and {} into {} and {} respectively\",\n                    sourceV.getPath(),\n                    sourceE.getPath(),\n                    targetV.getPath(),\n                    targetE.getPath());\n\n            // Open the source files for reading\n            sourceV.openForRead();\n            sourceE.openForRead();\n\n            // Clear the target files and set the proper counter in the header\n            targetV.openForOverwrite(logCounter++);\n            targetE.openForOverwrite(logCounter++);\n\n            // Find the lesser of the two counters -- synchronization is not\n            // needed because tx logs can't be flushed in the middle of a re-org\n            Long nextTxCounter = getEarlierBuffer(txA, txB).getCounter();\n            assert (nextTxCounter != null);\n\n            // Move and compact the source V/E files into the target V/E files\n            CompactAndCopyTask cp = new CompactAndCopyTask(\n                    new CommittableFileLog[] {sourceV, sourceE}, targetV, targetE, memStore, nextTxCounter);\n            cp.run();\n\n            log.debug(\"Done writing to: {}. Post-reorg size {}\", targetV.getPath(), targetV.size());\n            log.debug(\"Done writing to: {}. Post-reorg size {}\", targetE.getPath(), targetE.size());\n\n            // Zap the source files for the next flush, and close them\n            sourceV.openForOverwrite(null);\n            sourceE.openForOverwrite(null);\n            sourceV.close();\n            sourceE.close();\n\n            veReorgPotential.setOrigLines(cp.getOutputLines());\n        }\n    }\n\n    @Override\n    public Collection<VertexBean> getAllVertices() {\n        return memStore.getAllVertices();\n    }\n\n    @Override\n    public Collection<EdgeBean> getAllEdges() {\n        return memStore.getAllEdges();\n    }\n\n    @Override\n    public synchronized <T extends Element> void createKeyIndex(String key, Class<T> elementType) {\n        memStore.createKeyIndex(key, elementType);\n\n        // Rewrite the metadata file -- all metadata file ops are synchronized on the mA object\n        synchronized (mA) {\n            saveVersionAndIndexes();\n        }\n    }\n\n    @Override\n    public <T extends Element> void dropKeyIndex(String key, Class<T> elementType) {\n        memStore.dropKeyIndex(key, elementType);\n\n        // Rewrite the metadata file -- all metadata file ops are synchronized on the mA object\n        synchronized (mA) {\n            saveVersionAndIndexes();\n        }\n    }\n\n    @Override\n    public <T extends Element> Set<String> getIndexedKeys(Class<T> elementType) {\n        return memStore.getIndexedKeys(elementType);\n    }\n\n    @Override\n    public Collection<VertexBean> lookupVertices(String key, Object value) {\n        return memStore.lookupVertices(key, value);\n    }\n\n    @Override\n    public Collection<EdgeBean> lookupEdges(String key, Object value) {\n        return memStore.lookupEdges(key, value);\n    }\n\n    @Override\n    public boolean allowFullGraphScans() {\n        return memStore.allowFullGraphScans();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/IEdgeRemover.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.IEdge;\nimport com.lambdazen.bitsy.UUID;\n\npublic interface IEdgeRemover {\n    public IEdge removeEdge(UUID id);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/IStringCanonicalizer.java",
    "content": "package com.lambdazen.bitsy.store;\n\npublic interface IStringCanonicalizer {\n    public String canonicalize(String str);\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/ITxBatchJob.java",
    "content": "package com.lambdazen.bitsy.store;\n\npublic interface ITxBatchJob {}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/IVeReorgJob.java",
    "content": "package com.lambdazen.bitsy.store;\n\npublic interface IVeReorgJob {}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/IndexBean.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\n@JsonPropertyOrder({\"type\", \"key\"})\npublic class IndexBean {\n    int type;\n    String key;\n\n    @JsonCreator\n    public IndexBean(@JsonProperty(\"type\") int type, @JsonProperty(\"key\") String key) {\n        this.type = type;\n        this.key = key;\n    }\n\n    @JsonProperty(\"type\")\n    public int getType() {\n        return type;\n    }\n\n    @JsonProperty(\"key\")\n    public String getKey() {\n        return key;\n    }\n\n    @JsonIgnore\n    public Class getIndexClass() {\n        if (type == 0) {\n            return Vertex.class;\n        } else if (type == 1) {\n            return Edge.class;\n        } else {\n            throw new BitsyException(BitsyErrorCodes.DATABASE_IS_CORRUPT, \"Unrecognized index type \" + type);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/JobWithCountDownLatch.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport java.util.concurrent.CountDownLatch;\n\npublic class JobWithCountDownLatch {\n    CountDownLatch cdl;\n\n    public JobWithCountDownLatch() {\n        this.cdl = new CountDownLatch(1);\n    }\n\n    public CountDownLatch getCountDownLatch() {\n        return cdl;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/LoadTask.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport com.lambdazen.bitsy.util.DefaultCommitChanges;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * This class loads a list of input files to an (empty) graph store, which is\n * typically an in-memory store\n */\npublic class LoadTask implements Runnable {\n    private static final Logger log = LoggerFactory.getLogger(LoadTask.class);\n\n    /** Files larger than this setting (default 1MB) will use parallel record reader. Can be changed by the application */\n    public static long MIN_SIZE_FOR_PARALLEL_LOADER = 1024 * 1024;\n\n    CommittableFileLog[] inputs;\n    MemoryGraphStore store;\n    long totalVE;\n    int opsPerNonTxCommit;\n    ObjectMapper mapper;\n    ObjectReader vReader, eReader;\n    boolean repairMode;\n\n    public LoadTask(\n            CommittableFileLog[] inputs,\n            MemoryGraphStore store,\n            int opsPerNonTxCommit,\n            ObjectMapper mapper,\n            boolean safeMode) {\n        this.inputs = inputs;\n        this.store = store;\n        this.totalVE = 0;\n        this.opsPerNonTxCommit = opsPerNonTxCommit;\n        this.mapper = mapper;\n        this.vReader = mapper.readerFor(VertexBeanJson.class);\n        this.eReader = mapper.readerFor(EdgeBeanJson.class);\n        this.repairMode = safeMode;\n    }\n\n    public long getTotalVE() {\n        return totalVE;\n    }\n\n    public void run() {\n        IStringCanonicalizer canonicalizer = new SingleThreadedStringCanonicalizer();\n\n        // Find the minimum counter among transaction logs which marks the end of an incomplete V/E txt file\n        long lastTxLogNumber = Long.MAX_VALUE;\n        for (int i = 0; i < inputs.length; i++) {\n            inputs[i].openForRead();\n            if (inputs[i].isTxLog() && (lastTxLogNumber > inputs[i].getCounter())) {\n                lastTxLogNumber = inputs[i].getCounter().longValue();\n            }\n        }\n\n        // Loop through files and load them\n        BitsyException toThrow = null;\n        for (int i = 0; i < inputs.length; i++) {\n            CommittableFileLog inputLog = inputs[i];\n\n            String fileName = inputLog.getPath().toString();\n            int lineNo = 1; // Start with 1 because the header is the counter\n\n            boolean isTxLog = inputLog.isTxLog();\n\n            RecordReader recordReader;\n            boolean usingSerialLoader;\n            if (repairMode || isTxLog || (inputLog.size() < MIN_SIZE_FOR_PARALLEL_LOADER)) {\n                log.debug(\"Using RecordReader for {}\", inputLog);\n                recordReader = new RecordReader(inputLog, vReader, eReader);\n                usingSerialLoader = true;\n            } else {\n                log.debug(\"Using ParallelRecordReader for {}\", inputLog);\n                recordReader = new ParallelRecordReader(inputLog, 10000, vReader, eReader);\n                usingSerialLoader = false;\n            }\n\n            DefaultCommitChanges cc = new DefaultCommitChanges();\n            try {\n                Record rec;\n                while ((rec = recordReader.next()) != null) {\n                    // log.debug(\"Loading line: {}\", rec.getJson());\n                    lineNo++;\n\n                    // Logic to commit\n                    if (isTxLog) {\n                        // Commit only on Tx records. This is to ensure that the last bad Tx (if one exists) doesn't get\n                        // loaded\n                        if (rec.getType() == RecordType.T) {\n                            // Keep track of this line in case we run into an error later\n                            if (usingSerialLoader) {\n                                inputLog.mark();\n                            }\n\n                            // Commit the changes\n                            this.totalVE += store.saveChanges(cc, canonicalizer);\n\n                            cc.reset();\n\n                            // Process the next line in the while loop\n                            continue;\n                        }\n                    }\n\n                    // Insert/update V and E records\n                    switch (rec.getType()) {\n                        case L:\n                            // This only happens for non-transactional logs\n                            if (isTxLog) {\n                                throw new BitsyException(\n                                        BitsyErrorCodes.INTERNAL_ERROR,\n                                        \"Found an unexpected log (L) record in file \" + fileName + \" at line \"\n                                                + lineNo);\n                            }\n\n                            // If the record matches the last Tx, it must be truncated now.\n                            if (Long.parseLong(rec.getJson()) == lastTxLogNumber) {\n                                // Mark the L record's end to truncate\n                                if (usingSerialLoader) {\n                                    inputLog.mark();\n                                }\n\n                                // Check to see if this is the last line -- otherwise, the file must be truncated here\n                                if (recordReader.next() == null) {\n                                    // All OK\n                                    continue;\n                                } else {\n                                    // And throw an exception to trigger the truncate\n                                    throw new BitsyException(\n                                            BitsyErrorCodes.INCOMPLETE_TX_FLUSH,\n                                            \"File \" + inputLog + \" has an L record in line \" + lineNo\n                                                    + \" with the last valid Tx log number \" + lastTxLogNumber);\n                                }\n                            }\n                            break;\n\n                        case T:\n                            throw new BitsyException(\n                                    BitsyErrorCodes.INTERNAL_ERROR,\n                                    \"Found an unexpected transaction (T) record in file \" + fileName + \" at line \"\n                                            + lineNo);\n\n                        case E:\n                            BitsyEdge edge = rec.getEdge();\n                            if (isTxLog) {\n                                // Add to commit log\n                                cc.changeEdge(edge);\n                            } else {\n                                // Directly save into the store\n                                totalVE = store.saveEdge(totalVE, edge, canonicalizer);\n                            }\n                            break;\n\n                        case V:\n                            BitsyVertex vertex = rec.getVertex();\n                            if (isTxLog) {\n                                // Add to commit log\n                                cc.changeVertex(vertex);\n                            } else {\n                                // Directly save into the store\n                                totalVE = store.saveVertex(totalVE, vertex, canonicalizer);\n                            }\n                            break;\n\n                        default:\n                            throw new BitsyException(\n                                    BitsyErrorCodes.INTERNAL_ERROR,\n                                    \"Unhandled record type \" + rec.getType() + \" in file \" + fileName + \" at line \"\n                                            + lineNo);\n                    }\n                }\n\n                // For Tx logs, rollback at the end (incomplete Tx). Otherwise commit.\n                if (isTxLog) {\n                    // Throw away the commit changes\n                    int vCount = cc.getVertexChanges().size();\n                    int eCount = cc.getEdgeChanges().size();\n                    if ((vCount > 0) || (eCount > 0)) {\n                        assert isTxLog;\n\n                        log.warn(\n                                \"Throwing away {} vertices and {} edges that were not successfully committed\",\n                                vCount,\n                                eCount);\n\n                        if (inputLog.getMarkPosition() > 0) {\n                            inputLog.truncateAtMark();\n                        }\n\n                        log.info(\"Recovery of {} is complete\", fileName);\n                    }\n                } else {\n                    this.totalVE += store.saveChanges(cc, canonicalizer);\n                    cc.reset();\n                }\n            } catch (Exception e) {\n                if (usingSerialLoader && isTxLog) {\n                    // Fix the TX Log\n                    log.warn(\"Recovering from exception while loading from file \" + fileName + \" at line \" + lineNo, e);\n\n                    if (inputLog.getMarkPosition() == -1) {\n                        inputLog.openForOverwrite(inputLog.getCounter());\n                        log.warn(\"Zapped file {} to recover from error\", fileName);\n                    } else {\n                        // Truncate will log the warning\n                        inputLog.truncateAtMark();\n                    }\n\n                    log.info(\"Recovery of {} is complete\", fileName);\n\n                    // Since this is the last file, we can return\n                    return;\n                }\n\n                if (usingSerialLoader\n                        && (e instanceof BitsyException)\n                        && (((BitsyException) e).getErrorCode() == BitsyErrorCodes.INCOMPLETE_TX_FLUSH)) {\n                    // Fix the V/E log\n                    assert !isTxLog : \"Only loading V/E logs can throw INCOMPLETE_TX_FLUSH exception\";\n\n                    log.warn(\"Recovering from an incomplete flush operation from a transactional log\", e);\n\n                    // A Tx flush was not complete\n                    inputLog.truncateAtMark();\n\n                    log.info(\"Recovery of {} is complete\", fileName);\n\n                    // Continue to the next file in the for loop\n                } else {\n                    // Unrecoverable exception\n                    toThrow = new BitsyException(\n                            BitsyErrorCodes.DATABASE_IS_CORRUPT,\n                            \"The database files are corrupt. Please restore a backup version\",\n                            e);\n\n                    if (repairMode) {\n                        log.error(\"Encountered an unrecoverable exception while loading the database\", toThrow);\n                    } else {\n                        log.info(\"Encountered exception while loading without the repair mode\", e);\n                        throw toThrow;\n                    }\n                }\n            } finally {\n                // Close is in finally to make sure that the input files are closed before next reorg\n                try {\n                    inputLog.close();\n                } catch (BitsyException e) {\n                    if (toThrow != null) {\n                        toThrow = e;\n                    }\n                }\n            }\n\n            if (toThrow != null) {\n                throw toThrow;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/MemoryGraphStore.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyRetryException;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport com.lambdazen.bitsy.IEdge;\nimport com.lambdazen.bitsy.IGraphStore;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.index.EdgeIndexMap;\nimport com.lambdazen.bitsy.index.VertexIndexMap;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.ConcurrentHashMap;\nimport java.util.concurrent.atomic.AtomicLong;\nimport java.util.concurrent.locks.ReadWriteLock;\nimport java.util.concurrent.locks.ReentrantReadWriteLock;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Element;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\n/**\n * This class implements a MapDB-backed store for a graph, along with its key\n * indexes.\n */\npublic class MemoryGraphStore implements IGraphStore {\n    //    private static final Logger log = LoggerFactory.getLogger(MemoryGraphStore.class);\n\n    private static final int MAX_COUNTER_INCREASE_BEFORE_READ_LOCK =\n            2 * 5; // After 5 writes go through, the reader will lock\n    private static final int MAX_RETRIES_BEFORE_READ_LOCK = 3; // After 3 writes go through, the reader will lock\n\n    private ReadWriteLock rwLock;\n\n    private AtomicLong spinCounter;\n\n    private Map<UUID, VertexBean> vertices;\n\n    // Map from VertexBean.getUUID().hashCode() -> VertexBean\n    private Map<UUID, EdgeBean> edges;\n\n    private AdjacencyMapForBeans adjMap;\n    private VertexIndexMap vIndexMap;\n    private EdgeIndexMap eIndexMap;\n    private boolean allowFullGraphScans;\n\n    public MemoryGraphStore(boolean allowFullGraphScans) {\n        this.rwLock = new ReentrantReadWriteLock(true);\n        this.allowFullGraphScans = allowFullGraphScans;\n        this.spinCounter = new AtomicLong(0);\n\n        reset();\n    }\n\n    protected void reset() {\n        this.vertices = new ConcurrentHashMap<UUID, VertexBean>();\n        this.edges = new ConcurrentHashMap<UUID, EdgeBean>();\n\n        this.adjMap = new AdjacencyMapForBeans(false, new IEdgeRemover() {\n            @Override\n            public IEdge removeEdge(UUID id) {\n                return edges.remove(id);\n            }\n        });\n        this.vIndexMap = new VertexIndexMap();\n        this.eIndexMap = new EdgeIndexMap();\n    }\n\n    @Override\n    public boolean allowFullGraphScans() {\n        return allowFullGraphScans;\n    }\n\n    /**\n     * This method commits a set of changes. It requires a write lock on the Map\n     * DB.\n     */\n    public void commit(ICommitChanges changes) {\n        commit(changes, true, null);\n    }\n\n    // This method is called with incrementVersions=false from\n    // FileBackedMemoryGraphStore\n    public void commit(ICommitChanges changes, boolean incrementVersions, Runnable r) {\n        beginWrite();\n\n        try {\n            checkForConcurrentModifications(changes, incrementVersions);\n\n            saveChanges(changes);\n\n            if (r != null) {\n                r.run();\n            }\n        } finally {\n            endWrite();\n        }\n    }\n\n    private void beginWrite() {\n        rwLock.writeLock().lock();\n\n        // There is a possibility that the counter is odd. This happens when a\n        // writer thread is done unlocking, but not done incrementing the\n        // counter. Calling beginRead() ensures that the counter is even\n        RetryDetails retryDetails = new RetryDetails();\n        beginRead(retryDetails, false);\n\n        assert (retryDetails.counter & 1L) == 0L : \"Bug in beginRead -- counter is odd!\"; // must be even\n        long newCounter = (retryDetails.counter + 1) & 0x3fffffffffffffffL; // Don't let it go negative\n\n        boolean updated = spinCounter.compareAndSet(retryDetails.counter, newCounter);\n        assert updated : \"Someone messed with an even counter without a lock!\";\n    }\n\n    private void endWrite() {\n        // Unlock first -- this creates the synchronization barrier ensuring\n        // that all writes are visible to readers\n        rwLock.writeLock().unlock();\n\n        // Now increment the counter allowing readers & writers to proceed\n        // At this point -- both readers and writers will wait till the counter\n        // turns even\n        long counter = spinCounter.get();\n        assert (counter & 1L) == 1L : \"Some writer did not leave the counter odd!\"; // must be odd\n        long newCounter = (counter + 1) & 0x3fffffffffffffffL; // Don't let it go negative\n\n        boolean updated = spinCounter.compareAndSet(counter, newCounter);\n        assert updated : \"Someone messed with the counter without a lock!\";\n    }\n\n    private void beginRead(RetryDetails retryDetails, boolean degradeToReadLock) {\n        // Counter can't be -1 because the read lock will always succeed\n        assert (retryDetails.counter != -1);\n\n        while ((retryDetails.counter & 1L) != 0L) {\n            long tryCount = retryDetails.counter - retryDetails.startCounter;\n\n            // The counter is odd -- which means that a write is in process\n            if (degradeToReadLock\n                    && ((tryCount > MAX_COUNTER_INCREASE_BEFORE_READ_LOCK)\n                            || (retryDetails.retryCount > MAX_RETRIES_BEFORE_READ_LOCK))) {\n                rwLock.readLock().lock();\n\n                retryDetails.counter = -1;\n                return;\n            }\n\n            // No work left for this thread\n            Thread.yield();\n\n            // Try again\n            retryDetails.counter = spinCounter.get();\n        }\n\n        assert ((retryDetails.counter & 1L) == 0L);\n    }\n\n    private void endRead(RetryDetails retryDetails) {\n        if (retryDetails.counter == -1) {\n            rwLock.readLock().unlock();\n        }\n    }\n\n    private boolean shouldRetryRead(RetryDetails retryDetails) {\n        // Retry if there is no read lock AND the counter doesn't match\n        if (retryDetails.counter == -1) {\n            return false;\n        }\n\n        long counter = spinCounter.get();\n        if (counter == retryDetails.counter) {\n            return false;\n        } else {\n            // Need to retry -- but keep track of the new counter\n            retryDetails.counter = counter;\n            retryDetails.retryCount++;\n            return true;\n        }\n    }\n\n    private void checkForConcurrentModifications(ICommitChanges changes, boolean incrementVersions) {\n        // Check the versions\n        for (BitsyVertex vertex : changes.getVertexChanges()) {\n            if (incrementVersions) {\n                // Increment the version before the commit\n                vertex.incrementVersion();\n            }\n\n            UUID key = (UUID) vertex.id();\n\n            switch (vertex.getState()) {\n                case U:\n                    break;\n\n                case D:\n                case M:\n                    VertexBean vb = vertices.get(key);\n                    if (vb != null && (vb.getVersion() + 1 != vertex.getVersion())) {\n                        throw new BitsyRetryException(\n                                BitsyErrorCodes.CONCURRENT_MODIFICATION,\n                                \"Vertex \" + key + \" was modified. Loaded version \" + (vertex.getVersion() - 1)\n                                        + \". Current version in DB: \" + vb.getVersion());\n                    }\n            }\n        }\n\n        // Check the versions of edge next\n        for (BitsyEdge edge : changes.getEdgeChanges()) {\n            if (incrementVersions) {\n                // Increment the version before the commit\n                edge.incrementVersion();\n            }\n\n            UUID key = (UUID) edge.id();\n\n            switch (edge.getState()) {\n                case U:\n                    break;\n\n                case D:\n                case M:\n                    EdgeBean eb = edges.get(key);\n                    if (eb != null && (eb.getVersion() + 1) != edge.getVersion()) {\n                        throw new BitsyRetryException(\n                                BitsyErrorCodes.CONCURRENT_MODIFICATION,\n                                \"Edge \" + key + \" was modified. Loaded version \" + (edge.getVersion() - 1)\n                                        + \". Current version in DB: \" + eb.getVersion());\n                    }\n            }\n        }\n    }\n\n    protected long saveChanges(ICommitChanges changes) {\n        return saveChanges(changes, null);\n    }\n\n    // This method is used by commit (with increment option) and the initial\n    // load from DB (without increment option)\n    protected long saveChanges(ICommitChanges changes, IStringCanonicalizer canonicalizer) {\n        long addedVE = 0;\n\n        // All OK. Update vertex\n        for (BitsyVertex vertex : changes.getVertexChanges()) {\n            addedVE = saveVertex(addedVE, vertex, canonicalizer);\n        }\n\n        // Process the edges next\n        for (BitsyEdge edge : changes.getEdgeChanges()) {\n            addedVE = saveEdge(addedVE, edge, canonicalizer);\n        }\n\n        return addedVE;\n    }\n\n    protected long saveEdge(long addedVE, BitsyEdge edge, IStringCanonicalizer canonicalizer) {\n        UUID key = (UUID) edge.id();\n\n        switch (edge.getState()) {\n            case U:\n                break;\n\n            case D:\n                eIndexMap.remove(edges.get(key));\n                // log.debug(\"Removing edge {}\", edge.getId());\n\n                // Remove this edge from incoming and outgoing vertices\n                EdgeBean eBeanToRemove = edges.remove(key);\n                adjMap.removeEdgeWithoutCallback(eBeanToRemove);\n                addedVE--;\n\n                break;\n\n            case M:\n                EdgeBean eBean = (canonicalizer == null) ? asBean(edge) : asBean(edge, canonicalizer);\n                if (eBean == null) {\n                    // log.debug(\"Skipping edge {}\", edge.getId());\n                } else {\n                    // log.debug(\"Modifying edge {}\", edge.getId());\n                    EdgeBean oldEBean = edges.get(key);\n                    eIndexMap.remove(oldEBean);\n                    eIndexMap.add(eBean);\n\n                    EdgeBean oldEBean2 = edges.put(eBean, eBean);\n\n                    // NOTE: Because this is a write operation, there is an\n                    // exclusive lock -- no one else is updating eIndexMap\n                    assert (oldEBean == oldEBean2);\n\n                    if (oldEBean != null) {\n                        adjMap.removeEdgeWithoutCallback(oldEBean); // Don't callback\n                    } else {\n                        addedVE++;\n                    }\n\n                    adjMap.addEdge(eBean);\n                }\n        }\n        return addedVE;\n    }\n\n    protected long saveVertex(long addedVE, BitsyVertex vertex, IStringCanonicalizer canonicalizer) {\n        UUID key = (UUID) vertex.id();\n\n        switch (vertex.getState()) {\n            case U:\n                break;\n\n            case D:\n                // log.debug(\"Deleting vertex {}\", key);\n                vIndexMap.remove(vertices.get(key));\n                VertexBean vBeanToRemove = vertices.remove(key);\n                adjMap.removeVertex(vBeanToRemove);\n                addedVE--;\n\n                break;\n\n            case M:\n                // log.debug(\"Updating vertex {}\", key);\n                VertexBean vBean = (canonicalizer == null) ? vertex.asBean() : vertex.asBean(canonicalizer);\n                VertexBean oldVBean = vertices.get(key);\n                vIndexMap.remove(oldVBean);\n\n                if (oldVBean == null) {\n                    vertices.put(vBean, vBean);\n                    vIndexMap.add(vBean);\n                    addedVE++;\n                } else {\n                    oldVBean.copyFrom(vBean);\n                    vIndexMap.add(oldVBean);\n                }\n        }\n        return addedVE;\n    }\n\n    public VertexBean getVertex(UUID id) {\n        // This method is only for internal use\n        // Not using a read lock because the ID is available\n        return vertices.get(id);\n    }\n\n    public EdgeBean getEdge(UUID id) {\n        // This method is only for internal use\n        // Not using a read lock because the ID is available\n        return edges.get(id);\n    }\n\n    @Override\n    public BitsyVertex getBitsyVertex(BitsyTransaction tx, UUID id) {\n        RetryDetails retryDetails = new RetryDetails();\n        BitsyVertex ans = null;\n\n        try {\n            do {\n                beginRead(retryDetails, true);\n\n                VertexBean bean = getVertex(id);\n                if (bean != null) {\n                    ans = new BitsyVertex(bean, tx, BitsyState.U);\n                }\n            } while (shouldRetryRead(retryDetails));\n        } finally {\n            endRead(retryDetails);\n        }\n\n        return ans;\n    }\n\n    @Override\n    public BitsyEdge getBitsyEdge(BitsyTransaction tx, UUID id) {\n        RetryDetails retryDetails = new RetryDetails();\n        BitsyEdge ans = null;\n\n        try {\n            do {\n                beginRead(retryDetails, true);\n\n                EdgeBean bean = getEdge(id);\n                if (bean != null) {\n                    ans = new BitsyEdge(bean, tx, BitsyState.U);\n                }\n\n            } while (shouldRetryRead(retryDetails));\n        } finally {\n            endRead(retryDetails);\n        }\n\n        return ans;\n    }\n\n    public List<EdgeBean> getEdges(UUID vertexId, Direction dir, String[] edgeLabels) {\n        RetryDetails retryDetails = new RetryDetails();\n        List<EdgeBean> ans;\n\n        try {\n            do {\n                beginRead(retryDetails, true);\n                VertexBean vBean = vertices.get(vertexId);\n\n                ans = adjMap.getEdges(vBean, dir, edgeLabels);\n            } while (shouldRetryRead(retryDetails));\n        } finally {\n            endRead(retryDetails);\n        }\n\n        return ans;\n    }\n\n    @Override\n    public Collection<VertexBean> getAllVertices() {\n        // This method exposes the underlying collection, without a read/write\n        // lock. The idea is to not block other operations while a reader is\n        // cycling through all the vertices. There returned list may include\n        // some vertices from ongoing transaction, but not others.\n\n        return vertices.values();\n    }\n\n    @Override\n    public Collection<EdgeBean> getAllEdges() {\n        return edges.values();\n    }\n\n    @Override\n    public <T extends Element> void createKeyIndex(String key, Class<T> elementType) {\n        beginWrite();\n\n        try {\n            if (elementType == null) {\n                throw new IllegalArgumentException(\"Element type in createKeyIndex() can not be null\");\n            } else if (elementType.equals(Vertex.class)) {\n                vIndexMap.createKeyIndex(key, getAllVertices().iterator());\n            } else if (elementType.equals(Edge.class)) {\n                eIndexMap.createKeyIndex(key, getAllEdges().iterator());\n            } else {\n                throw new BitsyException(\n                        BitsyErrorCodes.UNSUPPORTED_INDEX_TYPE, \"Encountered index type: \" + elementType);\n            }\n        } finally {\n            endWrite();\n        }\n    }\n\n    @Override\n    public <T extends Element> void dropKeyIndex(String key, Class<T> elementType) {\n        beginWrite();\n\n        try {\n            if (elementType == null) {\n                throw new IllegalArgumentException(\"Element type in dropKeyIndex() can not be null\");\n            } else if (elementType.equals(Vertex.class)) {\n                vIndexMap.dropKeyIndex(key);\n            } else if (elementType.equals(Edge.class)) {\n                eIndexMap.dropKeyIndex(key);\n            } else {\n                throw new BitsyException(\n                        BitsyErrorCodes.UNSUPPORTED_INDEX_TYPE, \"Encountered index type: \" + elementType);\n            }\n        } finally {\n            endWrite();\n        }\n    }\n\n    @Override\n    public <T extends Element> Set<String> getIndexedKeys(Class<T> elementType) {\n        // Getting a write lock because this method accesses the list of index names which isn't thread-safe\n        beginWrite();\n\n        try {\n            if (elementType == null) {\n                throw new IllegalArgumentException(\"Element type in getIndexedKeys() can not be null\");\n            } else if (elementType.equals(Vertex.class)) {\n                return vIndexMap.getIndexedKeys();\n            } else if (elementType.equals(Edge.class)) {\n                return eIndexMap.getIndexedKeys();\n            } else {\n                throw new BitsyException(\n                        BitsyErrorCodes.UNSUPPORTED_INDEX_TYPE, \"Encountered index type: \" + elementType);\n            }\n        } finally {\n            endWrite();\n        }\n    }\n\n    @Override\n    public Collection<VertexBean> lookupVertices(String key, Object value) {\n        RetryDetails retryDetails = new RetryDetails();\n        Collection<VertexBean> ans;\n\n        try {\n            do {\n                beginRead(retryDetails, true);\n                ans = vIndexMap.get(key, value);\n            } while (shouldRetryRead(retryDetails));\n        } finally {\n            endRead(retryDetails);\n        }\n\n        return ans;\n    }\n\n    @Override\n    public Collection<EdgeBean> lookupEdges(String key, Object value) {\n        RetryDetails retryDetails = new RetryDetails();\n        Collection<EdgeBean> ans;\n\n        try {\n            do {\n                beginRead(retryDetails, true);\n                ans = eIndexMap.get(key, value);\n            } while (shouldRetryRead(retryDetails));\n        } finally {\n            endRead(retryDetails);\n        }\n\n        return ans;\n    }\n\n    @Override\n    public void shutdown() {\n        reset();\n    }\n\n    // HELPER METHODS\n    public EdgeBean asBean(BitsyEdge edge) {\n        // The TX is usually not active at this point. So no checks.\n        VertexBean outVertexBean = getVertex(edge.getOutVertexId());\n        VertexBean inVertexBean = getVertex(edge.getInVertexId());\n\n        if ((outVertexBean == null) || (inVertexBean == null)) {\n            // The vertex has been deleted.\n            return null;\n        } else {\n            assert (edge.getState() == BitsyState.M);\n            return new EdgeBean(\n                    (UUID) edge.id(),\n                    edge.getPropertyDict(),\n                    edge.getVersion(),\n                    edge.label(),\n                    outVertexBean,\n                    inVertexBean);\n        }\n    }\n\n    public EdgeBean asBean(BitsyEdge edge, IStringCanonicalizer canonicalizer) {\n        EdgeBean ans = asBean(edge);\n\n        if (ans != null) {\n            // Canonicalize the label\n            ans.label = (ans.label == null) ? null : canonicalizer.canonicalize(ans.label);\n        }\n\n        if (edge.getPropertyDict() != null) {\n            edge.getPropertyDict().canonicalizeKeys(canonicalizer);\n        }\n\n        return ans;\n    }\n\n    // Retry details\n    public class RetryDetails {\n        long counter;\n        long startCounter;\n        int retryCount;\n\n        public RetryDetails() {\n            this.startCounter = spinCounter.get();\n            this.counter = startCounter;\n            this.retryCount = 0;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/ParallelRecordReader.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.concurrent.ArrayBlockingQueue;\nimport java.util.concurrent.CountDownLatch;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class ParallelRecordReader extends RecordReader {\n    private static final Logger log = LoggerFactory.getLogger(ParallelRecordReader.class);\n\n    public static int QUEUE_TO_PROCESSOR_RATIO = 3;\n\n    private int numLinesPerBatch;\n    private int numBatchInQueue;\n    private int numProcessors;\n\n    private ExecutorService producerService;\n    private ExecutorService deserializerService;\n    private ArrayBlockingQueue<Batch> queue;\n    private boolean isDone = false;\n\n    private boolean stopped = false;\n\n    private Iterator<Record> currentIterator;\n\n    public ParallelRecordReader(\n            CommittableFileLog cfl, int numLinesPerBatch, ObjectReader vReader, ObjectReader eReader) {\n        super(cfl, vReader, eReader);\n\n        this.numLinesPerBatch = numLinesPerBatch;\n\n        this.numProcessors = Runtime.getRuntime().availableProcessors() - 1; // one to insert, read is not 100% busy\n        if (numProcessors < 1) {\n            this.numProcessors = 1;\n        } else if (numProcessors > 4) {\n            this.numProcessors = 4; // Don't need more than 4 threads\n        }\n\n        this.numBatchInQueue = QUEUE_TO_PROCESSOR_RATIO * numProcessors;\n\n        this.producerService = Executors.newSingleThreadExecutor();\n        this.deserializerService = Executors.newFixedThreadPool(numProcessors);\n        this.queue = new ArrayBlockingQueue<Batch>(numBatchInQueue);\n\n        // This keeps filling up the queue\n        producerService.submit(new ProducerTask());\n    }\n\n    public Record next() throws Exception {\n        if ((currentIterator == null) || (!currentIterator.hasNext())) {\n            // The current iterator is done. Need to get the next iterator\n            if (isDone) {\n                // Shutdown remaining services\n                log.debug(\"Shutting down services\");\n                shutdownServices();\n\n                return null;\n            }\n\n            // There should be more in the buffer\n            Batch nextBatch = queue.take();\n\n            if (nextBatch.isLastBatch() || (nextBatch.getException() != null)) {\n                // This boolean won't be used till the iterator is drained out\n                isDone = true;\n\n                if (nextBatch.getException() != null) {\n                    throw nextBatch.getException();\n                }\n            }\n\n            // Get the records, waiting for serialization if necessary\n            currentIterator = nextBatch.getRecords().iterator();\n        }\n\n        if (currentIterator.hasNext()) {\n            return currentIterator.next();\n        } else {\n            shutdownServices();\n            return null;\n        }\n    }\n\n    // Shutdown services\n    private void shutdownServices() {\n        if (producerService != null) {\n            producerService.shutdown();\n            producerService = null;\n        }\n\n        if (deserializerService != null) {\n            deserializerService.shutdown();\n            deserializerService = null;\n        }\n    }\n\n    public class Batch {\n        List<String> lines = new ArrayList<String>(numBatchInQueue);\n        List<Record> records = new ArrayList<Record>(numBatchInQueue);\n        boolean lastBatch = false;\n        CountDownLatch cdl = new CountDownLatch(1);\n        Exception exception;\n\n        public Batch() {\n            try {\n                log.debug(\"Reading a new batch from {}\", cfl.getPath());\n                int count = 0;\n                String line;\n                while ((line = cfl.readLine()) != null) {\n                    count++;\n                    lines.add(line);\n\n                    // log.debug(\"Read line: {}\", line);\n\n                    if (count >= numLinesPerBatch) {\n                        return;\n                    }\n                }\n\n                log.debug(\"Reached end of {}\", cfl.getPath());\n                lastBatch = true;\n            } catch (BitsyException e) {\n                // Stop parsing\n                exception = e;\n            }\n        }\n\n        public boolean isLastBatch() {\n            return lastBatch;\n        }\n\n        public void deserialize() throws JsonProcessingException, IOException {\n            try {\n                if (exception == null) {\n                    // De-serialize only if the read was successful\n                    log.debug(\"Deserializing batch from {}\", cfl.getPath());\n                    for (String line : lines) {\n                        Record rec = Record.parseRecord(line, lineNo++, fileName);\n                        rec.deserialize(vReader, eReader);\n                        records.add(rec);\n                    }\n                }\n            } finally {\n                // Don't hold up the next step irrespective of the exception\n                cdl.countDown();\n            }\n        }\n\n        public List<Record> getRecords() throws InterruptedException {\n            // Wait if serialization is not complete\n            cdl.await();\n\n            return records;\n        }\n\n        public void setException(Exception e) {\n            this.exception = e;\n        }\n\n        public Exception getException() {\n            return exception;\n        }\n    }\n\n    public class ProducerTask implements Runnable {\n        public void run() {\n            while (!stopped) {\n                final Batch batch = new Batch();\n\n                // Add batch to the queue\n                try {\n                    queue.put(batch);\n                } catch (InterruptedException e) {\n                    log.error(\"Producer task has been interrupted\", e);\n                    return;\n                }\n\n                // Schedule the serializer\n                deserializerService.submit(new Runnable() {\n                    @Override\n                    public void run() {\n                        try {\n                            batch.deserialize();\n                        } catch (Exception e) {\n                            batch.setException(e);\n                        }\n                    }\n                });\n\n                // Are we done yet?\n                if (batch.isLastBatch()) {\n                    // Producer's work is done\n                    return;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/Record.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.core.JsonFactory;\nimport com.fasterxml.jackson.core.JsonGenerationException;\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.core.JsonToken;\nimport com.fasterxml.jackson.databind.JsonMappingException;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.IGraphStore;\nimport com.lambdazen.bitsy.UUID;\nimport java.io.IOException;\nimport java.io.StringWriter;\n\n/** This class represents a line in a text file captured in the DB */\npublic class Record {\n    private static final char[] HEX_CHAR_ARR = \"0123456789abcdef\".toCharArray();\n    public static final String newLine = \"\\n\";\n    // private static final ObjectMapper mapper = new ObjectMapper();\n    private static final JsonFactory factory = new JsonFactory();\n\n    public static enum RecordType {\n        H, // Header\n        L, // Log marker\n        V, // Vertex\n        E, // Edges\n        T, // Transaction\n        I, // Index -- stored in meta?.txt files\n        M\n    }; // Major version -- stored in meta?.txt files\n\n    private static final char[] recordChars = new char[] {'H', 'L', 'V', 'E', 'T', 'I', 'M'};\n    private static final RecordType[] recordTypes = new RecordType[] {\n        RecordType.H, RecordType.L, RecordType.V, RecordType.E, RecordType.T, RecordType.I, RecordType.M\n    };\n    private static final int numRecChars = recordChars.length;\n\n    RecordType type;\n    String json;\n    BitsyEdge edge;\n    BitsyVertex vertex;\n\n    public static boolean IS_ANDROID = \"The Android Project\".equals(System.getProperty(\"java.specification.vendor\"));\n    public static int ANDROID_EOR = 1234567890;\n\n    public static int hashCode(String str) {\n        if (!IS_ANDROID) {\n            // Backward compatible for non-Android systems\n            return str.hashCode();\n        } else {\n            return ANDROID_EOR;\n        }\n    }\n\n    public Record(RecordType type, String json) {\n        this.type = type;\n        this.json = json;\n    }\n\n    public void deserialize(ObjectReader vReader, ObjectReader eReader) throws JsonProcessingException, IOException {\n        if ((type == RecordType.V) && (vReader != null)) {\n            VertexBeanJson vBean = vReader.readValue(json);\n            this.vertex = new BitsyVertex(vBean, null, vBean.getState());\n        }\n\n        if ((type == RecordType.E) && (eReader != null)) {\n            EdgeBeanJson eBean = eReader.readValue(json);\n            this.edge = new BitsyEdge(eBean, null, eBean.getState());\n        }\n    }\n\n    public RecordType getType() {\n        return type;\n    }\n\n    public String getJson() {\n        return json;\n    }\n\n    // Efficient method to write a vertex -- avoids writeValueAsString\n    public static void generateVertexLine(StringWriter sw, ObjectMapper mapper, VertexBean vBean)\n            throws JsonGenerationException, JsonMappingException, IOException {\n        sw.getBuffer().setLength(0);\n\n        sw.append('V'); // Record type\n        sw.append('=');\n\n        mapper.writeValue(sw, vBean);\n\n        sw.append('#');\n\n        int hashCode = hashCode(sw.toString());\n        sw.append(toHex(hashCode));\n        sw.append('\\n');\n    }\n\n    // Efficient method to write an edge -- avoids writeValueAsString\n    public static void generateEdgeLine(StringWriter sw, ObjectMapper mapper, EdgeBean eBean)\n            throws JsonGenerationException, JsonMappingException, IOException {\n        sw.getBuffer().setLength(0);\n\n        sw.append('E'); // Record type\n        sw.append('=');\n\n        mapper.writeValue(sw, eBean);\n\n        sw.append('#');\n\n        int hashCode = hashCode(sw.toString());\n        sw.append(toHex(hashCode));\n        sw.append('\\n');\n    }\n\n    public static String generateDBLine(RecordType type, String line) {\n        String dbLine = type + \"=\" + line + \"#\";\n        int hashCode = hashCode(dbLine);\n\n        return dbLine + toHex(hashCode) + newLine;\n    }\n\n    public static Record parseRecord(String dbLine, int lineNo, String fileName) {\n        int hashPos = dbLine.lastIndexOf('#');\n        if (hashPos < 0) {\n            throw new BitsyException(\n                    BitsyErrorCodes.CHECKSUM_MISMATCH,\n                    \"Line \" + lineNo + \" in file \" + fileName + \" has no hash-code. Encountered \" + dbLine);\n        } else {\n            String hashCode = dbLine.substring(hashPos + 1);\n            String expHashCode = toHex(hashCode(dbLine.substring(0, hashPos + 1)));\n\n            if ((hashCode == null)\n                    || !hashCode.trim()\n                            .equals(expHashCode)) { // TODO: Currently DB is not portable between Android and Java\n                throw new BitsyException(\n                        BitsyErrorCodes.CHECKSUM_MISMATCH,\n                        \"Line \" + lineNo + \" in file \" + fileName + \" has the wrong hash-code \" + hashCode\n                                + \". Expected \" + expHashCode);\n            } else {\n                // All OK\n                RecordType type = typeFromChar(dbLine.charAt(0));\n                String json = dbLine.substring(2, hashPos);\n                return new Record(type, json);\n            }\n        }\n    }\n\n    // Faster than RecordType.valueof()\n    private static RecordType typeFromChar(char recChar) {\n        for (int i = 0; i < numRecChars; i++) {\n            if (recordChars[i] == recChar) {\n                return recordTypes[i];\n            }\n        }\n\n        throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Unrecognized record type \" + recChar);\n    }\n\n    // Faster than Integer.toHexString()\n    private static String toHex(int input) {\n        final char[] sb = new char[8];\n        final int len = (sb.length - 1);\n        for (int i = 0; i <= len; i++) { // MSB\n            sb[i] = HEX_CHAR_ARR[((int) (input >>> ((len - i) << 2))) & 0xF];\n        }\n        return new String(sb);\n    }\n\n    // This method checks to see if a record is obsolete, i.e., its version is not present in the store\n    public boolean checkObsolete(IGraphStore store, boolean isReorg, int lineNo, String fileName) {\n        if (type == RecordType.T) {\n            // Transaction boundaries are obsolete during reorg\n            return isReorg;\n        } else if (type == RecordType.L) {\n            // A log is always obsolete\n            return false;\n        } else if ((type != RecordType.V) && (type != RecordType.E)) {\n            throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Unhanded record type: \" + type);\n        }\n\n        // A V or E record\n        UUID id = null;\n        int version = -1;\n        String state = null;\n        JsonToken token;\n\n        try {\n            try (JsonParser parser = factory.createParser(json)) {\n                while ((token = parser.nextToken()) != JsonToken.END_OBJECT) {\n                    // Find the version\n                    if (token == JsonToken.FIELD_NAME) {\n                        if (parser.currentName().equals(\"id\")) {\n                            parser.nextToken();\n                            id = UUID.fromString(parser.getText());\n                            continue;\n                        }\n\n                        if (parser.currentName().equals(\"v\")) {\n                            parser.nextToken();\n                            version = parser.getIntValue();\n                            continue;\n                        }\n\n                        if (parser.currentName().equals(\"s\")) {\n                            parser.nextToken();\n                            state = parser.getText();\n\n                            // No need to proceed further\n                            break;\n                        }\n                    }\n                }\n            }\n\n            if ((id == null) || (version == -1) || (state == null)) {\n                throw new BitsyException(\n                        BitsyErrorCodes.INTERNAL_ERROR,\n                        \"Unable to parse record '\" + json + \"' in file \" + fileName + \" at line \" + lineNo);\n            }\n\n            if (state.equals(\"D\")) {\n                // Deleted -- can be ignored only on re-orgs\n                return isReorg;\n            } else {\n                if (type == RecordType.V) {\n                    VertexBean curV = store.getVertex(id);\n                    if (curV == null) {\n                        // Doesn't exist anymore, probably deleted later\n                        return true;\n                    } else if (curV.getVersion() != version) {\n                        // Obsolete\n                        return true;\n                    } else {\n                        // Good to go\n                        return false;\n                    }\n                } else {\n                    assert (type == RecordType.E);\n\n                    EdgeBean curE = store.getEdge(id);\n                    if (curE == null) {\n                        // Doesn't exist anymore, probably deleted later\n                        return true;\n                    } else if (curE.getVersion() != version) {\n                        // Obsolete\n                        return true;\n                    } else {\n                        // Good to go\n                        return false;\n                    }\n                }\n            }\n        } catch (Exception e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.INTERNAL_ERROR,\n                    \"Possible bug in code. Error serializing line '\" + json + \"' in file \" + fileName + \" at line \"\n                            + lineNo,\n                    e);\n        }\n    }\n\n    public BitsyVertex getVertex() {\n        return vertex;\n    }\n\n    public BitsyEdge getEdge() {\n        return edge;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/RecordReader.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\n\npublic class RecordReader {\n    CommittableFileLog cfl;\n    String fileName;\n    int lineNo = 1;\n\n    ObjectReader vReader;\n    ObjectReader eReader;\n\n    public RecordReader(CommittableFileLog cfl, ObjectReader vReader, ObjectReader eReader) {\n        this.cfl = cfl;\n        this.fileName = cfl.getPath().toString();\n        this.vReader = vReader;\n        this.eReader = eReader;\n    }\n\n    public Record next() throws Exception {\n        String line = cfl.readLine();\n\n        if (line == null) {\n            return null;\n        } else {\n            lineNo++;\n\n            Record ans = Record.parseRecord(line, lineNo, fileName);\n            ans.deserialize(vReader, eReader);\n            return ans;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/SingleThreadedStringCanonicalizer.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\n/* This class is not thread-safe */\npublic class SingleThreadedStringCanonicalizer implements IStringCanonicalizer {\n    Map<String, String> canonicalStrings;\n\n    public SingleThreadedStringCanonicalizer() {\n        canonicalStrings = new HashMap<String, String>();\n    }\n\n    public String canonicalize(String str) {\n        String canonicalString = canonicalStrings.get(str);\n        if (canonicalString != null) {\n            return canonicalString;\n        } else {\n            canonicalStrings.put(str, str);\n\n            return str;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/TxBatch.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport java.util.List;\n\n/**\n * This class captures a list of transactions that must be written to the\n * VA/B and EA/B text files\n */\npublic class TxBatch implements ITxBatchJob {\n    List<TxUnit> trans;\n    int size;\n\n    public TxBatch(List<TxUnit> trans) {\n        this.trans = trans;\n        this.size = 0;\n    }\n\n    public List<TxUnit> getTxUnitList() {\n        return trans;\n    }\n\n    public int getSize() {\n        return size;\n    }\n\n    public void setSize(int size) {\n        this.size = size;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/TxLog.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.util.CommittableFileLog;\n\n/**\n * This class captures a transaction log that needs to be merged into the VA/B and EA/B text files\n */\npublic class TxLog implements IVeReorgJob {\n    int rpd;\n    CommittableFileLog cfl;\n\n    public TxLog(CommittableFileLog cfl) {\n        this.cfl = cfl;\n        this.rpd = 0;\n    }\n\n    public CommittableFileLog getCommittableFileLog() {\n        return cfl;\n    }\n\n    public void setReorgPotDiff(int rpd) {\n        this.rpd = rpd;\n    }\n\n    public int getReorgPotDiff() {\n        return rpd;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/TxLogFlushPotential.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.store.FileBackedMemoryGraphStore.FlushNowJob;\nimport com.lambdazen.bitsy.util.BufferPotential;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * This potential function keeps track of the total bytes written to TA or\n * TB.txt and suggests a flush operation when that number exceeds the given\n * txLogThreshold\n */\npublic class TxLogFlushPotential implements BufferPotential<ITxBatchJob> {\n    private static final Logger log = LoggerFactory.getLogger(TxLogFlushPotential.class);\n\n    long txLogThreshold;\n    long curBufSize;\n\n    public TxLogFlushPotential(long txLogThreshold) {\n        this.txLogThreshold = txLogThreshold;\n        this.curBufSize = 0;\n    }\n\n    public long getTxLogThreshold() {\n        return txLogThreshold;\n    }\n\n    public void setTxLogThreshold(long txLogThreshold) {\n        this.txLogThreshold = txLogThreshold;\n    }\n\n    @Override\n    public boolean addWork(ITxBatchJob newWork) {\n        if (newWork instanceof TxBatch) {\n            curBufSize += ((TxBatch) newWork).getSize();\n\n            return (curBufSize > txLogThreshold);\n        } else if (newWork instanceof FlushNowJob) {\n            log.debug(\"Tx buffer has been flushed explicitly\");\n\n            return true;\n        } else {\n            // Error has already been logged before\n            log.debug(\"Unsupported type of work in TxLogFlushPotential: {}\", newWork.getClass());\n\n            return false;\n        }\n    }\n\n    @Override\n    public void reset() {\n        curBufSize = 0;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/TxUnit.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport java.nio.ByteBuffer;\n\n/** This class captures a transaction to be written to the TA/B transaction files */\npublic class TxUnit extends JobWithCountDownLatch {\n    ByteBuffer vertices;\n    ByteBuffer edges;\n    ByteBuffer tx;\n    BitsyException bex;\n\n    public TxUnit(ByteBuffer vertices, ByteBuffer edges, ByteBuffer tx) {\n        this.vertices = vertices;\n        this.edges = edges;\n        this.tx = tx;\n    }\n\n    public ByteBuffer getByteBufferForV() {\n        vertices.position(0);\n\n        return vertices;\n    }\n\n    public ByteBuffer getByteBufferForE() {\n        edges.position(0);\n\n        return edges;\n    }\n\n    public ByteBuffer getByteBufferForT() {\n        tx.position(0);\n\n        return tx;\n    }\n\n    public int writeToFile(CommittableFileLog cfl) {\n        ByteBuffer vbb = getByteBufferForV();\n        ByteBuffer ebb = getByteBufferForE();\n        ByteBuffer tbb = getByteBufferForT();\n\n        int size = vbb.remaining() + ebb.remaining() + tbb.remaining();\n\n        cfl.append(vbb);\n        cfl.append(ebb);\n        cfl.append(tbb);\n\n        return size;\n    }\n\n    public BitsyException getException() {\n        return bex;\n    }\n\n    public void setException(BitsyException bex) {\n        this.bex = bex;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/VEObsolescencePotential.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.util.BufferPotential;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\npublic class VEObsolescencePotential implements BufferPotential<IVeReorgJob> {\n    private static final Logger log = LoggerFactory.getLogger(VEObsolescencePotential.class);\n\n    double factor;\n    long origLines;\n    long addedLines;\n    int minLinesPerReorg;\n\n    public VEObsolescencePotential(int minLinesPerReorg, double factor, long origLines) {\n        this.factor = factor;\n        this.origLines = origLines;\n        this.addedLines = 0;\n        this.minLinesPerReorg = minLinesPerReorg;\n    }\n\n    @Override\n    public boolean addWork(IVeReorgJob newWork) {\n        if (newWork instanceof TxLog) {\n            this.addedLines += ((TxLog) newWork).getReorgPotDiff();\n\n            double factorTimesOrigLines = factor * origLines;\n\n            log.debug(\n                    \"VE obsolescence potential: {}. Threshold is maximum of {} and {}\",\n                    addedLines,\n                    factorTimesOrigLines,\n                    minLinesPerReorg);\n\n            return (addedLines > factorTimesOrigLines) && (addedLines > minLinesPerReorg);\n        } else {\n            // Don't reorg\n            return false;\n        }\n    }\n\n    @Override\n    public void reset() {\n        addedLines = 0;\n    }\n\n    // This method is called by the flusher\n    public void setOrigLines(int origLines) {\n        this.origLines = origLines;\n    }\n\n    public double getFactor() {\n        return factor;\n    }\n\n    public void setFactor(double factor) {\n        this.factor = factor;\n    }\n\n    public int getMinLinesPerReorg() {\n        return minLinesPerReorg;\n    }\n\n    public void setMinLinesPerReorg(int minLinesPerReorg) {\n        this.minLinesPerReorg = minLinesPerReorg;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/VertexBean.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport java.io.Serializable;\nimport java.util.TreeMap;\n\npublic class VertexBean extends UUID implements Serializable {\n    private static final long serialVersionUID = -2867517568410927192L;\n\n    int version;\n    String label;\n    Dictionary properties;\n\n    Object outEdges;\n    Object inEdges;\n\n    public VertexBean(UUID uuid, String label, Dictionary properties, int version) {\n        super(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());\n\n        this.label = label;\n        this.properties = properties;\n        this.version = version;\n    }\n\n    /** Shallow copy constructor */\n    public VertexBean(VertexBean orig) {\n        super(orig.getMostSignificantBits(), orig.getLeastSignificantBits());\n\n        this.label = orig.label;\n        this.version = orig.version;\n        this.properties = orig.properties;\n        this.outEdges = orig.outEdges;\n        this.inEdges = orig.inEdges;\n    }\n\n    @JsonIgnore\n    public UUID getId() {\n        // I am the ID! Saves on object creation and equals checks.\n        return this;\n    }\n\n    @JsonProperty(\"id\")\n    public String getIdStr() {\n        return uuidRepr();\n    }\n\n    @JsonProperty(\"p\")\n    public TreeMap<String, Object> getProperties() {\n        if (properties == null) {\n            return null;\n        } else {\n            TreeMap<String, Object> ans = new TreeMap<String, Object>();\n\n            for (String key : properties.getPropertyKeys()) {\n                ans.put(key, properties.getProperty(key));\n            }\n\n            return ans;\n        }\n    }\n\n    @JsonIgnore\n    public Dictionary getPropertiesDict() {\n        return properties;\n    }\n\n    @JsonProperty(\"v\")\n    public int getVersion() {\n        return version;\n    }\n\n    @JsonProperty(\"l\")\n    public String getLabel() {\n        return label;\n    }\n\n    public void copyFrom(VertexBean vBean) {\n        this.version = vBean.version;\n        this.properties = vBean.properties;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/store/VertexBeanJson.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.fasterxml.jackson.annotation.JsonPropertyOrder;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.Dictionary;\nimport com.lambdazen.bitsy.ads.dict.DictionaryFactory;\nimport java.io.Serializable;\nimport java.util.TreeMap;\n\n@JsonPropertyOrder({\"id\", \"v\", \"s\", \"p\"})\npublic final class VertexBeanJson extends VertexBean implements Serializable {\n    private static final long serialVersionUID = 8270238605124987367L;\n\n    BitsyState state;\n\n    @JsonCreator\n    public VertexBeanJson(\n            @JsonProperty(\"id\") String uuidStr,\n            @JsonProperty(\"l\") String label,\n            @JsonProperty(\"p\") TreeMap<String, Object> properties,\n            @JsonProperty(\"v\") int version,\n            @JsonProperty(\"s\") BitsyState state) {\n        super(UUID.fromString(uuidStr), label, DictionaryFactory.fromMap(properties), version);\n\n        this.state = state;\n    }\n\n    public VertexBeanJson(UUID id, String label, Dictionary properties, int version, BitsyState state) {\n        super(id, label, properties, version);\n\n        this.state = state;\n    }\n\n    @JsonProperty(\"s\")\n    public BitsyState getState() {\n        return state;\n    }\n\n    @JsonProperty(\"id\")\n    public String getIdStr() {\n        return getId().uuidRepr();\n    }\n\n    @JsonProperty(\"p\")\n    public TreeMap<String, Object> getProperties() {\n        if (properties == null) {\n            return null;\n        } else {\n            TreeMap<String, Object> ans = new TreeMap<String, Object>();\n\n            for (String key : properties.getPropertyKeys()) {\n                ans.put(key, properties.getProperty(key));\n            }\n\n            return ans;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/tx/BitsyTransaction.java",
    "content": "package com.lambdazen.bitsy.tx;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyElement;\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.BitsyIsolationLevel;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport com.lambdazen.bitsy.ITransaction;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.index.IndexHelper;\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport com.lambdazen.bitsy.util.EdgeIterator;\nimport com.lambdazen.bitsy.util.VertexIterator;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.function.Consumer;\nimport org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Transaction;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\n/** This class captures a transaction that is NOT thread-safe */\npublic class BitsyTransaction implements ITransaction, ICommitChanges {\n    private static final Direction[] directions = new Direction[] {Direction.OUT, Direction.IN};\n\n    private BitsyTransactionContext context;\n    private BitsyIsolationLevel isolationLevel;\n    private BitsyGraph graph;\n\n    private boolean isOpen = false;\n\n    public BitsyTransaction(BitsyTransactionContext context, BitsyIsolationLevel isolationLevel, BitsyGraph graph) {\n        this.context = context;\n        this.isolationLevel = isolationLevel;\n        this.graph = graph;\n    }\n\n    @Override\n    public Graph createThreadedTx() {\n        // TP3 behavior of threaded graphs are different than TP2\n        throw new UnsupportedOperationException(\"Graph does not support threaded transactions\");\n\n        // TODO: Reintroduce threaded transactions\n        // return new ThreadedBitsyGraph(graph);\n    }\n\n    public BitsyGraph graph() {\n        return graph;\n    }\n\n    @Override\n    public void open() {\n        // Transactions are automatically opened\n        if (isOpen) {\n            throw new IllegalStateException(\"The open() call was made multiple times to the same transaction\");\n        } else {\n            this.isOpen = true;\n        }\n    }\n\n    // @Override\n    // public <T extends TraversalSource> T begin(final Class<T> traversalSourceClass) {\n    //    return graph.traversal(traversalSourceClass);\n    // }\n\n    @Override\n    public void commit() {\n        this.save(true);\n    }\n\n    @Override\n    public void rollback() {\n        this.save(false);\n    }\n\n    @Override\n    public void close() {\n        // NEW TP3 behavior\n        context.getCloseConsumer().accept(this);\n    }\n\n    public boolean isOpen() {\n        return isOpen;\n    }\n\n    public boolean isStopped() {\n        return !isOpen();\n    }\n\n    @Override\n    public BitsyIsolationLevel getIsolationLevel() {\n        return isolationLevel;\n    }\n\n    @Override\n    public void setIsolationLevel(BitsyIsolationLevel level) {\n        this.isolationLevel = level;\n    }\n\n    public void save(boolean commit) {\n        try {\n            if ((!isOpen) && (context.getReadWriteConsumer() == READ_WRITE_BEHAVIOR.MANUAL)) {\n                throw new IllegalStateException(\"Commit/rollback called on a transaction that is not open\");\n            } else if (!commit) {\n                // Nothing to do for rollback\n                context.announceRollback(this);\n            } else {\n                // Commit the changes\n                context.store.commit(this);\n                context.announceCommit(this);\n            }\n        } finally {\n            // Success or failure -- everything must go\n\n            // Decouple from the context\n            context.clear();\n\n            // Close transaction\n            isOpen = false;\n        }\n    }\n\n    public void checkIfActive() throws BitsyException {\n        readWrite();\n    }\n\n    public void validateForQuery(BitsyElement bitsyElement) throws BitsyException {\n        // An element tied to a stopped transaction should not be queried\n        checkIfActive();\n\n        if (isDeleted(bitsyElement)) {\n            throw new BitsyException(BitsyErrorCodes.ELEMENT_ALREADY_DELETED);\n        }\n    }\n\n    private boolean isDeleted(BitsyElement bitsyElement) {\n        if (bitsyElement.getState() == BitsyState.D) {\n            return true;\n        }\n\n        if (bitsyElement instanceof BitsyEdge) {\n            BitsyEdge edge = (BitsyEdge) bitsyElement;\n            return (isDeletedVertex(edge.getInVertexId()) || isDeletedVertex(edge.getOutVertexId()));\n        } else {\n            return false;\n        }\n    }\n\n    public Vertex getVertex(UUID id) throws BitsyException {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Check if this vertex is defined in this transaction\n        BitsyVertex ans = context.changedVertices.get(id);\n        if (ans == null) {\n            ans = context.unmodifiedVertices.get(id);\n        }\n\n        if (ans != null) {\n            // A deleted vertex must not be returned\n            if (isDeleted(ans)) {\n                return null;\n            } else {\n                return ans;\n            }\n        }\n\n        // 2. Get an unmodified vertex tied to this transaction\n        ans = context.store.getBitsyVertex(this, id);\n        if (ans != null) {\n            // 3. Keep a reference if the isolation level is repeatable read\n            if (isolationLevel == BitsyIsolationLevel.REPEATABLE_READ) {\n                context.unmodifiedVertices.put((UUID) (ans.id()), ans);\n            }\n        }\n\n        return ans;\n    }\n\n    public Edge getEdge(UUID id) throws BitsyException {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Check if this edge is defined in this transaction\n        BitsyEdge ans = context.changedEdges.get(id);\n        if (ans == null) {\n            ans = context.unmodifiedEdges.get(id);\n        }\n\n        if (ans != null) {\n            // A deleted element must not be returned\n            if (isDeleted(ans)) {\n                return null;\n            } else {\n                return ans;\n            }\n        }\n\n        // 2. Get the edge from the store\n        ans = context.store.getBitsyEdge(this, id);\n        if (ans == null) {\n            // Not found.\n            return null;\n        }\n\n        // 3. Make sure that both ends of this edge haven't been deleted\n        if (isDeletedVertex(ans.getInVertexId()) || isDeletedVertex(ans.getOutVertexId())) {\n            return null;\n        }\n\n        // 4. Keep a reference when the isolation level is repeatable read\n        if (isolationLevel == BitsyIsolationLevel.REPEATABLE_READ) {\n            context.unmodifiedEdges.put((UUID) (ans.id()), ans);\n        }\n\n        return ans;\n    }\n\n    private boolean isDeletedVertex(UUID id) {\n        BitsyVertex changedVertex = context.changedVertices.get(id);\n\n        return (changedVertex != null) && (changedVertex.getState() == BitsyState.D);\n    }\n\n    public Iterable<Edge> getEdges(BitsyVertex bitsyVertex, Direction dir, String... edgeLabels) throws BitsyException {\n        // Only work on live transactions, where the vertex is valid (i.e., not deleted)\n        validateForQuery(bitsyVertex);\n\n        // Filter out the ones that are bad\n        final List<Edge> mergedEdges = new ArrayList<Edge>();\n\n        for (Direction myDir : directions) {\n            if ((myDir == dir) || (dir == Direction.BOTH)) {\n                // log.debug(\"Getting edges for dir {} and labels {}\", myDir, Arrays.asList(edgeLabels));\n                List<UUID> txEdgeIds = context.adjMap.getEdges((UUID) bitsyVertex.id(), myDir, edgeLabels);\n                // Go over each edge in storeEdges and merge it with the changedEdges to get mergedEdges\n                for (UUID edgeId : txEdgeIds) {\n                    Edge edge = getEdge(edgeId);\n\n                    // An end-point vertex may be deleted in this Tx, so this check is required\n                    if (edge != null) {\n                        mergedEdges.add(edge);\n                        // log.debug(\"Merged edges.1 += {}\", edge);\n                    }\n                }\n\n                // Get the edges from the store\n                // TODO: See if this can be made into a lazy data-structure\n                List<EdgeBean> storeEdges = context.store.getEdges((UUID) bitsyVertex.id(), myDir, edgeLabels);\n\n                // Go over each edge in storeEdges and merge it with the changedEdges to get mergedEdges\n                for (EdgeBean edge : storeEdges) {\n                    // Check if the edge has been changed\n                    BitsyEdge changedEdge = context.changedEdges.get((UUID) edge.getId());\n                    if (changedEdge == null) {\n                        changedEdge = context.unmodifiedEdges.get((UUID) edge.getId());\n                    }\n\n                    if (changedEdge != null) {\n                        // A Tx-specific version exists\n                        if (changedEdge.getState() == BitsyState.D) {\n                            // The edge has been deleted in this transaction. Skip this one\n                        } else {\n                            // Make sure that the edge isn't deleted\n                            if (!isDeletedVertex(changedEdge.getVertexId(myDir.opposite()))) {\n                                // Keep this edge, but give the version from this transaction\n                                mergedEdges.add(changedEdge);\n\n                                // log.debug(\"Merged edges.2 += {}\", changedEdge);\n                            }\n                        }\n                    } else {\n                        // This edge hasn't been changed in this Tx, but the vertex might be deleted in this Tx\n                        changedEdge = new BitsyEdge(edge, this, BitsyState.U);\n\n                        // Make sure that the edge isn't deleted\n                        if (isDeletedVertex(changedEdge.getVertexId(myDir.opposite()))) {\n                            // The other vertex has been deleted by this transaction. Skip this one.\n                        } else {\n                            // Keep this edge as provided by the graph store (i.e., outside tx context)\n                            mergedEdges.add(changedEdge);\n\n                            // log.debug(\"Merged edges.3 += {}\", changedEdge);\n\n                            // Add it to the Tx context\n                            context.unmodifiedEdges.put(edge.getId(), changedEdge);\n                        }\n                    }\n                }\n            }\n        }\n\n        return mergedEdges;\n    }\n\n    public void markForPropertyUpdate(BitsyElement bitsyElement) throws BitsyException {\n        // An update is valid only if the element can be queried\n        validateForQuery(bitsyElement);\n\n        // If so, the element must be marked as modified\n        bitsyElement.setState(BitsyState.M);\n\n        // ...and must be added to the changedVertices if missing\n        UUID id = (UUID) bitsyElement.id();\n        if (bitsyElement instanceof BitsyVertex) {\n            context.unmodifiedVertices.remove(id);\n            context.changedVertices.put(id, (BitsyVertex) bitsyElement);\n        } else {\n            context.unmodifiedEdges.remove(id);\n\n            BitsyEdge edge = (BitsyEdge) bitsyElement;\n            context.changedEdges.put(id, edge);\n        }\n    }\n\n    public void addVertex(BitsyVertex vertex) throws BitsyException {\n        // Only work on live transactions\n        checkIfActive();\n\n        // If so, the vertex must be added to changedVertices\n        UUID id = (UUID) vertex.id();\n        context.changedVertices.put(id, vertex);\n    }\n\n    public void removeVertex(BitsyVertex vertex) throws BitsyException {\n        // Only work on live transactions and valid vertices\n        validateForQuery(vertex);\n\n        // Ensure that the edge was created in this transaction\n        if (vertex.getTransaction() != this) {\n            throw new BitsyException(\n                    BitsyErrorCodes.REMOVING_VERTEX_FROM_ANOTHER_TX,\n                    \"Vertex \" + vertex.id() + \" belongs to a different transaction\");\n        }\n\n        // The element must be marked as deleted\n        vertex.setState(BitsyState.D);\n\n        // Add to changed vertices, if not already available\n        UUID id = (UUID) vertex.id();\n        context.changedVertices.put(id, vertex);\n        context.unmodifiedVertices.remove(id);\n\n        // All edges related to this vertex, must be marked as deleted\n        context.adjMap.removeVertex(id);\n    }\n\n    public void addEdge(BitsyEdge edge) throws BitsyException {\n        // Only work on live transactions and valid edges\n        validateForQuery(edge);\n\n        // Ensure that both end-points of the edge have not been deleted in this Tx\n        if (isDeletedVertex(edge.getInVertexId())) {\n            throw new BitsyException(BitsyErrorCodes.ADDING_EDGE_TO_A_DELETED_VERTEX);\n        }\n\n        if (isDeletedVertex(edge.getOutVertexId())) {\n            throw new BitsyException(BitsyErrorCodes.ADDING_EDGE_FROM_A_DELETED_VERTEX);\n        }\n\n        UUID id = (UUID) edge.id();\n        context.changedEdges.put(id, edge);\n\n        // and the adjacency map\n        context.adjMap.addEdge(id, edge.getOutVertexId(), edge.label(), edge.getInVertexId(), edge.getVersion());\n    }\n\n    public void removeEdge(BitsyEdge edge) throws BitsyException {\n        // Only work on live transactions. It is OK if the vertex is already modified/deleted.\n        checkIfActive();\n\n        // Ensure that the edge was created in this transaction\n        if (edge.getTransaction() != this) {\n            throw new BitsyException(\n                    BitsyErrorCodes.REMOVING_EDGE_FROM_ANOTHER_TX,\n                    \"Edge \" + edge.id() + \" belongs to a different transaction\");\n        }\n\n        // The element must be marked as deleted\n        edge.setState(BitsyState.D);\n\n        // Add to changed edges, if not already available\n        UUID id = (UUID) edge.id();\n        context.changedEdges.put(id, edge);\n        context.unmodifiedEdges.remove(id);\n\n        // Remove from adjacency map\n        context.adjMap.removeEdge((UUID) edge.id(), edge.getOutVertexId(), edge.label(), edge.getInVertexId());\n    }\n\n    public Collection<BitsyVertex> getVertexChanges() {\n        return context.changedVertices.values();\n    }\n\n    public Collection<BitsyEdge> getEdgeChanges() {\n        return context.changedEdges.values();\n    }\n\n    @Override\n    public Iterator<Vertex> getAllVertices() {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Get a concurrently navigable list of vertices\n        Collection<VertexBean> allVertices = context.store.getAllVertices();\n\n        // 2. Wrap it around an iterator for this transaction. Idea is for the\n        // transaction to take priority over vertices in the store. Creating a\n        // copy to avoid concurrent modification exceptions\n        return (Iterator) new VertexIterator(this, new ArrayList<BitsyVertex>(getVertexChanges()), allVertices);\n    }\n\n    @Override\n    public Iterator<Edge> getAllEdges() {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Get a concurrently navigable list of vertices\n        Collection<EdgeBean> allEdges = context.store.getAllEdges();\n\n        // 2. Wrap it around an iterator for this transaction. Idea is for the\n        // transaction to take priority over vertices in the store. Creating a\n        // copy to avoid concurrent modification exceptions\n        return (Iterator) new EdgeIterator(this, new ArrayList<BitsyEdge>(getEdgeChanges()), allEdges);\n    }\n\n    @Override\n    public Iterator<BitsyVertex> lookupVertices(String key, Object value) {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Get the list of vertices that match the given key value form this Tx\n        Collection<VertexBean> vertices;\n        try {\n            vertices = context.store.lookupVertices(key, value);\n        } catch (BitsyException e) {\n            if ((e.getErrorCode() == BitsyErrorCodes.MISSING_INDEX) && context.store.allowFullGraphScans()) {\n                vertices = IndexHelper.filterVertexBeansByKeyValue(context.store.getAllVertices(), key, value);\n            } else {\n                throw e;\n            }\n        }\n\n        // 2. Get the matching vertices in this transaction\n        Collection<BitsyVertex> vertexChanges;\n        if (getIsolationLevel() == BitsyIsolationLevel.READ_COMMITTED) {\n            vertexChanges = getVertexChanges();\n        } else {\n            vertexChanges = new ArrayList<BitsyVertex>();\n            vertexChanges.addAll(getVertexChanges());\n            vertexChanges.addAll(context.unmodifiedVertices.values());\n        }\n\n        Collection<BitsyVertex> txVertices = IndexHelper.filterElementsByKeyValue(vertexChanges, key, value);\n\n        // 3. Wrap it around an iterator for this transaction. Idea is for the\n        // transaction to take priority over vertices in the store.\n        return new VertexIterator(this, txVertices, vertices, vertexChanges);\n    }\n\n    @Override\n    public Iterator<BitsyEdge> lookupEdges(String key, Object value) {\n        // Only work on live transactions\n        checkIfActive();\n\n        // 1. Get the list of vertices that match the given key value form this Tx\n        Collection<EdgeBean> edges;\n        try {\n            edges = context.store.lookupEdges(key, value);\n        } catch (BitsyException e) {\n            if ((e.getErrorCode() == BitsyErrorCodes.MISSING_INDEX) && context.store.allowFullGraphScans()) {\n                edges = IndexHelper.filterEdgeBeansByKeyValue(context.store.getAllEdges(), key, value);\n            } else {\n                throw e;\n            }\n        }\n\n        // 2. Get the matching vertices in this transaction\n        Collection<BitsyEdge> edgeChanges;\n        if (getIsolationLevel() == BitsyIsolationLevel.READ_COMMITTED) {\n            edgeChanges = getEdgeChanges();\n        } else {\n            edgeChanges = new ArrayList<BitsyEdge>();\n            edgeChanges.addAll(getEdgeChanges());\n            edgeChanges.addAll(context.unmodifiedEdges.values());\n        }\n\n        Collection<BitsyEdge> txEdges = IndexHelper.filterElementsByKeyValue(edgeChanges, key, value);\n\n        // 3. Wrap it around an iterator for this transaction. Idea is for the\n        // transaction to take priority over vertices in the store.\n        return new EdgeIterator(this, txEdges, edges, edgeChanges);\n    }\n\n    // Added for Tinkerpop 3\n    @Override\n    public void readWrite() {\n        context.getReadWriteConsumer().accept(this);\n    }\n\n    @Override\n    public Transaction onReadWrite(Consumer<Transaction> consumer) {\n        context.onReadWrite(consumer);\n        return this;\n    }\n\n    @Override\n    public Transaction onClose(Consumer<Transaction> consumer) {\n        context.onClose(consumer);\n        return this;\n    }\n\n    @Override\n    public void addTransactionListener(Consumer<Status> listener) {\n        context.addTransactionListener(listener);\n    }\n\n    @Override\n    public void removeTransactionListener(Consumer<Status> listener) {\n        context.removeTransactionListener(listener);\n    }\n\n    @Override\n    public void clearTransactionListeners() {\n        context.clearTransactionListeners();\n    }\n\n    // Added for Tinkerpop 3.5\n    public <T extends TraversalSource> T begin(final Class<T> traversalSourceClass) {\n        throw new UnsupportedOperationException(\n                \"Bitsy does not support begin(). Please use open, commit, rollback and close\");\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/tx/BitsyTransactionContext.java",
    "content": "package com.lambdazen.bitsy.tx;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.IEdge;\nimport com.lambdazen.bitsy.IGraphStore;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.store.AdjacencyMap;\nimport com.lambdazen.bitsy.store.IEdgeRemover;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.function.Consumer;\nimport org.apache.tinkerpop.gremlin.structure.Transaction;\nimport org.apache.tinkerpop.gremlin.structure.Transaction.CLOSE_BEHAVIOR;\nimport org.apache.tinkerpop.gremlin.structure.Transaction.READ_WRITE_BEHAVIOR;\nimport org.apache.tinkerpop.gremlin.structure.Transaction.Status;\n\npublic class BitsyTransactionContext {\n    Map<UUID, BitsyVertex> unmodifiedVertices;\n    Map<UUID, BitsyEdge> unmodifiedEdges;\n    Map<UUID, BitsyVertex> changedVertices;\n    Map<UUID, BitsyEdge> changedEdges;\n    IGraphStore store;\n    AdjacencyMap adjMap;\n    List<Consumer<Transaction.Status>> transactionListeners;\n\n    Consumer<Transaction> readWriteConsumer = READ_WRITE_BEHAVIOR.AUTO;\n\n    // The default close behavior in TP3 changed to rollback from commit in TP2\n    Consumer<Transaction> closeConsumer = CLOSE_BEHAVIOR.ROLLBACK;\n\n    public BitsyTransactionContext(IGraphStore store) {\n        this.unmodifiedVertices = new HashMap<UUID, BitsyVertex>();\n        this.unmodifiedEdges = new HashMap<UUID, BitsyEdge>();\n        this.changedVertices = new HashMap<UUID, BitsyVertex>();\n        this.changedEdges = new HashMap<UUID, BitsyEdge>();\n        this.store = store;\n        this.transactionListeners = new ArrayList<Consumer<Transaction.Status>>();\n\n        this.adjMap = new AdjacencyMap(false, new IEdgeRemover() {\n            @Override\n            public IEdge removeEdge(UUID id) {\n                return removeEdgeOnVertexDelete(id);\n            }\n        });\n    }\n\n    // This method is called to remove an edge through the IEdgeRemover\n    private IEdge removeEdgeOnVertexDelete(UUID edgeId) throws BitsyException {\n        // This is called from remove on adjMap, which means that the edge was added in this Tx\n        BitsyEdge edge = changedEdges.remove(edgeId);\n\n        // Only an edge that is present in this Tx can be removed by the IEdgeRemover\n        assert (edge != null);\n\n        return edge;\n    }\n\n    public void addTransactionListener(Consumer<Status> listener) {\n        transactionListeners.add(listener);\n    }\n\n    public void removeTransactionListener(Consumer<Status> listener) {\n        transactionListeners.remove(listener);\n    }\n\n    public void clearTransactionListeners() {\n        transactionListeners.clear();\n    }\n\n    public void announceCommit(BitsyTransaction t) {\n        this.transactionListeners.forEach(c -> c.accept(Status.COMMIT));\n    }\n\n    public void announceRollback(BitsyTransaction t) {\n        this.transactionListeners.forEach(c -> c.accept(Status.ROLLBACK));\n    }\n\n    public void onReadWrite(Consumer<Transaction> consumer) {\n        readWriteConsumer =\n                Optional.ofNullable(consumer).orElseThrow(Transaction.Exceptions::onReadWriteBehaviorCannotBeNull);\n    }\n\n    public void onClose(Consumer<Transaction> consumer) {\n        closeConsumer = Optional.ofNullable(consumer).orElseThrow(Transaction.Exceptions::onCloseBehaviorCannotBeNull);\n    }\n\n    public Consumer<Transaction> getReadWriteConsumer() {\n        return readWriteConsumer;\n    }\n\n    public Consumer<Transaction> getCloseConsumer() {\n        return closeConsumer;\n    }\n\n    public void clear() {\n        unmodifiedVertices.clear();\n        unmodifiedEdges.clear();\n        changedVertices.clear();\n        changedEdges.clear();\n        adjMap.clear();\n\n        // Don't clear the long-lived subscriptions, viz. transactionListeners, readWriteConsumer and closeConsumer\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/BitsyElementIterator.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyElement;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.UUID;\nimport java.util.Collection;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.NoSuchElementException;\nimport org.apache.tinkerpop.gremlin.structure.Element;\n\npublic abstract class BitsyElementIterator<BeanType, ElementType extends Element> implements Iterator<ElementType> {\n    private Iterator<ElementType> changedElemIter;\n    private Iterator<BeanType> elementIter;\n    private HashSet<UUID> changedIds;\n    private ElementType readAhead;\n    private HashSet<UUID> allChangedIds;\n\n    public BitsyElementIterator(Collection<BeanType> vertices, Iterator<ElementType> changedElemIter) {\n        this.elementIter = vertices.iterator();\n        this.changedIds = new HashSet<UUID>();\n        this.readAhead = null;\n        this.changedElemIter = changedElemIter;\n    }\n\n    public BitsyElementIterator(\n            Collection<BeanType> vertices,\n            Iterator<ElementType> changedElemIter,\n            Collection<ElementType> allChangedVertices) {\n        this.elementIter = vertices.iterator();\n        this.changedIds = null;\n        this.readAhead = null;\n        this.changedElemIter = changedElemIter;\n        this.allChangedIds = new HashSet<UUID>();\n        for (Element elem : allChangedVertices) {\n            allChangedIds.add((UUID) elem.id());\n        }\n    }\n\n    public abstract UUID getId(BeanType bean);\n\n    public abstract ElementType getElement(BeanType bean);\n\n    public boolean hasNext() {\n        // First return the changed vertices\n        while ((readAhead == null) && (changedElemIter.hasNext())) {\n            ElementType elem = changedElemIter.next();\n\n            // Don't return this ID again\n            if (changedIds != null) {\n                changedIds.add((UUID) elem.id());\n            }\n\n            // Skip over deleted vertices\n            if (((BitsyElement) elem).getState() != BitsyState.D) {\n                // Found a good element\n                readAhead = elem;\n                break;\n            }\n        }\n\n        // Found it?\n        if (readAhead != null) return true;\n\n        // Otherwise make sure that the next available vertex is not one of the changed IDs\n        while ((readAhead == null) && (elementIter.hasNext())) {\n            BeanType bean = elementIter.next();\n            if (changedIds != null) {\n                if (!changedIds.contains(getId(bean))) {\n                    // A new vertex\n                    readAhead = getElement(bean);\n                }\n            } else {\n                // For indexes, we can't be sure what the diffs are. So any changed ID must be ignored.\n                if (!allChangedIds.contains(getId(bean))) {\n                    // if ((changedIds == null) || !changedIds.contains(getId(bean))) {\n                    // A new vertex\n                    readAhead = getElement(bean);\n                }\n            }\n        }\n\n        return (readAhead != null);\n    }\n\n    public ElementType next() {\n        if (readAhead == null) {\n            // Running hasNext() in case the caller did not call it\n            hasNext();\n        }\n\n        ElementType ans = readAhead;\n        if (ans == null) {\n            // Still couldn't find it\n            throw new NoSuchElementException();\n        } else {\n            // Go back and get the correct version from the transaction\n            readAhead = null;\n            return ans;\n        }\n    }\n\n    public void remove() {\n        throw new UnsupportedOperationException();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/BufferFlusher.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.DoubleBuffer.BufferName;\nimport java.util.List;\n\n/** This interface represents a flush worker that takes can empty a buffer (A/B) */\npublic interface BufferFlusher<T> {\n    // Any exception thrown by this method will stop further enqueues.\n    // InterruptedExceptions must be rethrown to kill the flush thread\n    public void flushBuffer(BufferName bufName, List<T> workList) throws BitsyException, InterruptedException;\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/BufferPotential.java",
    "content": "package com.lambdazen.bitsy.util;\n\n/**\n * This interface represents a buffer potential that will be updated on each\n * enqueue. The implementing class need not be thread-safe, but the DoubleBuffer\n * will explicitly synchronize on this object before calling addWork or reset().\n * The implementing class can have other synchronized methods to reconfigure\n * itself\n */\npublic interface BufferPotential<T> {\n    /**\n     * This method is invoked on each enqueue with the additional work\n     * potential. If the total work reaches a threshold, it will return true.\n     * Otherwise, it can return false.\n     */\n    public boolean addWork(T newWork);\n\n    /**\n     * This method is called to reset the potential, when the double buffer\n     * flips the enqueue buffer\n     */\n    public void reset();\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/BufferQueuer.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.DoubleBuffer.BufferName;\n\n/** This interface represents a flush worker that takes can empty a buffer (A/B) */\npublic interface BufferQueuer<T> {\n    // Any exception thrown by this method will stop further enqueues.\n    // InterruptedExceptions must be rethrown to kill the flush thread\n    public void onQueue(BufferName bufName, T work) throws BitsyException;\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/CommittableFileLog.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.store.FileBackedMemoryGraphStore;\nimport com.lambdazen.bitsy.store.Record;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport java.io.IOException;\nimport java.nio.ByteBuffer;\nimport java.nio.CharBuffer;\nimport java.nio.channels.FileChannel;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.StandardOpenOption;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/** This class provides wrapper methods to append, commit and reset a file. It is not thread safe. */\npublic class CommittableFileLog {\n    private static final Logger log = LoggerFactory.getLogger(CommittableFileLog.class);\n\n    /** Should the database lock files before writing to them? Yes by default, but can be changed by the application. **/\n    public static boolean LOCK_MODE = true;\n\n    // 32K buffer for reading files during re-organization\n    private static final int BUFFER_SIZE = 1 * 1024 * 1024;\n\n    // Common fields\n    Path filePath;\n    FileChannel fileChannel;\n    boolean isTxLog;\n    Long counter;\n\n    // Fields capturing the read state\n    byte[] byteArr = new byte[BUFFER_SIZE];\n    ByteBuffer byteBuf = ByteBuffer.wrap(byteArr);\n    CharBuffer charBuf;\n    int byteIndex = 0;\n    int index = 0;\n    boolean endReached = false;\n    StringBuilder curLine = new StringBuilder(1024); // 1K long initial size -- to avoid resizing\n    long markPosition = -1;\n\n    // Field capturing write state\n    private boolean writeMode = false;\n\n    // TODO: Better way to keep track of byteIndex\n    private static final int mask2 = 0xFF80;\n    private static final int mask3 = 0xF800;\n\n    public CommittableFileLog(Path filePath, boolean isTxLog) throws IOException {\n        this.filePath = filePath;\n        this.isTxLog = isTxLog;\n        this.counter = null;\n    }\n\n    public Long getCounter() {\n        return counter;\n    }\n\n    public boolean isTxLog() {\n        return isTxLog;\n    }\n\n    public Path getPath() {\n        return filePath;\n    }\n\n    public void resetReadBuffers() {\n        charBuf = null;\n        index = 0;\n        byteIndex = 0;\n        endReached = false;\n        curLine = new StringBuilder();\n        markPosition = -1;\n        writeMode = false;\n    }\n\n    // Re-implementing readLine() to allow truncate\n    public String readLine() {\n        while (!endReached) {\n            if (charBuf == null) { //  || (charBuf.length() <= index)\n                // Read next\n                byteBuf.clear();\n                int bytesRead;\n                try {\n                    bytesRead = fileChannel.read(byteBuf);\n                } catch (IOException e) {\n                    throw new BitsyException(\n                            BitsyErrorCodes.ERROR_READING_FROM_FILE,\n                            \"File \" + getPath() + \" can not be opened for reading\",\n                            e);\n                }\n\n                if (bytesRead == -1) {\n                    // Done with reads\n                    endReached = true;\n\n                    break; // or continue, doesn't matter\n                }\n\n                // Get more chars into the buffer\n                byteBuf.flip();\n\n                charBuf = FileBackedMemoryGraphStore.utf8.decode(byteBuf);\n\n                // Reset the index\n                byteIndex = 0;\n                index = 0;\n            }\n\n            // Find where the \\n is\n            int cbLen = charBuf.length();\n            int oldIndex = index;\n            for (; index < cbLen; index++, byteIndex++) {\n                char ch = charBuf.charAt(index);\n\n                // Handling UTF-8 characters. byteIndex is used for truncation\n                if (((int) ch & mask2) != 0) {\n                    byteIndex++;\n                }\n\n                if (((int) ch & mask3) != 0) {\n                    byteIndex++;\n                }\n\n                if (ch == '\\n') {\n                    break; // out of the for loop\n                }\n            }\n\n            // Add what was found (or till end) to the current line\n            CharBuffer partialLine = charBuf.subSequence(oldIndex, index);\n\n            // Did we reach the end of the buffer?\n            if (index < cbLen) {\n                // Skip the \\n next time\n                index++;\n                byteIndex++;\n\n                if (curLine.length() == 0) {\n                    // Common case\n                    return partialLine.toString();\n                } else {\n                    curLine.append(partialLine);\n\n                    // Exit the while-loop and return curLine\n                    break;\n                }\n            } else {\n                // Reached end of buffer. Continue reading to the charBuf\n                charBuf = null;\n\n                // But add what was found to curLine\n                curLine.append(partialLine);\n            }\n        }\n\n        // Return what is left in the string buffer\n        if (endReached && curLine.length() == 0) {\n            return null;\n        } else {\n            String ans = curLine.toString();\n            curLine.setLength(0);\n            return ans;\n        }\n    }\n\n    public void mark() {\n        mark(0);\n    }\n\n    public void mark(int numBytesBehind) {\n        try {\n            assert (fileChannel != null);\n\n            long ans = fileChannel.position() - numBytesBehind;\n            if (charBuf != null) {\n                // A char buffer read ahead already\n                // Adjust the position to point it to after the last readLine\n                ans = ans - byteBuf.limit() + byteIndex;\n                // log.debug(\"Index is \" + byteIndex + \". Char index \" + index + \". Position is \" +\n                // fileChannel.position() + \". Buffer size \" + byteBuf.limit());\n            }\n\n            this.markPosition = ans;\n        } catch (IOException e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.ERROR_WRITING_TO_FILE, \"File \" + getPath() + \" could not be marked\", e);\n        }\n    }\n\n    public long getMarkPosition() {\n        return markPosition;\n    }\n\n    public void truncateAtMark() {\n        // Truncate at mark can only be called when the fileChannel is active\n        assert (fileChannel != null);\n        assert (markPosition != -1);\n\n        try {\n            log.info(\n                    \"Truncating {} to recover from crash. {} bytes removed\",\n                    getPath(),\n                    (fileChannel.size() - markPosition));\n\n            fileChannel.truncate(markPosition);\n        } catch (IOException e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.ERROR_WRITING_TO_FILE,\n                    \"File \" + getPath() + \" could not truncated at marked position \" + markPosition,\n                    e);\n        }\n    }\n\n    public void openForAppend() {\n        if (writeMode) {\n            return;\n        }\n\n        if (fileChannel != null) {\n            close();\n        }\n\n        try {\n            // Try opening the file to append, and create it if necessary\n            fileChannel = FileChannel.open(filePath, StandardOpenOption.APPEND);\n\n            // Lock it to avoid conflicts\n            if (LOCK_MODE) {\n                fileChannel.lock();\n            }\n\n            writeMode = true;\n        } catch (IOException e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.ERROR_WRITING_TO_FILE, \"File \" + getPath() + \" can not be opened to append\", e);\n        }\n    }\n\n    public void openForOverwrite(Long counter) {\n        // When opening for overwriting, it doesn't matter if the state is already WRITE.\n        // It must be overwritten\n        if (fileChannel != null) {\n            close();\n        }\n\n        try {\n            // Try opening the file to write, and zap if it exists\n            fileChannel = FileChannel.open(\n                    filePath,\n                    StandardOpenOption.WRITE,\n                    StandardOpenOption.CREATE,\n                    StandardOpenOption.TRUNCATE_EXISTING);\n\n            // Lock it to avoid conflicts\n            if (LOCK_MODE) {\n                fileChannel.lock();\n            }\n\n            // Write header if the counter is defined\n            if (counter != null) {\n                fileChannel.write(ByteBuffer.wrap(\n                        Record.generateDBLine(RecordType.H, \"\" + counter).getBytes(FileBackedMemoryGraphStore.utf8)));\n            }\n\n            // Save the meta-data in case it was created\n            fileChannel.force(true);\n\n            // Update the counter value\n            this.counter = counter;\n\n            // Set the write mode to true\n            writeMode = true;\n        } catch (IOException e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.ERROR_WRITING_TO_FILE, \"File \" + getPath() + \" can not be opened to overwrite\", e);\n        }\n    }\n\n    public boolean exists() {\n        return Files.exists(getPath());\n    }\n\n    public void openForRead() {\n        // Set write mode to false -- safe to be false rather than true\n        writeMode = false;\n\n        // Open the file for read, independent of the state\n        if (fileChannel != null) {\n            close();\n        }\n\n        // Open using classic IO packages\n        String header;\n        try {\n            // Try opening the file to read\n            fileChannel = FileChannel.open(filePath, StandardOpenOption.READ, StandardOpenOption.WRITE);\n\n            fileChannel.position(0);\n\n            resetReadBuffers();\n\n            header = readLine();\n        } catch (IOException e) {\n            throw new BitsyException(\n                    BitsyErrorCodes.ERROR_READING_FROM_FILE, \"File \" + getPath() + \" can not be opened for reading\", e);\n        }\n\n        if (header == null) {\n            // Empty file\n            this.counter = null;\n        } else {\n            Record rec;\n            try {\n                rec = Record.parseRecord(header, 1, getPath().toString());\n            } catch (BitsyException e) {\n                // Error parsing the line\n                throw new BitsyException(\n                        BitsyErrorCodes.ERROR_IN_FILE_HEADER,\n                        \"File \" + getPath() + \" has a header line has an invalid checksum. Encountered: \" + header,\n                        e);\n            }\n\n            if (rec.getType() != RecordType.H) {\n                throw new BitsyException(\n                        BitsyErrorCodes.ERROR_IN_FILE_HEADER,\n                        \"File \" + getPath() + \" has a header line with an invalid record type. Encountered: \" + header);\n            }\n\n            try {\n                this.counter = new Long(rec.getJson());\n            } catch (NumberFormatException e) {\n                throw new BitsyException(\n                        BitsyErrorCodes.ERROR_IN_FILE_HEADER,\n                        \"File \" + getPath() + \" has a non-numeric header counter. Encountered: \" + header);\n            }\n        }\n    }\n\n    /** This method appends a line to the file channel */\n    public void append(byte[] toWrite) throws BitsyException {\n        ByteBuffer buf = ByteBuffer.wrap(toWrite);\n\n        append(buf);\n    }\n\n    public void append(ByteBuffer buf) throws BitsyException {\n        try {\n            while (buf.hasRemaining()) {\n                fileChannel.write(buf);\n            }\n        } catch (IOException e) {\n            BitsyException be =\n                    new BitsyException(BitsyErrorCodes.ERROR_WRITING_TO_FILE, \"Could not write to \" + toString(), e);\n            log.error(\"Raised exception\", be);\n            throw be;\n        }\n    }\n\n    public void commit() throws BitsyException {\n        try {\n            // TODO: Write-ahead on Txlogs to use force(false)\n            fileChannel.force(true);\n        } catch (IOException e) {\n            BitsyException be =\n                    new BitsyException(BitsyErrorCodes.ERROR_WRITING_TO_FILE, \"Could not write to \" + toString(), e);\n\n            log.error(\"Raised exception\", be);\n            throw be;\n        }\n    }\n\n    public void close() {\n        writeMode = false;\n\n        try {\n            if (fileChannel != null) {\n                fileChannel.force(true);\n                fileChannel.close();\n            }\n\n            fileChannel = null;\n        } catch (IOException e) {\n            log.error(\"Ignored error encountered while closing file ${}\", getPath(), e);\n\n            // Ignore exceptions. All operations explicitly commit\n        }\n    }\n\n    public String toString() {\n        return \"CommittableFileLog(\" + filePath + \")\";\n    }\n\n    public long size() {\n        if (fileChannel == null) {\n            return -1;\n        } else {\n            try {\n                return fileChannel.size();\n            } catch (IOException e) {\n                return -1;\n            }\n        }\n    }\n\n    public static void setLockMode(boolean b) {\n        LOCK_MODE = b;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/DefaultCommitChanges.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.List;\n\npublic class DefaultCommitChanges implements ICommitChanges {\n    private List<BitsyVertex> changedVertices;\n    private List<BitsyEdge> changedEdges;\n\n    public DefaultCommitChanges() {\n        this.changedVertices = new ArrayList<BitsyVertex>();\n        this.changedEdges = new ArrayList<BitsyEdge>();\n    }\n\n    @Override\n    public Collection<BitsyVertex> getVertexChanges() {\n        return changedVertices;\n    }\n\n    @Override\n    public Collection<BitsyEdge> getEdgeChanges() {\n        return changedEdges;\n    }\n\n    public void reset() {\n        // Clear retains the size from previous round, which is useful to load V/E logs\n        changedVertices.clear();\n        changedEdges.clear();\n    }\n\n    public void changeVertex(BitsyVertex vertex) throws BitsyException {\n        changedVertices.add(vertex);\n    }\n\n    public void changeEdge(BitsyEdge edge) throws BitsyException {\n        changedEdges.add(edge);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/DoubleBuffer.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyException;\nimport java.util.ArrayList;\nimport java.util.List;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/**\n * This class implements a double buffer that lets one set of Threads enqueue\n * work on one queue while a \"flush thread\" performs the work queued up on the\n * other queue\n */\npublic class DoubleBuffer<T> {\n    private static final Logger log = LoggerFactory.getLogger(DoubleBuffer.class);\n\n    public enum BufferName {\n        A,\n        B\n    };\n\n    // State of the double buffer\n    int enqueueIdx;\n    boolean[] needFlush;\n    List<T> workListA;\n    List<T> workListB;\n\n    BitsyException toThrow;\n    boolean trackWork;\n\n    // Helper objects\n    BufferPotential<T> pot;\n    DoubleBufferThread<T> flushThread;\n\n    /**\n     * This constructor takes an executor service on which the FlushWorker will\n     * be called when it is time to flush the buffer.\n     */\n    public DoubleBuffer(BufferPotential<T> initPot, BufferFlusher<T> flusher, String flushThreadName) {\n        this(initPot, flusher, flushThreadName, true, false);\n    }\n\n    public DoubleBuffer(\n            BufferPotential<T> initPot,\n            BufferFlusher<T> flusher,\n            String flushThreadName,\n            boolean trackWork,\n            boolean syncMode) {\n        this.enqueueIdx = 0;\n\n        this.pot = initPot;\n        this.needFlush = new boolean[] {false, false};\n        this.flushThread = new DoubleBufferThread<T>(flushThreadName, this, flusher, syncMode);\n        this.trackWork = trackWork;\n\n        if (trackWork) {\n            this.workListA = new ArrayList<T>();\n            this.workListB = new ArrayList<T>();\n        }\n\n        flushThread.start();\n    }\n\n    public BufferPotential<T> getPot() {\n        return pot;\n    }\n\n    public void stop(int joinTimeout) {\n        if (flushThread != null) {\n            synchronized (pot) {\n                needFlush[0] = true;\n                needFlush[1] = true;\n                pot.notifyAll();\n                flushThread.safeStop();\n            }\n\n            try {\n                flushThread.join(joinTimeout);\n\n                flushThread.interrupt();\n                flushThread.join(joinTimeout);\n            } catch (InterruptedException e) {\n                // Some other thread interrupted this one\n                log.error(Thread.currentThread().getName() + \" was interrupted during stop() by a different thread\", e);\n            }\n\n            flushThread = null;\n        }\n    }\n\n    public void addWork(final T work) throws BitsyException {\n        synchronized (pot) {\n            // There is actual work being enqueued by a thread\n            if (toThrow != null) {\n                throw toThrow;\n            }\n\n            if (trackWork) {\n                (enqueueIdx == 0 ? workListA : workListB).add(work);\n            }\n\n            boolean needFlushThisTime = pot.addWork(work);\n            this.needFlush[enqueueIdx] = needFlush[enqueueIdx] || needFlushThisTime;\n\n            if (needFlushThisTime) {\n                pot.notifyAll();\n            }\n        }\n    }\n\n    public BufferName getBufferToFlush() throws InterruptedException {\n        synchronized (pot) {\n            // Flush if need to flush is true on the enqueue index\n            while (!needFlush[enqueueIdx]) {\n                pot.wait();\n            }\n\n            // Flush buffer is now the enqueue index\n            BufferName flushBuf = getEnqueueBuffer();\n\n            // The enqueue buffer moves to the other buffer\n            enqueueIdx = 1 - enqueueIdx;\n\n            // Now that we have moved to the other queue, the potential function can be reset\n            pot.reset();\n\n            return flushBuf;\n        }\n    }\n\n    public List<T> getWorkList(BufferName bufName) {\n        // This method will return null if the object was initialized with trackWork = false\n        return (bufName == BufferName.A) ? workListA : workListB;\n    }\n\n    public BufferName getEnqueueBuffer() {\n        return (enqueueIdx == 0) ? BufferName.A : BufferName.B;\n    }\n\n    public void completedFlush() {\n        synchronized (pot) {\n            // Done with the flush on the 'other' queue\n            needFlush[1 - enqueueIdx] = false;\n\n            // Clear the work list\n            if (trackWork) {\n                ((enqueueIdx == 0) ? workListB : workListA).clear();\n            }\n        }\n    }\n\n    public void setException(BitsyException bitsyException) {\n        synchronized (pot) {\n            toThrow = bitsyException;\n        }\n    }\n\n    public BufferPotential<T> getPotential() {\n        return pot;\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/DoubleBufferThread.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.DoubleBuffer.BufferName;\nimport java.util.List;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n/** This class flushes the double buffer based on the potential function provided to it */\npublic class DoubleBufferThread<T> extends Thread {\n    private static final Logger log = LoggerFactory.getLogger(DoubleBuffer.class);\n\n    DoubleBuffer<T> buf;\n    BufferFlusher<T> flush;\n    boolean syncMode;\n    boolean stopped;\n\n    public DoubleBufferThread(String threadName, DoubleBuffer<T> buf, BufferFlusher<T> flush, boolean syncMode) {\n        super(threadName);\n        setDaemon(true);\n\n        this.buf = buf;\n        this.flush = flush;\n        this.syncMode = syncMode;\n        this.stopped = false;\n    }\n\n    public void safeStop() {\n        this.stopped = true;\n    }\n\n    public void run() {\n        try {\n            while (!stopped) {\n                if (syncMode) {\n                    synchronized (buf.getPotential()) {\n                        doFlush();\n                    }\n                } else {\n                    doFlush();\n                }\n            }\n        } catch (InterruptedException e) {\n            // Exiting thread\n            log.error(\n                    Thread.currentThread().getName()\n                            + \" was interrupted, most likely because a safe stop was not possible. This may result in recovery-related warnings during the next startup\",\n                    e);\n        }\n    }\n\n    public void doFlush() throws InterruptedException {\n        BufferName bufToFlush = buf.getBufferToFlush();\n\n        if (stopped) {\n            // Exit\n            return;\n        }\n\n        List<T> workList = buf.getWorkList(bufToFlush);\n\n        // Invoke the new flusher on the dequeue buffer\n        try {\n            flush.flushBuffer(bufToFlush, workList);\n        } catch (BitsyException e) {\n            BitsyException bitsyException = new BitsyException(\n                    BitsyErrorCodes.EXCEPTION_IN_FLUSH, \"Encountered exception in thread \" + getName(), e);\n            buf.setException(bitsyException);\n            log.error(getName() + \" encountered an unrecoverable exception\", bitsyException);\n\n            // Exit to avoid completing the flush. The next time may have a chance.\n            return;\n        }\n\n        // Don't flush the next time -- till the potential function triggers\n        buf.completedFlush();\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/DoubleBufferWithExecWork.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyException;\n\npublic class DoubleBufferWithExecWork<T> extends DoubleBuffer<T> {\n    BufferQueuer<T> queuer;\n\n    public DoubleBufferWithExecWork(\n            BufferPotential<T> initPot,\n            BufferQueuer<T> queuer,\n            BufferFlusher<T> flusher,\n            String flushThreadName,\n            boolean trackWork,\n            boolean syncMode,\n            BufferName initBuffer) {\n        super(initPot, flusher, flushThreadName, trackWork, syncMode);\n        this.queuer = queuer;\n\n        // The starting buffer is based on initBuffer\n        this.enqueueIdx = (initBuffer == BufferName.A) ? 0 : 1;\n    }\n\n    public void addAndExecuteWork(final T work) throws BitsyException {\n        synchronized (pot) {\n            // Do the work inside the synchronized block so that a buffer\n            // doesn't get swapped out in the middle\n            queuer.onQueue(getEnqueueBuffer(), work);\n\n            // The work object may be modified in the previous step\n            addWork(work);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/EdgeIterator.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.store.EdgeBean;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Collection;\nimport java.util.Iterator;\n\npublic class EdgeIterator extends BitsyElementIterator<EdgeBean, BitsyEdge> implements Iterator<BitsyEdge> {\n    private BitsyTransaction tx;\n\n    public EdgeIterator(BitsyTransaction tx, Collection<BitsyEdge> txEdges, Collection<EdgeBean> vertices) {\n        super(vertices, txEdges.iterator());\n\n        this.tx = tx;\n    }\n\n    public EdgeIterator(\n            BitsyTransaction tx,\n            Collection<BitsyEdge> txEdges,\n            Collection<EdgeBean> vertices,\n            Collection<BitsyEdge> allTxEdges) {\n        super(vertices, txEdges.iterator(), allTxEdges);\n\n        this.tx = tx;\n    }\n\n    @Override\n    public UUID getId(EdgeBean bean) {\n        return bean.getId();\n    }\n\n    @Override\n    public BitsyEdge getElement(EdgeBean bean) {\n        return (BitsyEdge) tx.getEdge(bean.getId());\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/util/VertexIterator.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.store.VertexBean;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Collection;\nimport java.util.Iterator;\n\npublic class VertexIterator extends BitsyElementIterator<VertexBean, BitsyVertex> implements Iterator<BitsyVertex> {\n    private BitsyTransaction tx;\n\n    public VertexIterator(BitsyTransaction tx, Collection<BitsyVertex> txVertices, Collection<VertexBean> vertices) {\n        super(vertices, txVertices.iterator());\n\n        this.tx = tx;\n    }\n\n    public VertexIterator(\n            BitsyTransaction tx,\n            Collection<BitsyVertex> txVertices,\n            Collection<VertexBean> vertices,\n            Collection<BitsyVertex> allChangedVertices) {\n        super(vertices, txVertices.iterator(), allChangedVertices);\n\n        this.tx = tx;\n    }\n\n    @Override\n    public UUID getId(VertexBean bean) {\n        return bean.getId();\n    }\n\n    @Override\n    public BitsyVertex getElement(VertexBean bean) {\n        return (BitsyVertex) tx.getVertex(bean.getId());\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/wrapper/BitsyAutoReloadingEdge.java",
    "content": "package com.lambdazen.bitsy.wrapper;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Iterator;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyAutoReloadingEdge implements Edge {\n    BitsyEdge edge;\n    BitsyGraph graph;\n\n    public BitsyAutoReloadingEdge(BitsyGraph g, BitsyEdge e) {\n        this.edge = e;\n        this.graph = g;\n    }\n\n    public Edge getBaseEdge() {\n        if (((BitsyTransaction) edge.getTransaction()).isStopped()) {\n            edge = (BitsyEdge) graph.edges(edge.id()).next();\n        }\n\n        return edge;\n    }\n\n    @Override\n    public void remove() {\n        getBaseEdge().remove();\n    }\n\n    @Override\n    public Object id() {\n        // Don't reload just for the ID\n        return edge.id();\n    }\n\n    @Override\n    public String label() {\n        return getBaseEdge().label();\n    }\n\n    public int hashCode() {\n        return getBaseEdge().hashCode();\n    }\n\n    public boolean equals(Object o) {\n        return getBaseEdge().equals(o);\n    }\n\n    public String toString() {\n        return StringFactory.edgeString(this);\n    }\n\n    @Override\n    public Graph graph() {\n        return getBaseEdge().graph();\n    }\n\n    @Override\n    public <V> Property<V> property(String key, V value) {\n        return getBaseEdge().property(key, value);\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(Direction direction) {\n        return new BitsyAutoReloadingGraph.VertexIterator(graph, getBaseEdge().vertices(direction));\n    }\n\n    @Override\n    public <V> Iterator<Property<V>> properties(String... propertyKeys) {\n        return getBaseEdge().properties(propertyKeys);\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/wrapper/BitsyAutoReloadingGraph.java",
    "content": "package com.lambdazen.bitsy.wrapper;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport java.util.Iterator;\nimport org.apache.commons.configuration2.Configuration;\nimport org.apache.tinkerpop.gremlin.process.computer.GraphComputer;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Transaction;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\npublic class BitsyAutoReloadingGraph implements Graph {\n    private BitsyGraph graph;\n\n    public BitsyAutoReloadingGraph(BitsyGraph g) {\n        this.graph = g;\n    }\n\n    public BitsyGraph getBaseGraph() {\n        return graph;\n    }\n\n    public String toString() {\n        return \"bitsyautoreloadinggraph[\" + getBaseGraph().toString() + \"]\";\n    }\n\n    public static final BitsyAutoReloadingGraph open(Configuration configuration) {\n        return new BitsyAutoReloadingGraph(BitsyGraph.open(configuration));\n    }\n\n    @Override\n    public Vertex addVertex(Object... keyValues) {\n        BitsyVertex base = (BitsyVertex) (graph.addVertex(keyValues));\n\n        return new BitsyAutoReloadingVertex(graph, base);\n    }\n\n    @Override\n    public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException {\n        return (C) graph.compute(graphComputerClass);\n    }\n\n    @Override\n    public GraphComputer compute() throws IllegalArgumentException {\n        return graph.compute();\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(Object... vertexIds) {\n        Iterator<Vertex> result = graph.vertices(vertexIds);\n        return new VertexIterator(graph, result);\n    }\n\n    @Override\n    public Iterator<Edge> edges(Object... edgeIds) {\n        Iterator<Edge> result = graph.edges(edgeIds);\n\n        return new EdgeIterator(graph, result);\n    }\n\n    @Override\n    public Transaction tx() {\n        return graph.tx();\n    }\n\n    @Override\n    public void close() throws Exception {\n        graph.close();\n    }\n\n    @Override\n    public Variables variables() {\n        return graph.variables();\n    }\n\n    @Override\n    public Configuration configuration() {\n        return graph.configuration();\n    }\n\n    @Override\n    public Graph.Features features() {\n        return graph.features();\n    }\n\n    public static class VertexIterator implements Iterator<Vertex> {\n        BitsyGraph graph;\n        Iterator<Vertex> iter;\n\n        public VertexIterator(BitsyGraph g, Iterator<Vertex> iter) {\n            this.graph = g;\n            this.iter = iter;\n        }\n\n        @Override\n        public boolean hasNext() {\n            return iter.hasNext();\n        }\n\n        @Override\n        public Vertex next() {\n            return new BitsyAutoReloadingVertex(graph, (BitsyVertex) (iter.next()));\n        }\n\n        @Override\n        public void remove() {\n            iter.remove();\n        }\n    }\n\n    public static class EdgeIterator implements Iterator<Edge> {\n        BitsyGraph graph;\n        Iterator<Edge> iter;\n\n        public EdgeIterator(BitsyGraph g, Iterator<Edge> iter) {\n            this.graph = g;\n            this.iter = iter;\n        }\n\n        @Override\n        public boolean hasNext() {\n            return iter.hasNext();\n        }\n\n        @Override\n        public Edge next() {\n            return new BitsyAutoReloadingEdge(graph, (BitsyEdge) (iter.next()));\n        }\n\n        @Override\n        public void remove() {\n            iter.remove();\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/com/lambdazen/bitsy/wrapper/BitsyAutoReloadingVertex.java",
    "content": "package com.lambdazen.bitsy.wrapper;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.tx.BitsyTransaction;\nimport java.util.Iterator;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\nimport org.apache.tinkerpop.gremlin.structure.VertexProperty;\nimport org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;\nimport org.apache.tinkerpop.gremlin.structure.util.StringFactory;\n\npublic class BitsyAutoReloadingVertex implements Vertex {\n    BitsyVertex vertex;\n    BitsyGraph graph;\n\n    public BitsyAutoReloadingVertex(BitsyGraph g, BitsyVertex v) {\n        this.vertex = v;\n        this.graph = g;\n    }\n\n    public Vertex getBaseVertex() {\n        if (((BitsyTransaction) vertex.getTransaction()).isStopped()) {\n            vertex = (BitsyVertex) graph.vertices(vertex.id()).next();\n        }\n\n        return vertex;\n    }\n\n    @Override\n    public Object id() {\n        // Don't reload just for the ID\n        return vertex.id();\n    }\n\n    @Override\n    public String label() {\n        return getBaseVertex().label();\n    }\n\n    public int hashCode() {\n        return getBaseVertex().hashCode();\n    }\n\n    public boolean equals(Object o) {\n        return getBaseVertex().equals(o);\n    }\n\n    public String toString() {\n        return StringFactory.vertexString(this);\n    }\n\n    @Override\n    public Graph graph() {\n        return graph;\n    }\n\n    @Override\n    public void remove() {\n        getBaseVertex().remove();\n    }\n\n    @Override\n    public Edge addEdge(String label, Vertex inVertex, Object... keyValues) {\n        return new BitsyAutoReloadingEdge(graph, (BitsyEdge) (getBaseVertex().addEdge(label, inVertex, keyValues)));\n    }\n\n    @Override\n    public Iterator<Edge> edges(Direction direction, String... labels) {\n        return new BitsyAutoReloadingGraph.EdgeIterator(graph, getBaseVertex().edges(direction, labels));\n    }\n\n    @Override\n    public Iterator<Vertex> vertices(Direction direction, String... labels) {\n        return new BitsyAutoReloadingGraph.VertexIterator(graph, getBaseVertex().vertices(direction, labels));\n    }\n\n    @Override\n    public <T> VertexProperty<T> property(String key) {\n        return getBaseVertex().property(key);\n    }\n\n    @Override\n    public <V> VertexProperty<V> property(String key, V value) {\n        return getBaseVertex().property(key, value);\n    }\n\n    @Override\n    public <V> VertexProperty<V> property(Cardinality cardinality, String key, V value, Object... keyValues) {\n        return getBaseVertex().property(cardinality, key, value, keyValues);\n    }\n\n    @Override\n    public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {\n        return getBaseVertex().properties(propertyKeys);\n    }\n}\n"
  },
  {
    "path": "src/main/resources/META-INF/services/org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin",
    "content": "com.lambdazen.bitsy.jsr223.BitsyGremlinPlugin\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/BitsyGraphIT.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.FileBackedMemoryGraphStore;\nimport com.lambdazen.bitsy.util.CommittableFileLog;\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Date;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.NoSuchElementException;\nimport java.util.Random;\nimport java.util.concurrent.CountDownLatch;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Property;\nimport org.apache.tinkerpop.gremlin.structure.Transaction.READ_WRITE_BEHAVIOR;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\npublic class BitsyGraphIT extends FileBasedTestCase {\n    Graph graph;\n    Path dbPath;\n    Random rand = new Random();\n    private Throwable toThrow;\n\n    public boolean isPersistent() {\n        return true;\n    }\n\n    public void setUp() throws IOException {\n        CommittableFileLog.setLockMode(false);\n\n        doSetUp(true);\n    }\n\n    public void doSetUp(boolean delete) throws IOException {\n        System.out.println(\"Setting up graph\");\n\n        this.dbPath = tempDir(\"temp-bitsy-graph\", delete);\n        graph = new BitsyGraph(dbPath);\n\n        //        this.dbPath = tempDir(\"temp-neo4j-graph\", delete);\n        //        graph = new Neo4jGraph(dbPath.toString());\n    }\n\n    protected static void deleteDirectory(final File directory) {\n        deleteDirectory(directory, true);\n    }\n\n    protected static void deleteDirectory(final File directory, boolean deleteDir) {\n        if (directory.exists()) {\n            for (File file : directory.listFiles()) {\n                if (file.isDirectory()) {\n                    deleteDirectory(file);\n                } else {\n                    file.delete();\n                }\n            }\n\n            if (deleteDir) {\n                directory.delete();\n            }\n        }\n    }\n\n    public void tearDown() {\n        System.out.println(\"Tearing down graph\");\n        try {\n            graph.close();\n        } catch (Exception e) {\n            throw new RuntimeException(\"Got ex\", e);\n        }\n    }\n\n    private Vertex getVertex(Graph graph, Object id) {\n        Iterator<Vertex> iter = graph.vertices(id);\n        if (iter.hasNext()) {\n            return iter.next();\n        } else {\n            return null;\n        }\n    }\n\n    private Edge getEdge(Graph graph, Object id) {\n        Iterator<Edge> iter = graph.edges(id);\n        if (iter.hasNext()) {\n            return iter.next();\n        } else {\n            return null;\n        }\n    }\n\n    private Edge addEdge(Graph graph, Vertex vOut, Vertex vIn, String label) {\n        return vOut.addEdge(label, vIn);\n    }\n\n    private void removeEdge(Graph graph, Edge edge) {\n        edge.remove();\n    }\n\n    private void removeVertex(Graph graph, Vertex vertex) {\n        vertex.remove();\n    }\n\n    public void testLoop() throws IOException {\n        int numRuns = 3;\n        for (int run = 0; run < numRuns; run++) {\n            // System.out.println(\"Run #\" + run);\n\n            int numPerCommit = 10;\n            int numCommit = 10;\n            int numVertices = numPerCommit * numCommit;\n            Object[] vids = new Object[numVertices];\n\n            long ts = System.currentTimeMillis();\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = graph.addVertex();\n                v.property(\"rand\", rand.nextInt());\n                v.property(\"count\", i);\n                vids[i] = v.id();\n\n                if (i % numPerCommit == 0) {\n                    graph.tx().commit();\n                }\n\n                // Make sure the vertex is there in the middle of the Tx\n                assertEquals(Integer.valueOf(i), getVertex(graph, vids[i]).value(\"count\"));\n            }\n            graph.tx().commit();\n\n            double duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to insert \" + numVertices + \" vertices. Rate = \"\n                    + (duration / numVertices) + \"ms per vertex\");\n\n            // Make sure vertices are there\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n                assertEquals(i, (int) v.value(\"count\"));\n            }\n\n            // if (rand.nextDouble() < 2) {\n            // return;\n            // }\n\n            // Stop and start\n            if (isPersistent()) {\n                tearDown();\n                doSetUp(false);\n            }\n\n            // Make sure vertices are still there\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n                assertNotNull(v);\n                assertEquals(i, (int) v.value(\"count\"));\n            }\n\n            // Now add edges\n            Object[] eids = new Object[numVertices];\n            for (int i = 0; i < numVertices; i++) {\n                Vertex vOut = getVertex(graph, vids[i]);\n                Vertex vIn = getVertex(graph, vids[(i + 1) % numVertices]);\n                Edge e = addEdge(graph, vOut, vIn, \"foo\");\n                e.property(\"rand\", rand.nextInt());\n                e.property(\"count\", i);\n\n                eids[i] = e.id();\n\n                if (i % numPerCommit == 0) {\n                    graph.tx().commit();\n                }\n\n                // Make sure the edge is there in the middle of the Tx\n                // Using toString() to get the edge\n                Edge qEdge = getEdge(graph, eids[i].toString());\n                assertEquals(Integer.valueOf(i), (Integer) qEdge.value(\"count\"));\n                assertEquals(vOut, qEdge.outVertex());\n                assertEquals(vIn, qEdge.inVertex());\n            }\n            graph.tx().commit();\n\n            // Make sure that the edges are there\n            for (int i = 0; i < numVertices; i++) {\n                Edge e = getEdge(graph, eids[i]);\n                assertEquals(i, (int) e.value(\"count\"));\n            }\n\n            // Now modify the edges. Delete even ones\n            for (int i = 0; i < numVertices; i++) {\n                Edge e = getEdge(graph, eids[i]);\n                e.property(\"count\", i + 1);\n\n                eids[i] = e.id();\n\n                if (i % numPerCommit == 0) {\n                    graph.tx().commit();\n\n                    try {\n                        e.value(\"foo\");\n                    } catch (BitsyException ex) {\n                        assertEquals(BitsyErrorCodes.ACCESS_OUTSIDE_TX_SCOPE, ex.getErrorCode());\n                    }\n                }\n\n                // Make sure the edge is there in the middle of the Tx\n                Edge qEdge = getEdge(graph, eids[i]);\n                assertEquals(Integer.valueOf(i + 1), qEdge.value(\"count\"));\n\n                // Traverse to the vertices\n                Vertex vOut = qEdge.outVertex();\n                assertEquals(Integer.valueOf(i), vOut.value(\"count\"));\n\n                Vertex vIn = qEdge.inVertex();\n                assertEquals(Integer.valueOf((i + 1) % numVertices), vIn.value(\"count\"));\n\n                // Run queries in the middle of the Tx\n                assertEquals(qEdge, vIn.edges(Direction.IN).next());\n                assertEquals(qEdge, vOut.edges(Direction.OUT).next());\n\n                if (i % 2 == 0) {\n                    removeEdge(graph, qEdge);\n\n                    // Run queries in the middle of the Tx\n                    if (rand.nextBoolean()) {\n                        assertFalse(vIn.edges(Direction.IN).hasNext());\n                        assertFalse(vOut.edges(Direction.OUT).hasNext());\n                    } else {\n                        try {\n                            vIn.edges(Direction.IN).next();\n                            fail(\"Expecting no element\");\n                        } catch (NoSuchElementException e1) {\n                        }\n\n                        try {\n                            vOut.edges(Direction.OUT).next();\n                            fail(\"Expecting no element\");\n                        } catch (NoSuchElementException e2) {\n                        }\n                    }\n\n                    try {\n                        vIn.edges(Direction.IN).next();\n                        fail(\"Can't access a missing edge\");\n                    } catch (NoSuchElementException ex) {\n                        // Good\n                    }\n\n                    try {\n                        qEdge.value(\"count\");\n                        fail(\"Can not access deleted edges\");\n                    } catch (BitsyException ex) {\n                        assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, ex.getErrorCode());\n                    }\n                }\n            }\n            graph.tx().commit();\n\n            // Stop and start\n            if (isPersistent()) {\n                tearDown();\n                // assertTrue(rand.nextDouble() > 5);\n                doSetUp(false);\n            }\n\n            // Make sure vertices are still there\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n                // System.out.println(\"Looking for \" + vids[i]);\n\n                assertEquals(i, (int) v.value(\"count\"));\n            }\n\n            // Make sure that the edges are there\n            for (int i = 0; i < numVertices; i++) {\n                Edge e = getEdge(graph, eids[i]);\n\n                if (i % 2 == 0) {\n                    assertNull(e);\n                } else {\n                    // i was changed to i+1\n                    assertNotNull(\"Could not find edge for UUID \" + eids[i], e);\n                    assertEquals(i + 1, (int) e.value(\"count\"));\n                }\n            }\n\n            // Stop and start\n            if (isPersistent()) {\n                tearDown();\n                doSetUp(false);\n            }\n\n            // Make sure vertices are still there. Modify odd ones and delete even ones\n            graph.tx().onReadWrite(READ_WRITE_BEHAVIOR.MANUAL);\n            if (!graph.tx().isOpen()) graph.tx().open();\n\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n                assertEquals(i, (int) v.value(\"count\"));\n\n                if (i % 2 == 0) {\n                    removeVertex(graph, v);\n                } else {\n                    v.property(\"count\", i + 1);\n                }\n\n                if (i % numPerCommit == 0) {\n                    graph.tx().commit();\n\n                    try {\n                        v.value(\"count\");\n                    } catch (IllegalStateException ex) {\n                        // That's expected\n                        // TP2 behavior: assertEquals(BitsyErrorCodes.ACCESS_OUTSIDE_TX_SCOPE, ex.getErrorCode());\n                    }\n\n                    graph.tx().open();\n                }\n\n                // Check the vertex in the middle of the Tx\n                Vertex qv = getVertex(graph, vids[i]);\n                if (i % 2 == 0) {\n                    assertNull(qv);\n                } else {\n                    assertEquals(i + 1, (int) v.value(\"count\"));\n                }\n            }\n            graph.tx().commit();\n            graph.tx().onReadWrite(READ_WRITE_BEHAVIOR.AUTO);\n\n            // Make sure that only odd vertices are still there\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n\n                if (i % 2 == 0) {\n                    assertNull(v);\n                } else {\n                    assertEquals(i + 1, (int) v.value(\"count\"));\n                }\n            }\n\n            // Make sure that the edges are gone (even vertices are deleted)\n            for (int i = 0; i < numVertices; i++) {\n                Edge e = getEdge(graph, eids[i]);\n                assertNull(e);\n            }\n\n            // Stop and start\n            if (isPersistent()) {\n                tearDown();\n                doSetUp(false);\n            }\n\n            // Make sure that the edges are gone (even vertices are deleted)\n            for (int i = 0; i < numVertices; i++) {\n                Edge e = getEdge(graph, eids[i]);\n                assertNull(e);\n            }\n\n            // Make sure that only odd vertices are still there\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = getVertex(graph, vids[i]);\n\n                if (i % 2 == 0) {\n                    assertNull(v);\n                } else {\n                    assertEquals(i + 1, (int) v.value(\"count\"));\n                }\n            }\n        }\n    }\n\n    public void testClique() throws IOException {\n        // Tests indexes in a clique graph\n        int numPerCommit = 10;\n        int numVertices = 29;\n        int numRuns = 3;\n\n        BitsyGraph kig = (BitsyGraph) graph;\n        if (!kig.getIndexedKeys(Vertex.class).contains(\"vmod3\")) {\n            kig.createKeyIndex(\"vmod3\", Vertex.class);\n        } else {\n            kig.dropKeyIndex(\"vmod3\", Vertex.class);\n            kig.createKeyIndex(\"vmod3\", Vertex.class);\n        }\n\n        if (!kig.getIndexedKeys(Edge.class).contains(\"emod3\")) {\n            kig.createKeyIndex(\"emod3\", Edge.class);\n        } else {\n            kig.dropKeyIndex(\"emod3\", Edge.class);\n            kig.createKeyIndex(\"emod3\", Edge.class);\n        }\n\n        int txc = 0;\n        Object[] vids = new Object[numVertices];\n        Object[][] eids = new Object[numVertices][numVertices];\n        long startLong = rand.nextLong();\n        for (int run = 0; run < numRuns; run++) {\n            if ((run == numRuns - 1) && ((BitsyGraph) graph).getStore().allowFullGraphScans()) {\n                // Last run without index\n                kig.dropKeyIndex(\"vmod3\", Vertex.class);\n                kig.dropKeyIndex(\"emod3\", Edge.class);\n            }\n\n            // Change the starting long to look for index replacement logic\n            long oldStartLong = startLong;\n            startLong = rand.nextLong();\n            int[] edgeCount = new int[] {0, 0, 0};\n\n            for (int i = 0; i < numVertices; i++) {\n                if (i == numVertices / 2) {\n                    if (isPersistent()) {\n                        tearDown();\n\n                        doSetUp(false);\n                    }\n                }\n\n                Vertex v;\n                if (run == 0) {\n                    v = graph.addVertex();\n                    vids[i] = v.id();\n                } else {\n                    v = getVertex(graph, vids[i]);\n                    assertEquals(vids[i], v.id());\n                }\n\n                v.property(\"vmod3\", startLong + i % 3);\n\n                // Make sure that the index works on committed and uncommitted data\n                if ((txc++ % numPerCommit == 0) && rand.nextDouble() < 2) {\n                    graph.tx().commit();\n\n                    // Add a random vertex without this property\n                    Vertex dummyV = graph.addVertex();\n                    if (i % 2 == 0) dummyV.property(\"notvmod3\", 1);\n                }\n\n                //                System.out.println(\"Testing vertex \" + i + \". Run #\" + run);\n\n                // Negative test on index value in previous iter\n                if (i > numVertices - 3) {\n                    if (rand.nextBoolean()) {\n                        assertFalse(((BitsyGraph) graph)\n                                .verticesByIndex(\"vmod3\", oldStartLong + i % 3)\n                                .hasNext());\n                    } else {\n                        try {\n                            ((BitsyGraph) graph)\n                                    .verticesByIndex(\"vmod3\", oldStartLong + i % 3)\n                                    .next();\n                            fail(\"Expecting no element\");\n                        } catch (NoSuchElementException e1) {\n                        }\n                    }\n                }\n\n                Iterator<BitsyVertex> viter = ((BitsyGraph) graph).verticesByIndex(\"vmod3\", startLong + i % 3);\n                int count = 0;\n                while (viter.hasNext()) {\n                    Vertex qv = viter.next();\n\n                    boolean matchesSomething = false;\n                    for (int div3 = i % 3; div3 <= i; div3 += 3) {\n                        if (vids[div3].equals(qv.id())) {\n                            matchesSomething = true;\n                            // System.out.println(\"Found match for \" + div3);\n                        }\n                        matchesSomething = true;\n                    }\n                    assertTrue(matchesSomething);\n\n                    count++;\n                    // System.out.println(\"Count = \" + count);\n                }\n\n                assertEquals(1 + i / 3, count);\n\n                // Now add edges\n                for (int j = 0; j < i; j++) {\n                    Edge e;\n                    if (run == 0) {\n                        Vertex outV = getVertex(graph, vids[j]);\n                        Vertex inV = getVertex(graph, vids[i]);\n\n                        e = addEdge(graph, outV, inV, \"test\");\n                        eids[i][j] = e.id();\n                    } else {\n                        e = getEdge(graph, eids[i][j]);\n                    }\n\n                    e.property(\"emod3\", \"E\" + (startLong + ((i - j) % 3)));\n                    Object eid = e.id();\n\n                    // Make sure that the index works on committed and uncommitted data\n                    if (txc++ % numPerCommit == 0) {\n                        graph.tx().commit();\n                    }\n\n                    // Negative test on index value in previous iter\n                    if ((i == numVertices - 1) && (j >= numVertices - 3)) {\n                        assertFalse(((BitsyGraph) graph)\n                                .edgesByIndex(\"emod3\", \"E\" + (oldStartLong + ((i - j) % 3)))\n                                .hasNext());\n                    }\n\n                    // System.out.println(\"Testing edge from \" + j + \" to \" + i);\n                    Iterator<BitsyEdge> eiter =\n                            ((BitsyGraph) graph).edgesByIndex(\"emod3\", \"E\" + (startLong + ((i - j) % 3)));\n                    edgeCount[(i - j) % 3]++;\n\n                    int ecount = 0;\n                    boolean matchesThis = false;\n                    while (eiter.hasNext()) {\n                        Edge qe = eiter.next();\n\n                        if (eid.equals(qe.id())) {\n                            matchesThis = true;\n                            // System.out.println(\"Found edge match\");\n                        }\n\n                        ecount++;\n                    }\n\n                    assertTrue(matchesThis);\n                    assertEquals(edgeCount[(i - j) % 3], ecount);\n                }\n\n                graph.tx().commit();\n            }\n        }\n\n        // Remove vertex props\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = getVertex(graph, vids[i]);\n            v.property(\"vmod3\").remove();\n\n            Iterator<Edge> vOut = v.edges(Direction.OUT);\n            while (vOut.hasNext()) {\n                vOut.next().property(\"emod3\").remove();\n            }\n\n            // Add a random vertex without this property\n            Vertex dummyV = graph.addVertex();\n            dummyV.property(\"notvmod3\", 1);\n            Object dummyVId = dummyV.id();\n\n            // Commit & remove\n            graph.tx().commit();\n            dummyV = getVertex(graph, dummyVId);\n            removeVertex(graph, dummyV);\n        }\n\n        // Make sure the index is empty\n        for (int i = 0; i < 3; i++) {\n            assertFalse(((BitsyGraph) graph)\n                    .verticesByIndex(\"vmod3\", startLong + i % 3)\n                    .hasNext());\n        }\n\n        // Add it back\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = getVertex(graph, vids[i]);\n            assertNull(v.value(\"vmod3\"));\n            v.property(\"vmod3\", startLong);\n        }\n\n        // Make sure the index is non-empty before commit\n        assertTrue(((BitsyGraph) graph).verticesByIndex(\"vmod3\", startLong).hasNext());\n\n        graph.tx().commit();\n\n        // ... and after\n        for (int i = 0; i < 3; i++) {\n            assertTrue(((BitsyGraph) graph).verticesByIndex(\"vmod3\", startLong).hasNext());\n        }\n\n        // Remove it again\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = getVertex(graph, vids[i]);\n            v.property(\"vmod3\").remove();\n        }\n        graph.tx().commit();\n\n        for (int i = 0; i < 3; i++) {\n            assertFalse(((BitsyGraph) graph)\n                    .verticesByIndex(\"vmod3\", startLong + i % 3)\n                    .hasNext());\n        }\n        graph.tx().commit();\n\n        // Remove edge props\n        for (int i = 0; i < numVertices; i++) {\n            for (int j = 0; j < i; j++) {\n                if (eids[i][j] == null) {\n                    continue;\n                }\n\n                Edge e = getEdge(graph, eids[i][j]);\n                Property prop = e.property(\"emod3\");\n                if (prop.isPresent()) prop.remove();\n            }\n\n            // Add a random edge without this property\n            Vertex dummyV1 = graph.addVertex();\n            dummyV1.property(\"notvmod3\", 1);\n\n            Vertex dummyV2 = graph.addVertex();\n            dummyV2.property(\"notvmod3\", 1);\n\n            Edge e = addEdge(graph, dummyV1, dummyV2, \"test\");\n            e.property(\"notemod3\", \"E123\");\n        }\n\n        for (int i = 0; i < numVertices; i++) {\n            for (int j = 0; j < i; j++) {\n                if (eids[i][j] == null) {\n                    continue;\n                }\n                assertFalse(((BitsyGraph) graph)\n                        .edgesByIndex(\"emod3\", \"E\" + (startLong + ((i - j) % 3)))\n                        .hasNext());\n            }\n        }\n\n        graph.tx().commit();\n\n        for (int i = 0; i < numVertices; i++) {\n            for (int j = 0; j < i; j++) {\n                if (eids[i][j] == null) {\n                    continue;\n                }\n                assertFalse(((BitsyGraph) graph)\n                        .edgesByIndex(\"emod3\", \"E\" + (startLong + ((i - j) % 3)))\n                        .hasNext());\n            }\n        }\n\n        // Remove edges\n        for (int i = 0; i < numVertices; i++) {\n            for (int j = 0; j < i; j++) {\n                if ((i + j) % 10 == 0) {\n                    getEdge(graph, eids[i][j]).remove();\n                }\n            }\n        }\n        graph.tx().commit();\n\n        // Remove vertices\n        for (int i = 0; i < numVertices; i++) {\n            getVertex(graph, vids[i]).remove();\n        }\n\n        graph.tx().commit();\n    }\n\n    public void testTypes() throws IOException {\n        int numPerCommit = 10;\n        int numCommit = 10;\n        int numVertices = numPerCommit * numCommit;\n        Object[] vids = new Object[numVertices];\n\n        long ts = System.currentTimeMillis();\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = graph.addVertex();\n            v.property(\"int\", i);\n            v.property(\"long\", (long) i);\n            v.property(\"Integer\", i);\n            v.property(\"Long\", (long) i);\n            v.property(\"double\", (double) i + 0.1);\n            v.property(\"Double\", i + 0.1);\n            v.property(\"float\", (float) i + 0.1);\n            v.property(\"Float\", (float) (i + 0.1));\n            v.property(\"string\", \"String\");\n            v.property(\"date\", new Date(ts));\n\n            v.property(\"stringArr\", new String[] {\"foo\", \"bar\"});\n            v.property(\"intArr\", new int[] {1, 2});\n            v.property(\"longArr\", new long[] {1, 2});\n            v.property(\"doubleArr\", new double[] {1.1, 2.1});\n            v.property(\"floatArr\", new float[] {1.1f, 2.1f});\n            v.property(\"booleanArr\", new boolean[] {false, true});\n\n            vids[i] = v.id();\n\n            if (i % numPerCommit == 0) {\n                graph.tx().commit();\n            }\n        }\n        graph.tx().commit();\n\n        double duration = System.currentTimeMillis() - ts;\n        System.out.println(\"Took \" + duration + \"ms to insert \" + numVertices + \" vertices. Rate = \"\n                + (duration / numVertices) + \"ms per vertex\");\n\n        // Stop and start\n        if (isPersistent()) {\n            tearDown();\n            doSetUp(false);\n        }\n\n        // Make sure vertices are still there\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = getVertex(graph, vids[i]);\n\n            assertNotNull(\"Could not find \" + vids[i], v);\n            // System.out.println(\"Index \" + v.getId() + \". All props: \" + v.getPropertyKeys());\n            assertEquals(i, (int) v.value(\"int\"));\n            assertEquals((long) i, (long) v.value(\"long\"));\n            assertEquals(Integer.valueOf(i), (Integer) v.value(\"Integer\"));\n            assertEquals(Long.valueOf(i), (Long) v.value(\"Long\"));\n            assertEquals((double) i + 0.1, (double) v.value(\"double\"));\n            assertEquals((double) i + 0.1, (Double) v.value(\"Double\"));\n            //            assertEquals((float) i + 0.1, (float)v.value(\"float\"));  TP3 doesn't support raw types\n            // property\n            assertEquals((float) (i + 0.1), (Float) v.value(\"Float\"));\n            assertEquals(\"String\", v.value(\"string\"));\n\n            assertEquals(\"foo\", ((String[]) v.value(\"stringArr\"))[0]);\n            assertEquals(\"bar\", ((String[]) v.value(\"stringArr\"))[1]);\n\n            assertEquals(1, ((int[]) v.value(\"intArr\"))[0]);\n            assertEquals(2, ((int[]) v.value(\"intArr\"))[1]);\n\n            assertEquals(1, ((long[]) v.value(\"longArr\"))[0]);\n            assertEquals(2, ((long[]) v.value(\"longArr\"))[1]);\n\n            assertEquals(1.1d, ((double[]) v.value(\"doubleArr\"))[0]);\n            assertEquals(2.1d, ((double[]) v.value(\"doubleArr\"))[1]);\n\n            assertEquals(1.1f, ((float[]) v.value(\"floatArr\"))[0]);\n            assertEquals(2.1f, ((float[]) v.value(\"floatArr\"))[1]);\n\n            assertEquals(false, ((boolean[]) v.value(\"booleanArr\"))[0]);\n            assertEquals(true, ((boolean[]) v.value(\"booleanArr\"))[1]);\n\n            assertEquals(new Date(ts), v.value(\"date\"));\n        }\n    }\n\n    // TODO: Uncomment after supporting threaded transaction\n    /*\n        public void testConcurrency() {\n            // Create a vertex\n            Vertex v = graph.addVertex();\n            v.property(\"foo\", \"bar\");\n\n            Edge e = addEdge(graph, v, v, \"self\");\n            e.property(\"foo\", \"bar\");\n            Object eid = e.id();\n\n            Object vid = v.id();\n            graph.tx().commit();\n\n            // Create a threaded transaction\n            //TransactionalGraph graph2 = ((ThreadedTransactionalGraph)graph).newTransaction(); // was startTransaction prior to 2.3.0 port\n            Graph graph2 = graph.tx().createThreadedTx(); // TP 3.0 version\n\n            Vertex v1 = getVertex(graph, vid);\n\n            Edge e2 = getEdge(graph2, eid);\n            Vertex v2 = e2.outVertex();\n\n            assertEquals(\"bar\", v1.value(\"foo\"));\n            v1.property(\"foo\", \"baz\");\n\n            assertEquals(\"bar\", v2.value(\"foo\"));\n            v2.property(\"foo\", \"bart\");\n\n            // Should succeed\n            graph.tx().commit();\n\n            try {\n                // Should fail\n                graph2.tx().commit();\n\n                fail(\"Failed optimistic concurrency test\");\n            } catch (BitsyRetryException ex) {\n                assertEquals(BitsyErrorCodes.CONCURRENT_MODIFICATION, ex.getErrorCode());\n            }\n\n            Vertex v2retry = graph2.vertices(vid).next();\n            assertEquals(\"baz\", v2retry.value(\"foo\"));\n\n            v2retry.property(\"foo\", \"bart\");\n            graph2.tx().commit();\n\n            try {\n            \tgraph2.close();\n            } catch (Exception ex) {\n            \tex.printStackTrace();\n            \tfail(\"Couldn't close graph2\" + ex);\n            }\n\n            // Ensure that the retried transaction came through\n            Vertex v3 = getVertex(graph, vid);\n            assertEquals(\"bart\", v3.value(\"foo\"));\n\n            Edge e3 = v3.edges(Direction.OUT).next();\n            assertEquals(\"self\", e3.label());\n            assertEquals(\"bar\", e3.value(\"foo\"));\n\n            e3.property(\"foo\", \"baz\");\n            assertEquals(\"self\", e3.label());\n            assertEquals(\"baz\", e3.value(\"foo\"));\n\n            //TransactionalGraph graph3 = ((ThreadedTransactionalGraph)graph).newTransaction(); // WAS startTransaction prior to 2.3.0 port\n            Graph graph3 = graph.tx().createThreadedTx(); // TP3 version\n            Edge e4 = getEdge(graph3, eid);\n\n            assertEquals(\"self\", e4.label());\n            assertEquals(\"bar\", e4.value(\"foo\"));\n\n            e4.property(\"foo\", \"bart\");\n            assertEquals(\"self\", e4.label());\n            assertEquals(\"bart\", e4.value(\"foo\"));\n\n            assertEquals(e4 + \" doesnt' have foo: bart\", \"bart\", e4.value(\"foo\"));\n\n            // Should pass\n            graph3.tx().commit();\n\n            // See if the changes from graph3 are seen here\n            Vertex v51 = graph3.vertices(vid).next();\n            Edge e51 = v51.edges(Direction.OUT).next();\n\n            assertEquals(\"self\", e51.label());\n            assertEquals(e51 + \" doesnt' have foo: bart\", \"bart\", e51.value(\"foo\"));\n\n            try {\n                graph.tx().commit();\n                fail(\"Failed optimistic concurrency test\");\n            } catch (BitsyRetryException ex) {\n                assertEquals(BitsyErrorCodes.CONCURRENT_MODIFICATION, ex.getErrorCode());\n            }\n\n            // See if the changes from graph3 are seen here\n            Vertex v5 = getVertex(graph, vid);\n            Edge e5 = v5.edges(Direction.OUT).next();\n\n            assertEquals(\"self\", e5.label());\n            assertEquals(e5 + \" doesnt' have foo: bart\", \"bart\", e5.value(\"foo\"));\n\n            // All old vertices should be dead\n            for (Element eN : new Element[] {v1, v2, v2retry, v3, e, e2, e3, e4}) {\n                try {\n                    eN.value(\"foo\");\n                    fail(\"dead Tx\");\n                } catch (BitsyException ex) {\n                    assertEquals(BitsyErrorCodes.ACCESS_OUTSIDE_TX_SCOPE, ex.getErrorCode());\n                }\n            }\n\n            try {\n            \tgraph.close();\n            } catch (Exception ex) {\n            \tfail(\"Couldn't close graph \" + ex);\n            }\n        }\n    */\n    // Pun intended\n    public void testEdgeCases() {\n        assertEquals(BitsyIsolationLevel.READ_COMMITTED, ((BitsyGraph) graph).getDefaultIsolationLevel());\n        for (BitsyIsolationLevel level :\n                new BitsyIsolationLevel[] {BitsyIsolationLevel.READ_COMMITTED, BitsyIsolationLevel.REPEATABLE_READ}) {\n            ((BitsyGraph) graph).setDefaultIsolationLevel(level);\n            graph.tx().commit();\n\n            int numVertices = 4;\n\n            Object[] vids = new Object[numVertices];\n            Vertex[] verts = new Vertex[numVertices];\n\n            for (int i = 0; i < numVertices; i++) {\n                Vertex v = graph.addVertex();\n                vids[i] = v.id();\n                verts[i] = v;\n            }\n\n            // Add an edge from 0 to 1\n            Edge e01 = addEdge(graph, verts[0], verts[1], \"one\");\n            Object e01Id = e01.id();\n\n            Edge e01Alt = addEdge(graph, verts[0], verts[1], \"two\");\n            Object e01AltId = e01Alt.id();\n\n            Edge e12 = addEdge(graph, verts[1], verts[2], \"empty\"); // Empty string no longer allowed in TP3\n            Object e12Id = e12.id();\n\n            Edge e23 = addEdge(graph, verts[2], verts[3], \"three\");\n            Object e23Id = e23.id();\n\n            // Check if the edges are in\n            checkIterCount(verts[0].edges(Direction.OUT), 2);\n            checkIterCount(verts[0].edges(Direction.OUT, \"one\"), 1);\n            checkIterCount(verts[0].edges(Direction.OUT, \"two\"), 1);\n\n            checkIterCount(verts[1].edges(Direction.OUT), 1);\n            checkIterCount(verts[1].edges(Direction.IN), 2);\n\n            checkIterCount(verts[2].edges(Direction.OUT), 1);\n            checkIterCount(verts[2].edges(Direction.IN), 1);\n\n            checkIterCount(verts[3].edges(Direction.IN, \"three\"), 1);\n            checkIterCount(verts[3].edges(Direction.IN, \"threeX\"), 0);\n\n            // Transaction returns the same object on every get\n            for (int i = 0; i < numVertices; i++) {\n                assertSame(verts[i], getVertex(graph, vids[i]));\n            }\n\n            assertSame(e01, getEdge(graph, e01.id()));\n            assertSame(e01Alt, getEdge(graph, e01Alt.id()));\n            assertSame(e12, getEdge(graph, e12.id()));\n            assertSame(e23, getEdge(graph, e23.id()));\n\n            // Now commit\n            graph.tx().commit();\n\n            // Check to see if the vertices returned for the IDs are the same\n            for (int i = 0; i < numVertices; i++) {\n                if (level == BitsyIsolationLevel.REPEATABLE_READ) {\n                    Vertex v = getVertex(graph, vids[i]);\n                    assertNotNull(v);\n                    assertSame(v, getVertex(graph, vids[i]));\n                } else {\n                    Vertex v = getVertex(graph, vids[i]);\n                    assertNotNull(v);\n                    assertNotSame(getVertex(graph, vids[i]), getVertex(graph, vids[i]));\n                    assertEquals(getVertex(graph, vids[i]), getVertex(graph, vids[i]));\n                    assertEquals(\n                            getVertex(graph, vids[i]).hashCode(),\n                            getVertex(graph, vids[i]).hashCode());\n                }\n            }\n\n            // Check to see if mid-tx deletes work\n            for (int i = 0; i < numVertices; i++) {\n                verts[i] = getVertex(graph, vids[i]);\n            }\n\n            // Check to see if the end points of edges are the same objects as the loaded vertices\n            e23 = getEdge(graph, e23.id());\n            if (level == BitsyIsolationLevel.REPEATABLE_READ) {\n                assertSame(verts[2], e23.outVertex());\n                assertSame(verts[3], e23.inVertex());\n            } else {\n                assertEquals(verts[2].id(), e23.outVertex().id());\n                assertEquals(verts[3].id(), e23.inVertex().id());\n            }\n\n            // Remove vertex 3\n            removeVertex(graph, verts[2]);\n\n            // The vertex should not be accessible\n            try {\n                verts[2].value(\"foo\");\n                fail(\"Can't access deleted vertex\");\n            } catch (BitsyException e) {\n                assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n            }\n\n            // The edge should not be accessible\n            try {\n                e23.value(\"foo\");\n                fail(\"Can't access deleted edge\");\n            } catch (BitsyException e) {\n                assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n            }\n\n            // Check to see that e12 and e23 disappeared from the queries as well\n            checkIterCount(verts[3].edges(Direction.IN), 0);\n            checkIterCount(verts[1].edges(Direction.OUT), 0);\n\n            // Now try to load an edge that was not previously in the transaction\n            e12 = getEdge(graph, e12Id);\n\n            // ... but that edge won't be visible because of the deleted vertex\n            assertNull(e12);\n\n            // Try the same for e23\n            e23 = getEdge(graph, e23.id());\n            assertNull(e23);\n\n            // No commit and recheck\n            graph.tx().commit();\n\n            // Make sure old elements are deleted\n            assertNull(getVertex(graph, vids[2]));\n            assertNull(getEdge(graph, e23Id));\n            assertNull(getEdge(graph, e12Id));\n\n            // Get an edge first\n            e01 = getEdge(graph, e01Id);\n\n            // ... then vertices\n            for (int i = 0; i < numVertices; i++) {\n                verts[i] = getVertex(graph, vids[i]);\n            }\n\n            // ... and make sure the endpoints are the same\n            if (level == BitsyIsolationLevel.REPEATABLE_READ) {\n                assertSame(e01.inVertex(), verts[1]);\n                assertSame(e01.outVertex(), verts[0]);\n            } else {\n                assertEquals(e01.inVertex().id(), verts[1].id());\n                assertEquals(e01.outVertex().id(), verts[0].id());\n            }\n\n            // Now remove the edge\n            removeEdge(graph, e01);\n\n            checkIterCount(verts[0].edges(Direction.OUT), 1); // only e01Alt lives\n            checkIterCount(verts[1].edges(Direction.IN), 1); // only e01Alt lives\n\n            // The edge should not be accessible\n            try {\n                e01.inVertex();\n                System.out.println(\"Fail!\");\n                fail(\"Can't access deleted edge\");\n            } catch (BitsyException e) {\n                assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n            }\n\n            // But the vertex should be\n            e01Alt = getEdge(graph, e01AltId);\n            if (level == BitsyIsolationLevel.REPEATABLE_READ) {\n                assertSame(e01Alt.inVertex(), verts[1]);\n                assertSame(e01Alt.outVertex(), verts[0]);\n            } else {\n                assertEquals(e01Alt.inVertex().id(), verts[1].id());\n                assertEquals(e01Alt.outVertex().id(), verts[0].id());\n            }\n        }\n\n        // Reset default isolation level\n        ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.REPEATABLE_READ);\n        graph.tx().commit();\n    }\n\n    public void testMultiThreadedEdgeQueries() throws IOException {\n        // The purpose of this test is to create two vertices with a lot of\n        // different types of edges with properties/labels. The edges will be\n        // created and removed by multiple threads. A separate read thread will\n        // validate that transaction boundaries are respected.\n        setException(null);\n\n        Vertex v1 = graph.addVertex();\n        Vertex v2 = graph.addVertex();\n        final Object v1Id = v1.id();\n        final Object v2Id = v2.id();\n        graph.tx().commit();\n\n        final int numThreads = 100;\n        ExecutorService service = Executors.newFixedThreadPool(numThreads + 2);\n        long timeToTest = 10000; // 10 seconds\n        final long timeToStop = System.currentTimeMillis() + timeToTest;\n\n        service.submit(new Runnable() {\n            @Override\n            public void run() {\n                try {\n                    int counter = 0;\n                    while (System.currentTimeMillis() < timeToStop) {\n                        // System.out.println(\"Read iter\");\n                        counter++;\n                        Vertex v1 = getVertex(graph, v1Id);\n                        assertNotNull(v1);\n\n                        Vertex v2 = getVertex(graph, v2Id);\n                        assertNotNull(v2);\n\n                        validate(v1.edges(Direction.OUT), v1, v2);\n                        validate(v2.edges(Direction.IN), v1, v2);\n\n                        // This is to reload new vertices in REPEATABLE_READ mode (default)\n                        graph.tx().rollback();\n\n                        v1 = getVertex(graph, v1Id);\n                        assertNotNull(v1);\n\n                        v2 = getVertex(graph, v2Id);\n                        assertNotNull(v2);\n\n                        validate(v1.edges(Direction.OUT, \"label34\", \"label17\"), v1, v2, \"label34\", \"label17\");\n                        validate(v2.edges(Direction.IN, \"label87\", \"label39\"), v1, v2, \"label87\", \"label39\");\n\n                        // This is to reload new vertices in REPEATABLE_READ mode (default)\n                        graph.tx().rollback();\n\n                        // System.out.println(\"At \" + counter + \" read iterations\");\n                    }\n\n                    System.out.println(\"Completed \" + counter + \" read iterations\");\n                } catch (Throwable e) {\n                    setException(e);\n                }\n            }\n\n            public void validate(Iterator<Edge> edges, Vertex v1, Vertex v2, String... labels) {\n                Map<Integer, Integer> countMap = new HashMap<Integer, Integer>();\n                List<String> labelsToCheck = ((labels == null) || (labels.length == 0)) ? null : Arrays.asList(labels);\n                while (edges.hasNext()) {\n                    Edge e = edges.next();\n                    assertEquals(v1, e.outVertex());\n                    assertEquals(v2, e.inVertex());\n\n                    Integer key = e.value(\"count\");\n                    Integer value = countMap.get(key);\n                    if (value == null) {\n                        countMap.put(key, 1);\n                    } else {\n                        countMap.put(key, value + 1);\n                    }\n\n                    if (labelsToCheck != null) {\n                        assertTrue(\n                                \"Could not find \" + e.label() + \" in \" + labelsToCheck,\n                                labelsToCheck.contains(e.label()));\n                    }\n                }\n\n                for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {\n                    // System.out.println(\"Checking count for \" + entry.getKey());\n                    assertEquals(\n                            \"Transaction boundary not respected for \" + entry.getKey() + \", got \" + entry.getValue()\n                                    + \" edges\",\n                            0,\n                            entry.getValue() % entry.getKey());\n                }\n            }\n        });\n\n        final int numEdges = 1;\n        for (int i = 0; i < numThreads; i++) {\n            final String label = \"label\" + i;\n            final int count = i;\n\n            service.submit(new Runnable() {\n                @Override\n                public void run() {\n                    int writeIters = 0;\n                    try {\n                        Object[] eids = new Object[count * numEdges];\n                        int counter = 0;\n\n                        while (System.currentTimeMillis() < timeToStop) {\n                            // System.out.println(\"Write iter\");\n                            Vertex v1 = getVertex(graph, v1Id);\n                            assertNotNull(v1);\n\n                            Vertex v2 = getVertex(graph, v2Id);\n                            assertNotNull(v2);\n\n                            for (int j = 0; j < count; j++) {\n                                Edge e = v1.addEdge(label, v2);\n                                e.property(\"count\", count);\n                                eids[counter++] = e.id();\n                            }\n\n                            graph.tx().commit();\n                            writeIters++;\n\n                            try {\n                                Thread.sleep(1 * numThreads);\n                            } catch (InterruptedException e) {\n                                e.printStackTrace();\n                            }\n\n                            if (counter == eids.length) {\n                                counter = 0;\n\n                                // Hold at peak -- helps keep the set big\n                                try {\n                                    Thread.sleep(5 * numThreads);\n                                } catch (InterruptedException e1) {\n                                    e1.printStackTrace();\n                                }\n\n                                // Clear and restart\n                                int pauseCounter = 0;\n                                for (Object eid : eids) {\n                                    getEdge(graph, eid).remove();\n\n                                    if ((pauseCounter > 0) && (pauseCounter++ % count == 0)) {\n                                        writeIters++;\n                                        graph.tx().commit();\n\n                                        try {\n                                            Thread.sleep(5);\n                                        } catch (InterruptedException e) {\n                                            e.printStackTrace();\n                                        }\n                                    }\n                                }\n                            }\n                        }\n\n                        System.out.println(\"Completed \" + writeIters + \" write iterations\");\n                    } catch (Throwable e) {\n                        setException(e);\n                    }\n                }\n            });\n        }\n\n        try {\n            Thread.sleep(timeToTest + 1000);\n        } catch (InterruptedException e) {\n            e.printStackTrace();\n        }\n\n        if (getException() != null) {\n            throw new RuntimeException(\"Got exception\", getException());\n        }\n\n        System.out.println(\"Done with multi-threaded edge tests\");\n        service.shutdown();\n    }\n\n    private void setException(Throwable t) {\n        this.toThrow = t;\n    }\n\n    private Throwable getException() {\n        return toThrow;\n    }\n\n    public void testMultiThreadedTreeCreation() throws IOException {\n        // The purpose of this test multithreaded reads and writes. The graph is\n        // a sub-graph of a tree whose root node has degree M. Each level\n        // reduces the degree to M-1, ..., till 0. There are N threads that\n        // start at the root vertex and traverse a random path to the leaf. At\n        // each level, the thread checks that the degree is the correct value or\n        // 0. If the children have not been created, the thread will create it\n        // with some probability.\n        //\n        // One 'destructor' thread goes around the same tree and zaps nodes with\n        // a probability of 1/m! where the degree is supposed to be m. All\n        // threads may face CMEs.\n        setException(null);\n\n        // Added for TP3 because the default is now READ_COMMITTED\n        ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.REPEATABLE_READ);\n\n        Vertex rootV = graph.addVertex();\n        final Object rootVid = rootV.id();\n        graph.tx().commit();\n\n        final int rootDegree = 5; // 5! = 120 nodes -- keeping it low to increase chances of BitsyRetryException\n        final int numThreads = 10;\n        ExecutorService service = Executors.newFixedThreadPool(numThreads + 1);\n\n        long timeToTest = 20000; // 20 seconds\n        final String labelId = \"child\";\n        final long timeToStop = System.currentTimeMillis() + timeToTest;\n\n        for (int i = 0; i < numThreads; i++) {\n            service.submit(new Runnable() {\n                @Override\n                public void run() {\n                    try {\n                        int createIters = 0;\n                        while (System.currentTimeMillis() < timeToStop) {\n                            Object vid = rootVid;\n\n                            int expectedDegree = rootDegree;\n                            while (expectedDegree > 0) {\n                                Thread.sleep(rand.nextInt(5)); // Sleep between 0 and 5ms;\n\n                                Vertex v = null;\n                                try {\n                                    v = getVertex(graph, vid);\n                                    int count = 0;\n                                    int idx = rand.nextInt(expectedDegree);\n                                    Iterator<Edge> edgeIter = v.edges(Direction.OUT, labelId);\n                                    while (edgeIter.hasNext()) {\n                                        Edge e = edgeIter.next();\n                                        if (count == idx) {\n                                            vid = e.inVertex().id();\n                                        }\n                                        count++;\n                                    }\n\n                                    if (count > 0) {\n                                        assertEquals(expectedDegree, count);\n                                        expectedDegree--;\n                                        continue;\n                                    }\n                                } catch (BitsyRetryException e) {\n                                    // Someone else removed the edges\n                                    System.out.println(\"Got a concurrent mod exception -- expected behavior\");\n                                    graph.tx().rollback();\n\n                                    break;\n                                }\n\n                                // This is the end because count is 0\n                                if (expectedDegree == 0) {\n                                    // Leaf is OK. Creator is happy.\n                                    assertEquals(\"no\", v.value(\"haschildren\"));\n                                    break;\n                                } else {\n                                    // Probability of 1/3 to create children\n                                    if (rand.nextInt() % 3 == 0) {\n                                        try {\n                                            // System.out.println(\"Adding nodes with expected degree \" +\n                                            // expectedDegree);\n\n                                            // Not at leaf\n                                            v.property(\"haschildren\", \"yes\");\n                                            for (int i = 0; i < expectedDegree; i++) {\n                                                Vertex child = graph.addVertex();\n                                                child.property(\"haschildren\", \"no\");\n                                                v.addEdge(labelId, child);\n                                            }\n\n                                            createIters++;\n                                            graph.tx().commit();\n                                        } catch (BitsyRetryException e) {\n                                            // Someone else did it\n                                            System.out.println(\"Got a concurrent mod exception -- expected behavior\");\n                                            graph.tx().rollback();\n                                        }\n                                    }\n\n                                    break;\n                                }\n                            }\n                        }\n\n                        System.out.println(\"Completed \" + createIters + \" create iterations\");\n                    } catch (Throwable e) {\n                        setException(e);\n                    }\n                }\n            });\n        }\n\n        // Create the destructor\n        service.submit(new Runnable() {\n            @Override\n            public void run() {\n                try {\n                    int deleteIters = 0;\n\n                    while (System.currentTimeMillis() < timeToStop) {\n                        Object vid = rootVid;\n\n                        int expectedDegree = rootDegree;\n                        while (expectedDegree > 0) {\n                            Thread.sleep(rand.nextInt(5)); // Sleep between 0 and 5ms;\n\n                            Vertex v = getVertex(graph, vid);\n                            int count = 0;\n                            int idx = rand.nextInt(expectedDegree);\n                            Iterator<Edge> edgeIter = v.edges(Direction.OUT, labelId);\n                            while (edgeIter.hasNext()) {\n                                Edge e = edgeIter.next();\n                                if (count == idx) {\n                                    vid = e.inVertex().id();\n                                }\n                                count++;\n                            }\n\n                            if (count == 0) {\n                                // Reached the end\n                                break;\n                            }\n\n                            // There are children under this node -- toss a coin\n                            if (rand.nextInt(factorial(expectedDegree)) == 0) {\n                                try {\n                                    // System.out.println(\"Removing node with expected degree \" + expectedDegree);\n\n                                    // Remove this node and its children\n                                    removeDesc(v);\n\n                                    deleteIters++;\n                                    graph.tx().commit();\n                                } catch (BitsyRetryException e) {\n                                    // Someone else did it\n                                    System.out.println(\"Got a concurrent mod exception -- expected behavior\");\n                                    graph.tx().rollback();\n                                }\n\n                                break;\n                            }\n\n                            assertEquals(expectedDegree, count);\n                            expectedDegree--;\n                        }\n                    }\n\n                    System.out.println(\"Completed \" + deleteIters + \" delete iters\");\n                } catch (Throwable e) {\n                    setException(e);\n                }\n            }\n\n            private void removeDesc(Vertex v) {\n                Iterator<Vertex> vertIter = v.vertices(Direction.OUT);\n                while (vertIter.hasNext()) {\n                    Vertex childV = vertIter.next();\n                    removeDesc(childV);\n                    childV.remove();\n                }\n            }\n\n            private int factorial(int count) {\n                int ans = 1;\n                for (int i = 1; i <= count; i++) {\n                    ans *= count;\n                }\n\n                return ans;\n            }\n        });\n\n        try {\n            Thread.sleep(timeToTest + 1000);\n        } catch (InterruptedException e) {\n            e.printStackTrace();\n        }\n\n        if (getException() != null) {\n            throw new RuntimeException(\"Got exception\", getException());\n        }\n\n        System.out.println(\"Done with multi-threaded tree tests\");\n        service.shutdown();\n    }\n\n    private void checkIterCount(Iterator iter, int expectedCount) {\n        int count = 0;\n        while (iter.hasNext()) {\n            iter.next();\n            count++;\n        }\n\n        assertEquals(expectedCount, count);\n    }\n\n    public void testPersistence() throws Exception {\n        BitsyGraph bGraph = (BitsyGraph) graph;\n        FileBackedMemoryGraphStore store = (FileBackedMemoryGraphStore) (bGraph.getStore());\n\n        // Check defaults\n        assertEquals(1000, bGraph.getMinLinesPerReorg());\n        assertEquals(4 * 1024 * 1024, bGraph.getTxLogThreshold());\n        assertEquals(1d, bGraph.getReorgFactor());\n        assertTrue(store.allowFullGraphScans());\n\n        // Add a little -- shouldn't flush\n        int numVertices = 100;\n        Object[] vids = new Object[numVertices];\n        Vertex[] verts = new Vertex[numVertices];\n\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = graph.addVertex();\n            v.property(\"foo\", \"something \\n multi-line\");\n            vids[i] = v.id();\n            verts[i] = v;\n        }\n\n        // Commit\n        graph.tx().commit();\n\n        // Make sure the number of lines are correct -- 100 + 1 header + 1 tx, 1 header in the other\n        int txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        int txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        int vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        int vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        int eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        int eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(102, 1, txA, txB); // 1 header + 100 V + 1 tx, 1 header\n        assertPair(0, 2, vA, eB); // An empty log is flushed in the beginning, hence 1, 2\n        assertPair(0, 2, eA, eB);\n\n        // Add some edges -- shouldn't flush\n        for (int i = 0; i < numVertices; i++) {\n            verts[i] = getVertex(graph, vids[i]);\n        }\n\n        for (int i = 1; i < numVertices; i++) {\n            addEdge(graph, verts[i - 1], verts[i], \"label\\n with multi-lines\");\n        }\n\n        // Commit\n        graph.tx().commit();\n\n        // Make sure the number of lines are correct -- 100 + 1 header + 1 tx, 1 header in the other\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(202, 1, txA, txB); // 1 header + 100 V + 1 tx + 99 E + 1tx, 1 header\n        assertPair(0, 2, vA, vB); // An empty log is flushed in the beginning, hence 2\n        assertPair(0, 2, eA, eB);\n\n        // Trigger a flush\n        bGraph.setTxLogThreshold(10); // 10 bytes -- definitely will trigger flush on next add\n\n        // Add dummy vertex with no props #101\n        graph.addVertex();\n\n        graph.tx().commit();\n\n        // Wait for flush\n        Thread.sleep(1000);\n\n        // Make sure the number of lines are correct\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(1, 1, txA, txB); // 1 header, 1 header\n        assertPair(0, 104, vA, vB); // 1 header + 1 log (on load) + 101 V + 1 log (on copy)\n        assertPair(0, 102, eA, eB); // 1 header + 1 log (on load) + 99 E + 1 log (on copy)\n\n        Path stage1 = tempDir(\"stage1\");\n        bGraph.backup(stage1);\n\n        // Set the min lines to a small value to trigger reorg -- more than 200 lines have been added, so the factor\n        // will kick in\n        bGraph.setMinLinesPerReorg(1);\n        assertEquals(bGraph.getMinLinesPerReorg(), 1);\n\n        // Add a dummy vertex #102\n        graph.addVertex();\n\n        graph.tx().commit();\n\n        // Wait for the flush followed by reorg\n        Thread.sleep(2000);\n\n        // Make sure the number of lines are correct\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(1, 1, txA, txB); // 1 header, 1 header\n        assertPair(0, 104, vA, vB); // 1 header + 102 V + 1 L\n        assertPair(0, 101, eA, eB); // 1 header + 99 E + 1 L\n\n        Path stage2 = tempDir(\"stage2\");\n        bGraph.backup(stage2);\n\n        // Modify the vertices to see if that takes effect\n        for (int i = 0; i < numVertices; i++) {\n            // Using the string representation\n            verts[i] = getVertex(graph, vids[i].toString());\n            verts[i].property(\"baz\", new Date());\n        }\n        graph.tx().commit();\n\n        // Lower reorg factor\n        bGraph.setReorgFactor(0.0001d);\n        bGraph.setMinLinesPerReorg(0);\n\n        // Wait for the flush followed by reorg\n        Thread.sleep(1000);\n\n        // Add a dummy vertex #103\n        graph.addVertex();\n        graph.tx().commit();\n\n        // Wait for the flush followed by reorg\n        Thread.sleep(2000);\n\n        // Increase the min lines and the factor to still trigger the reorg\n        bGraph.setMinLinesPerReorg(99);\n        bGraph.setReorgFactor(0.3d);\n        bGraph.setTxLogThreshold(1024 * 1024); // 1MB -- won't trigger flush\n\n        // Make sure the number of lines are correct\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(1, 1, txA, txB); // 1 header, 1 header\n        assertPair(0, 105, vA, vB); // 1 header + 103 V + 1 L\n        assertPair(0, 101, eA, eB); // 1 header + 99 E + 1 L\n\n        Path stage3 = tempDir(\"stage3\");\n        bGraph.backup(stage3);\n\n        // Remove the vertices\n        for (int i = 0; i < numVertices; i++) {\n            verts[i] = getVertex(graph, vids[i].toString());\n\n            // This will remove both the vertex and edge\n            removeVertex(graph, verts[i]);\n        }\n        graph.tx().commit();\n\n        // Wait for the flush followed by reorg\n        Thread.sleep(1000);\n\n        // Make sure the number of lines are correct\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(1, 102, txA, txB); // 1 header, 1 H + 100V header + 1 T\n        // assertPair(0, 105, vA, vB); // 1 header + 103 V + 1 L\n        assertPair(0, 106, vA, vB); // 1 header + 103 V + 1 L\n        // assertPair(0, 101, eA, eB);   // 1 header + 99 E + 1 L\n        assertPair(0, 102, eA, eB); // 1 header + 99 E + 1 L\n\n        // Backup will flush the buffers explicitly. Reorg will follow after backup\n        Path stage4 = tempDir(\"stage4\");\n        bGraph.backup(stage4);\n\n        // Wait for the flush followed by reorg\n        Thread.sleep(2000);\n\n        // Make sure the number of lines are correct\n        txA = lineCount(dbPath.resolve(Paths.get(\"txA.txt\")));\n        txB = lineCount(dbPath.resolve(Paths.get(\"txB.txt\")));\n        vA = lineCount(dbPath.resolve(Paths.get(\"vA.txt\")));\n        vB = lineCount(dbPath.resolve(Paths.get(\"vB.txt\")));\n        eA = lineCount(dbPath.resolve(Paths.get(\"eA.txt\")));\n        eB = lineCount(dbPath.resolve(Paths.get(\"eB.txt\")));\n\n        assertPair(1, 1, txA, txB); // 1 header, 1 header\n        assertPair(0, 5, vA, vB); // 1 header + 3 dummy V + 1 L\n        assertPair(0, 2, eA, eB); // 1 header + 0 E + 1 L\n    }\n\n    private void assertPair(int a, int b, int c, int d) {\n        if (a == c) {\n            assertEquals(b, d);\n        } else {\n            assertEquals(a, d);\n            assertEquals(b, c);\n        }\n    }\n\n    private int lineCount(Path file) throws Exception {\n        InputStream is = Files.newInputStream(file);\n        assertNotNull(is);\n        BufferedReader br = new BufferedReader(new InputStreamReader(is, FileBackedMemoryGraphStore.utf8));\n\n        int ans = 0;\n        String line = null;\n        while ((line = br.readLine()) != null) {\n            ans++;\n        }\n\n        br.close();\n        is.close();\n\n        return ans;\n    }\n\n    public void testLargeFileSaveLoad() throws Exception {\n        BitsyGraph bGraph = (BitsyGraph) graph;\n\n        if (!(bGraph.getStore() instanceof FileBackedMemoryGraphStore)) {\n            return;\n        }\n\n        FileBackedMemoryGraphStore store = (FileBackedMemoryGraphStore) (bGraph.getStore());\n\n        // Check defaults\n        assertEquals(1000, bGraph.getMinLinesPerReorg());\n        assertEquals(4 * 1024 * 1024, bGraph.getTxLogThreshold());\n        assertEquals(1d, bGraph.getReorgFactor());\n        assertTrue(store.allowFullGraphScans());\n\n        // Add a little -- shouldn't flush\n        int numCommit = 1000; // 5000\n        int numPerCommit = 100; // 1000\n        int numVertices = numCommit * numPerCommit;\n\n        // Object[] vids = new Object[numVertices];\n        // Vertex[] verts = new Vertex[numVertices];\n\n        long ts = System.currentTimeMillis();\n        Vertex prevV = null;\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = graph.addVertex();\n            v.property(\"foo\", \"bar\");\n            v.property(\"count\", i);\n            // vids[i] = v.getId();\n            // verts[i] = v;\n\n            if (prevV != null) {\n                addEdge(graph, prevV, v, \"test\");\n            }\n\n            if (i % numPerCommit == 0) {\n                prevV = null;\n                // System.out.println(\"Commit\");\n                graph.tx().commit();\n            } else {\n                prevV = v;\n            }\n        }\n\n        // Commit\n        graph.tx().commit();\n\n        double duration = System.currentTimeMillis() - ts;\n        System.out.println(\"Took \" + duration + \"ms to insert \" + numVertices + \" vertices. Rate = \"\n                + (duration / numVertices) + \"ms per vertex\");\n\n        bGraph.flushTxLog();\n\n        duration = System.currentTimeMillis() - ts;\n        System.out.println(\"Took \" + duration + \"ms to insert and flush \" + numVertices + \" vertices. Rate = \"\n                + (duration / numVertices) + \"ms per vertex\");\n\n        // Restart a few times\n        for (int j = 0; j < 3; j++) {\n            ts = System.currentTimeMillis();\n            tearDown();\n\n            duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to shut down graph with \" + numVertices + \" vertices. Rate = \"\n                    + (duration / numVertices) + \"ms per vertex\");\n\n            ts = System.currentTimeMillis();\n\n            doSetUp(false);\n\n            duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to load \" + numVertices + \" vertices. Rate = \"\n                    + (duration / numVertices) + \"ms per vertex\");\n\n            ts = System.currentTimeMillis();\n\n            checkIterCount(graph.vertices(), numVertices);\n            duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to query \" + numVertices + \" vertices. Rate = \"\n                    + (duration / numVertices) + \"ms per vertex\");\n        }\n    }\n\n    public void XtestMultiThreadedCommits() throws Exception {\n        for (int numThreads : new int[] {1, 2, 3, 4, 5, 10, 25, 50, 100, 150, 250, 500, 750, 1000}) {\n            final int numVerticesPerThread =\n                    (numThreads <= 10 ? 10000 : (numThreads <= 100 ? 100000 : 100000)) / numThreads;\n            int numElements = 2 * numVerticesPerThread * numThreads;\n\n            ExecutorService service = Executors.newFixedThreadPool(numThreads);\n\n            final Object[] startVertex = new Object[numThreads];\n\n            final CountDownLatch cdl = new CountDownLatch(numThreads);\n            long ts = System.currentTimeMillis();\n            final String TEST_LABEL = \"test\";\n            for (int i = 0; i < numThreads; i++) {\n                final int tid = i;\n                System.out.println(\"Scheduling write work for thread \" + tid);\n                service.submit(new Runnable() {\n                    @Override\n                    public void run() {\n                        Object prevId = null;\n                        for (int j = 0; j < numVerticesPerThread; j++) {\n                            Vertex v = graph.addVertex();\n                            if (prevId == null) {\n                                startVertex[tid] = v.id();\n                            } else {\n                                Vertex prevV = getVertex(graph, prevId);\n                                addEdge(graph, prevV, v, TEST_LABEL);\n                            }\n                            graph.tx().commit();\n\n                            prevId = v.id();\n                        }\n\n                        System.out.println(\"Thread \" + tid + \" is done\");\n                        cdl.countDown();\n                    }\n                });\n            }\n\n            cdl.await();\n\n            double duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to save \" + numElements + \" vertices+edges. Rate = \"\n                    + (duration / numElements) + \"ms per vertex. TPS = \" + ((double) numElements * 1000 / duration));\n\n            // Wait 10 seconds between tests\n            Thread.sleep(10000);\n\n            ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.READ_COMMITTED);\n            final CountDownLatch cdl2 = new CountDownLatch(numThreads);\n            ts = System.currentTimeMillis();\n            for (int i = 0; i < numThreads; i++) {\n                final int tid = i;\n                System.out.println(\"Scheduling read work for thread \" + tid);\n                service.submit(new Runnable() {\n                    @Override\n                    public void run() {\n                        for (int k = 0; k < 100; k++) {\n                            int count = 0;\n                            Vertex v = getVertex(graph, startVertex[tid]);\n\n                            Edge e;\n                            do {\n                                Iterator<Edge> eIter = v.edges(Direction.OUT);\n                                if (!eIter.hasNext()) {\n                                    break;\n                                } else {\n                                    count++;\n                                    v = eIter.next().inVertex();\n                                }\n                            } while (true);\n\n                            if (numVerticesPerThread != count + 1) {\n                                System.out.println(\"Mistmatch between \" + numVerticesPerThread + \" and \" + count);\n                            }\n\n                            graph.tx().commit();\n                        }\n\n                        System.out.println(\"Thread \" + tid + \" is done\");\n                        cdl2.countDown();\n                    }\n                });\n            }\n\n            cdl2.await();\n\n            duration = System.currentTimeMillis() - ts;\n            System.out.println(\"Took \" + duration + \"ms to query \" + numElements + \" vertices+edge 100 times. Rate = \"\n                    + (duration / numElements) + \"ms per vertex. TPS = \" + ((double) numElements * 100000 / duration));\n            ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.REPEATABLE_READ);\n\n            service.shutdown();\n\n            // Uncomment to look at memory usage\n            //            Thread.sleep(1000);\n            //            System.gc();\n            //            Thread.sleep(30000);\n\n            // Clear graph\n            tearDown();\n            doSetUp(true);\n        }\n    }\n\n    public void XtestMultiThreadedReadsOnBipartiteGraph() throws Exception {\n        final int numVertices = 1000000; // 100K vertices\n        final int numIters = 100000;\n        final int numElements = 8 * numIters; // expected to visit 8 v/e per iteration\n        final int partSize = numVertices / 2;\n        final int numPerCommit = 1000;\n\n        final String label = \"test\";\n        final Object[] outVertices = new Object[partSize];\n        final Object[] inVertices = new Object[partSize];\n\n        // Vertices\n        for (int i = 0; i < partSize; i++) {\n            outVertices[i] = graph.addVertex().id();\n            inVertices[i] = graph.addVertex().id();\n\n            if (i % numPerCommit == 0) {\n                graph.tx().commit();\n            }\n        }\n\n        // Edges\n        for (int i = 0; i < partSize; i++) {\n            Vertex outVertex = getVertex(graph, outVertices[i]);\n            outVertex.addEdge(label, getVertex(graph, inVertices[(5 * i + 1) % partSize]));\n            outVertex.addEdge(label, getVertex(graph, inVertices[(5 * i + 4) % partSize]));\n            outVertex.addEdge(label, getVertex(graph, inVertices[(5 * i + 7) % partSize]));\n\n            if (i % numPerCommit == 0) {\n                graph.tx().commit();\n            }\n        }\n        graph.tx().commit();\n\n        final int numRuns = 3;\n        Map<Integer, String> calcStrMap = new HashMap<>();\n\n        for (int run = 0; run < numRuns; run++) {\n            ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.READ_COMMITTED);\n            for (final int numThreads : new int[] {1, 2, 3, 4, 5, 10, 25, 50, 100, 150, 250, 500, 750, 1000}) {\n                ExecutorService service = Executors.newFixedThreadPool(numThreads);\n\n                final CountDownLatch cdl = new CountDownLatch(numThreads);\n                long ts = System.currentTimeMillis();\n\n                ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.READ_COMMITTED);\n                System.out.println(\"Running bi-partite read test with \" + numThreads + \" threads\");\n                for (int i = 0; i < numThreads; i++) {\n                    final int tid = i;\n                    // System.out.println(\"Scheduling read work for thread \" + tid);\n                    service.submit(new Runnable() {\n                        @Override\n                        public void run() {\n                            try {\n                                Vertex v = getVertex(graph, outVertices[0]);\n                                for (int k = 0; k < 100 * numIters / numThreads; k++) {\n                                    assertNotNull(v);\n\n                                    Vertex nextV = randomVertex(v.vertices(Direction.OUT, label));\n\n                                    assertNotNull(nextV);\n\n                                    // Take a random edge back\n                                    Vertex backV = randomVertex(nextV.vertices(Direction.IN));\n                                    if (backV != null) {\n                                        v = backV;\n                                    }\n                                }\n\n                                // System.out.println(\"Thread \" + tid  + \" is done\");\n                            } catch (Throwable t) {\n                                setException(t);\n                            } finally {\n                                cdl.countDown();\n                            }\n                        }\n\n                        private Vertex randomVertex(Iterator<Vertex> vertices) {\n                            List<Vertex> options = new ArrayList<Vertex>();\n                            while (vertices.hasNext()) {\n                                Vertex option = vertices.next();\n                                options.add(option);\n                            }\n\n                            if (options.isEmpty()) {\n                                return null;\n                            } else {\n                                return options.get(rand.nextInt(options.size()));\n                            }\n                        }\n                    });\n                }\n\n                cdl.await();\n\n                if (getException() != null) {\n                    throw new RuntimeException(\"Error in testMultiThreadedReadsOnBipartiteGraph\", getException());\n                }\n\n                service.shutdown();\n\n                long duration = System.currentTimeMillis() - ts;\n                double tps = ((double) numElements * 100000 / duration);\n                System.out.println(\n                        \"Took \" + duration + \"ms to query \" + numElements + \" vertices+edge 100 times. Rate = \"\n                                + (duration / numElements) + \"ms per vertex. TPS = \" + tps);\n\n                String calcStr = calcStrMap.get(numThreads);\n                if (calcStr == null) {\n                    calcStrMap.put(numThreads, \"=(\" + tps);\n                } else {\n                    calcStrMap.put(numThreads, calcStr + \" + \" + tps);\n                }\n            }\n        }\n\n        for (Map.Entry<Integer, String> entry : calcStrMap.entrySet()) {\n            System.out.println(entry.getKey() + \": \" + entry.getValue() + \")/3\");\n        }\n\n        ((BitsyGraph) graph).setDefaultIsolationLevel(BitsyIsolationLevel.REPEATABLE_READ);\n    }\n\n    // TODO: Uncomment after supporting threaded transactions\n    /*\n        public void testConcurrentAccessForIndexes() {\n            // Create an index\n            ((BitsyGraph)graph).dropKeyIndex(\"testKey\", Vertex.class);\n            ((BitsyGraph)graph).createKeyIndex(\"testKey\", Vertex.class);\n\n        \tfor (BitsyIsolationLevel level : new BitsyIsolationLevel[] {BitsyIsolationLevel.REPEATABLE_READ, BitsyIsolationLevel.READ_COMMITTED}) {\n        \t\t((BitsyGraph)graph).setDefaultIsolationLevel(level);\n        \t\tgraph.tx().commit();\n\n    \t        Vertex v = graph.addVertex();\n    \t        v.property(\"testKey\", \"foo\");\n\n    \t        graph.tx().commit();\n\n    \t        Vertex v1 = graph.addVertex();\n    \t        v1.property(\"testKey\", \"foo\");\n\n    \t        // Don't commit yet\n    \t        //TransactionalGraph anotherGraph = ((ThreadedTransactionalGraph)graph).newTransaction();\n    \t        Graph anotherGraph = graph.tx().createThreadedTx(); // TP3 version\n    \t        Iterator<BitsyVertex> indexResult = ((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"foo\");\n\n    \t        checkIterCount(indexResult, 1); // Queried before the commit\n\n    \t        // Now commit the new vertex\n    \t        graph.tx().commit();\n\n    \t        indexResult = ((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"foo\");\n    \t        checkIterCount(indexResult, 2); // Queried after the commit -- the iterator refreshes itself\n    \t        anotherGraph.tx().commit();\n\n    \t        //anotherGraph = ((ThreadedTransactionalGraph)graph).newTransaction();\n    \t        anotherGraph = graph.tx().createThreadedTx();\n    \t        indexResult = ((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"foo\");\n    \t        checkIterCount(indexResult, 2); // Queried after the commit\n    \t        anotherGraph.tx().commit();\n\n    \t        getVertex(graph, v.id()).remove();\n    \t        getVertex(graph, v1.id()).remove();\n    \t        graph.tx().commit();\n        \t}\n\n        \t((BitsyGraph)graph).setDefaultIsolationLevel(BitsyIsolationLevel.REPEATABLE_READ);\n            // Drop the index\n            ((BitsyGraph)graph).dropKeyIndex(\"testKey\", Vertex.class);\n        }\n    */\n\n    // TODO: Uncomment after supporting threaded transaction\n    /*\n        public void testConcurrentAccessForIndexes2() {\n            // Create an index\n            ((BitsyGraph)graph).dropKeyIndex(\"testKey\", Vertex.class);\n            ((BitsyGraph)graph).createKeyIndex(\"testKey\", Vertex.class);\n\n        \tfor (BitsyIsolationLevel level : new BitsyIsolationLevel[] {BitsyIsolationLevel.READ_COMMITTED, BitsyIsolationLevel.REPEATABLE_READ}) {\n        \t    System.out.println(\"Testing for \" + level);\n        \t\tVertex v = graph.addVertex();\n    \t        v.property(\"testKey\", \"foo\");\n\n    \t        graph.tx().commit();\n\n    \t        // Now read the vertex\n    \t        ((BitsyGraph)graph).setTxIsolationLevel(level);\n        \t\tVertex vBak = getVertex(graph, v.id());\n\n    \t        // ... and update it in a different thread\n    \t        //TransactionalGraph anotherGraph = graph.newTransaction();\n        \t\tGraph anotherGraph = graph.tx().createThreadedTx();\n    \t        Vertex v2 = ((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"foo\").next();\n    \t        v2.property(\"testKey\", \"bar\");\n    \t        anotherGraph.tx().commit();\n    \t        Vertex vBak2 = getVertex(anotherGraph, v2.id());\n\n    \t        // Re-query the old version with the new value\n    \t        if (level == BitsyIsolationLevel.READ_COMMITTED) {\n    \t        \tVertex vQuery = ((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"bar\").next();\n    \t\t        vQuery.property(\"testKey\", \"baz\");\n    \t        \t// Now commit the new vertex -- should succeed\n    \t        \tgraph.tx().commit();\n    \t        } else {\n    \t        \t// TODO: Identify why this fails with TP3...\n    \t        \t//assertFalse(((BitsyGraph)anotherGraph).verticesByIndex(\"testKey\", \"bar\").hasNext());\n    \t        }\n        \t}\n\n            // Drop the index\n            ((BitsyGraph)graph).dropKeyIndex(\"testKey\", Vertex.class);\n        }\n    */\n\n    public void testConcurrentAccessForVersions() throws InterruptedException {\n        Vertex v = graph.addVertex();\n        final Object vid = v.id();\n        v.property(\"testKey\", \"foo\");\n        graph.tx().commit();\n\n        v = getVertex(graph, vid);\n        assertEquals(\"foo\", v.value(\"testKey\"));\n\n        Thread t = new Thread() {\n            public void run() {\n                Vertex v = getVertex(graph, vid);\n                v.property(\"testKey\", \"bar\");\n                graph.tx().commit();\n            }\n        };\n\n        t.start();\n        t.join();\n\n        assertEquals(\"foo\", v.value(\"testKey\"));\n\n        try {\n            v.property(\"testKey\", \"baz\");\n            graph.tx().commit();\n\n            fail(\"Should throw concurrent mod exception\");\n        } catch (BitsyRetryException e) {\n            // Ignore\n        }\n\n        v = getVertex(graph, vid);\n        assertEquals(\"bar\", v.value(\"testKey\"));\n        v.property(\"testKey\", \"baz\");\n        assertEquals(\"baz\", v.value(\"testKey\"));\n        graph.tx().commit();\n\n        v = getVertex(graph, vid);\n        Vertex v2 = graph.addVertex();\n\n        Edge e12 = v.addEdge(\"foo\", v2);\n\n        v.remove();\n        removeVertex(graph, v2);\n\n        try {\n            v.remove();\n            fail(\"Should throw exception\");\n        } catch (BitsyException e) {\n            assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n        }\n\n        try {\n            e12.remove();\n        } catch (BitsyException e) {\n            assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n        }\n\n        try {\n            v2.remove();\n            fail(\"Should throw exception\");\n        } catch (BitsyException e) {\n            assertEquals(BitsyErrorCodes.ELEMENT_ALREADY_DELETED, e.getErrorCode());\n        }\n\n        graph.tx().commit();\n    }\n\n    public void testLargeDegreePerformance() {\n        long ts = System.currentTimeMillis();\n\n        Vertex one = graph.addVertex();\n        one.property(\"one\", \"1\");\n        Object oneId = one.id();\n\n        int numVertices = 10000; // 1000000;\n        Object[] vids = new Object[numVertices];\n        for (int i = 0; i < numVertices; i++) { // Change to 1M for perf\n            Vertex many = graph.addVertex();\n            many.property(\"many\", \"2\");\n            addEdge(graph, one, many, \"toMany\");\n            vids[i] = many.id();\n\n            if (i % 1000 == 0) {\n                System.out.println(i + \" 1000 in \" + (System.currentTimeMillis() - ts));\n                ts = System.currentTimeMillis();\n\n                graph.tx().commit();\n                one = graph.vertices(oneId).next();\n            }\n        }\n\n        for (int i = 0; i < numVertices; i++) {\n            Vertex v = getVertex(graph, vids[i]);\n\n            Iterator<Edge> iter = v.edges(Direction.BOTH);\n            assertTrue(iter.hasNext());\n            iter.next();\n            assertFalse(iter.hasNext());\n\n            v.remove();\n\n            if (i % 1000 == 0) {\n                System.out.println(i + \" 1000 in \" + (System.currentTimeMillis() - ts));\n\n                if (i % 5000 == 0) {\n                    Iterator<Edge> iter2 = getVertex(graph, one.id()).edges(Direction.BOTH);\n                    for (int j = 0; j < numVertices - i - 1; j++) {\n                        assertTrue(iter2.hasNext());\n                        iter2.next();\n                    }\n                    assertFalse(iter.hasNext());\n                }\n\n                ts = System.currentTimeMillis();\n\n                graph.tx().commit();\n            }\n        }\n\n        graph.tx().commit();\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/BitsyMemGraphIT.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.Record;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\nimport org.apache.tinkerpop.gremlin.structure.Edge;\nimport org.apache.tinkerpop.gremlin.structure.Vertex;\n\npublic class BitsyMemGraphIT extends BitsyGraphIT {\n    public boolean isPersistent() {\n        return false;\n    }\n\n    public void setUp() {\n        System.out.println(\"Setting up memory-only graph\");\n        graph = new BitsyGraph(false);\n    }\n\n    public void tearDown() {\n        System.out.println(\"Tearing down graph\");\n        try {\n            graph.close();\n        } catch (Exception e) {\n            throw new RuntimeException(\"Couldn't close\", e);\n        }\n    }\n\n    public void testPersistence() {\n        // Disable\n    }\n\n    public void testObsolescence() {\n        IGraphStore store = ((BitsyGraph) graph).getStore();\n\n        // Create a vertex\n        Vertex v = graph.addVertex();\n        Object vid = v.id();\n        v.property(\"foo\", \"bar\");\n\n        // Self edge\n        Edge e = v.addEdge(\"self\", v);\n        Object eid = e.id();\n\n        graph.tx().commit();\n\n        Record v1MRec = new Record(RecordType.V, \"{\\\"id\\\":\\\"\" + vid + \"\\\",\\\"v\\\":1,\\\"s\\\":\\\"M\\\"}\");\n        assertFalse(v1MRec.checkObsolete(store, false, 1, null));\n        assertFalse(v1MRec.checkObsolete(store, true, 1, null));\n\n        Record e1MRec = new Record(\n                RecordType.E,\n                \"{\\\"id\\\":\\\"\" + eid + \"\\\",\\\"v\\\":1,\\\"s\\\":\\\"M\\\",\\\"o\\\":\\\"\" + vid + \"\\\",\\\"l\\\":\\\"\" + vid + \"\\\",\\\"i\\\":\\\"\" + vid\n                        + \"\\\"}\");\n        assertFalse(e1MRec.checkObsolete(store, false, 1, null));\n        assertFalse(e1MRec.checkObsolete(store, true, 1, null));\n\n        // Create a vertex\n        v = graph.vertices(vid).next();\n        v.property(\"foo\", \"baz\");\n\n        e = v.edges(Direction.IN, \"self\").next();\n        e.property(\"foo\", \"baz\");\n\n        graph.tx().commit();\n\n        Record v2MRec = new Record(RecordType.V, \"{\\\"id\\\":\\\"\" + vid + \"\\\",\\\"v\\\":2,\\\"s\\\":\\\"M\\\"}\");\n        Record v1DRec = new Record(RecordType.V, \"{\\\"id\\\":\\\"\" + vid + \"\\\",\\\"v\\\":1,\\\"s\\\":\\\"D\\\"}\");\n\n        assertTrue(v1MRec.checkObsolete(store, false, 1, null));\n        assertTrue(v1MRec.checkObsolete(store, true, 1, null));\n\n        assertFalse(v1DRec.checkObsolete(store, false, 1, null));\n        assertTrue(v1DRec.checkObsolete(store, true, 1, null));\n\n        assertFalse(v2MRec.checkObsolete(store, false, 1, null));\n        assertFalse(v2MRec.checkObsolete(store, true, 1, null));\n\n        Record e2MRec = new Record(\n                RecordType.E,\n                \"{\\\"id\\\":\\\"\" + eid + \"\\\",\\\"v\\\":2,\\\"s\\\":\\\"M\\\",\\\"o\\\":\\\"\" + vid + \"\\\",\\\"l\\\":\\\"\" + vid + \"\\\",\\\"i\\\":\\\"\" + vid\n                        + \"\\\"}\");\n        Record e1DRec = new Record(\n                RecordType.E,\n                \"{\\\"id\\\":\\\"\" + eid + \"\\\",\\\"v\\\":1,\\\"s\\\":\\\"D\\\",\\\"o\\\":\\\"\" + vid + \"\\\",\\\"l\\\":\\\"\" + vid + \"\\\",\\\"i\\\":\\\"\" + vid\n                        + \"\\\"}\");\n\n        assertTrue(e1MRec.checkObsolete(store, false, 1, null));\n        assertTrue(e1MRec.checkObsolete(store, true, 1, null));\n\n        assertFalse(e1DRec.checkObsolete(store, false, 1, null));\n        assertTrue(e1DRec.checkObsolete(store, true, 1, null));\n\n        assertFalse(e2MRec.checkObsolete(store, false, 1, null));\n        assertFalse(e2MRec.checkObsolete(store, true, 1, null));\n\n        // Delete vertex\n        v = graph.vertices(vid).next();\n        v.remove();\n\n        // Edge will get deleted automatically!\n\n        graph.tx().commit();\n\n        Record v2DRec = new Record(RecordType.V, \"{\\\"id\\\":\\\"\" + vid + \"\\\",\\\"v\\\":1,\\\"s\\\":\\\"D\\\"}\");\n        assertFalse(v2DRec.checkObsolete(store, false, 1, null));\n        assertTrue(v2DRec.checkObsolete(store, true, 1, null));\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/FileBasedTestCase.java",
    "content": "package com.lambdazen.bitsy;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URL;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport junit.framework.TestCase;\n\npublic class FileBasedTestCase extends TestCase {\n    public Path tempDir(String dirName) throws IOException {\n        return tempDir(dirName, true);\n    }\n\n    public Path tempDir(String dirName, boolean delete) throws IOException {\n        String clsUri = this.getClass().getName().replace('.', '/') + \".class\";\n        URL url = this.getClass().getClassLoader().getResource(clsUri);\n        String clsPath = url.getPath();\n        System.out.println(clsPath);\n        String dir = clsPath.substring(clsPath.indexOf(\":\") + 1, clsPath.length() - clsUri.length());\n        System.out.println(dir);\n        Path root = Paths.get(dir).resolve(\"../\" + dirName).normalize();\n        System.out.println(root);\n\n        if (!Files.exists(root)) {\n            Files.createDirectory(root);\n        }\n\n        if (delete) {\n            deleteDirectory(root.toFile(), false);\n        }\n\n        return root;\n    }\n\n    protected static void deleteDirectory(final File directory, boolean deleteDir) {\n        if (directory.exists()) {\n            for (File file : directory.listFiles()) {\n                if (file.isDirectory()) {\n                    deleteDirectory(file, true);\n                } else {\n                    file.delete();\n                }\n            }\n\n            if (deleteDir) {\n                directory.delete();\n            }\n        }\n    }\n\n    public void testDummy() throws IOException {\n        tempDir(\"temp-dir\");\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/RecoveryTest.java",
    "content": "package com.lambdazen.bitsy;\n\nimport com.lambdazen.bitsy.store.LoadTask;\nimport java.net.URL;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.nio.file.StandardCopyOption;\nimport java.util.Iterator;\n\npublic class RecoveryTest extends FileBasedTestCase {\n    public RecoveryTest() {}\n\n    public void testPartialTx() throws Exception {\n        for (long minSizeForParallelLoader : new long[] {10, 1024 * 1024}) {\n            // Try with both the parallel and serial loaders\n            LoadTask.MIN_SIZE_FOR_PARALLEL_LOADER = minSizeForParallelLoader;\n\n            URL url = this.getClass().getClassLoader().getResource(\"recovery\");\n            Path rootPath = Paths.get(url.toURI());\n            System.out.println(\"Path = \" + rootPath);\n\n            String[] fileNames =\n                    new String[] {\"txA.txt\", \"txB.txt\", \"vA.txt\", \"vB.txt\", \"eA.txt\", \"eB.txt\", \"metaA.txt\", \"metaB.txt\"\n                    };\n\n            Path targetDir = tempDir(\"recoverytest\");\n            String[] paths = {\"stage1\", \"stage2\", \"stage3\", \"stage4\", \"stage5\", \"stage6\", \"stage7\"};\n\n            int[] vCounts = new int[] {50, 50, 100, 75, 75, 101, 101};\n            int[] eCounts = new int[] {0, 0, 0, 0, 0, 99, 99};\n\n            for (int i = 0; i < paths.length; i++) {\n                System.out.println(\"Deleting \" + targetDir);\n                deleteDirectory(targetDir.toFile(), false);\n\n                Path sourceDir = rootPath.resolve(\"./\" + paths[i]).normalize();\n                System.out.println(\"Copying from \" + sourceDir);\n                for (String fileName : fileNames) {\n                    Files.copy(\n                            sourceDir.resolve(fileName),\n                            targetDir.resolve(fileName),\n                            StandardCopyOption.REPLACE_EXISTING);\n                }\n\n                BitsyGraph graph = new BitsyGraph(targetDir);\n\n                checkIterCount(graph.vertices(), vCounts[i]);\n                checkIterCount(graph.edges(), eCounts[i]);\n                graph.shutdown();\n            }\n        }\n    }\n\n    private void checkIterCount(Iterator<?> iter, int expectedCount) {\n        int count = 0;\n        while (iter.hasNext()) {\n            iter.next();\n            count++;\n        }\n\n        assertEquals(expectedCount, count);\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/ads/dict/DictionaryTest.java",
    "content": "package com.lambdazen.bitsy.ads.dict;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Random;\nimport junit.framework.TestCase;\n\npublic class DictionaryTest extends TestCase {\n    private Random rand = new Random();\n\n    public void testBasicExpandContract() {\n        Dictionary dict = new Dictionary1(\"foo\", \"bar\");\n\n        assertEquals(1, dict.getPropertyKeys().length);\n        assertEquals(\"foo\", dict.getPropertyKeys()[0]);\n        assertEquals(\"bar\", dict.getProperty(\"foo\"));\n\n        dict = dict.setProperty(\"foo\", \"baz\");\n\n        assertEquals(Dictionary1.class, dict.getClass());\n        assertEquals(1, dict.getPropertyKeys().length);\n        assertEquals(\"foo\", dict.getPropertyKeys()[0]);\n        assertEquals(\"baz\", dict.getProperty(\"foo\"));\n\n        // Move up\n        dict = dict.setProperty(\"foo1\", \"bar1\");\n\n        assertEquals(Dictionary2.class, dict.getClass());\n        assertEquals(2, dict.getPropertyKeys().length);\n        assertEquals(\"baz\", dict.getProperty(\"foo\"));\n        assertEquals(\"bar1\", dict.getProperty(\"foo1\"));\n\n        // Move down\n        dict = dict.removeProperty(\"foo\");\n        assertEquals(Dictionary1.class, dict.getClass());\n        assertEquals(1, dict.getPropertyKeys().length);\n        assertEquals(\"bar1\", dict.getProperty(\"foo1\"));\n\n        // Move up\n        dict = dict.setProperty(\"foo2\", \"bar2\");\n\n        assertEquals(Dictionary2.class, dict.getClass());\n        assertEquals(2, dict.getPropertyKeys().length);\n        assertEquals(\"bar1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"bar2\", dict.getProperty(\"foo2\"));\n\n        // Overwrite foo2\n        dict = dict.setProperty(\"foo2\", \"baz2\");\n\n        assertEquals(Dictionary2.class, dict.getClass());\n        assertEquals(2, dict.getPropertyKeys().length);\n        assertEquals(\"bar1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n\n        // Move up to 3\n        dict = dict.setProperty(\"foo3\", \"bar3\");\n\n        assertEquals(Dictionary3.class, dict.getClass());\n        assertEquals(3, dict.getPropertyKeys().length);\n        assertEquals(\"bar1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar3\", dict.getProperty(\"foo3\"));\n\n        // Overwrite foo1\n        dict = dict.setProperty(\"foo1\", \"baz1\");\n\n        assertEquals(Dictionary3.class, dict.getClass());\n        assertEquals(3, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar3\", dict.getProperty(\"foo3\"));\n\n        // Move up to 4\n        dict = dict.setProperty(\"foo4\", \"bar4\");\n\n        assertEquals(Dictionary4.class, dict.getClass());\n        assertEquals(4, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar3\", dict.getProperty(\"foo3\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n\n        // Move up to 5\n        dict = dict.setProperty(\"foo5\", \"bar5\");\n\n        assertEquals(Dictionary6.class, dict.getClass());\n        assertEquals(5, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar3\", dict.getProperty(\"foo3\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n\n        // Move up to 6\n        dict = dict.setProperty(\"foo6\", \"bar6\");\n\n        assertEquals(Dictionary6.class, dict.getClass());\n        assertEquals(6, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar3\", dict.getProperty(\"foo3\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n        assertEquals(\"bar6\", dict.getProperty(\"foo6\"));\n\n        // Move down to 5\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo3\");\n\n        assertEquals(Dictionary6.class, dict.getClass());\n        assertEquals(5, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n        assertEquals(\"bar6\", dict.getProperty(\"foo6\"));\n\n        // Move down to 4\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo6\");\n\n        assertEquals(Dictionary4.class, dict.getClass());\n        assertEquals(4, dict.getPropertyKeys().length);\n        assertEquals(\"baz1\", dict.getProperty(\"foo1\"));\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n\n        // Move down to 3\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo1\");\n\n        assertEquals(Dictionary3.class, dict.getClass());\n        assertEquals(3, dict.getPropertyKeys().length);\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar4\", dict.getProperty(\"foo4\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n\n        // Move down to 2\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo4\");\n\n        assertEquals(Dictionary2.class, dict.getClass());\n        assertEquals(2, dict.getPropertyKeys().length);\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n        assertEquals(\"bar5\", dict.getProperty(\"foo5\"));\n\n        // Move down to 1\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo5\");\n\n        assertEquals(Dictionary1.class, dict.getClass());\n        assertEquals(1, dict.getPropertyKeys().length);\n        assertEquals(\"baz2\", dict.getProperty(\"foo2\"));\n\n        // Move down to 0\n        dict = dict.removeProperty(\"invalidKey\"); // invalid key\n        dict = dict.removeProperty(\"foo2\");\n\n        assertNull(dict);\n    }\n\n    public void testRandomExpandContract() {\n        randomTestIter(5000, 171);\n        randomTestIter(100000, 17);\n    }\n\n    public void randomTestIter(int numIters, int numKeys) {\n        Map<String, Object> reference = new HashMap<String, Object>();\n\n        Dictionary dict = null;\n\n        for (int i = 0; i < numIters; i++) {\n            String key = \"key \" + (i % numKeys);\n            Object value = getRandomObject();\n\n            if (rand.nextBoolean() || rand.nextBoolean()) {\n                // Prob 0.75 to set\n                if (dict == null) {\n                    dict = new Dictionary1(key, value);\n                } else {\n                    dict = dict.setProperty(key, value);\n                }\n\n                reference.put(key, value);\n            } else {\n                // Prob 0.25 to remove\n                if (dict != null) {\n                    dict = dict.removeProperty(key);\n                }\n\n                reference.remove(key);\n            }\n\n            if ((rand.nextInt() % 2 == 0) && dict != null) {\n                dict = dict.copyOf();\n            }\n\n            compareAgainstMap(dict, reference);\n        }\n    }\n\n    public void compareAgainstMap(Dictionary dict, Map<String, Object> reference) {\n        String[] keys = (dict == null) ? new String[0] : dict.getPropertyKeys();\n\n        assertEquals(reference.size(), keys.length);\n        for (int i = 0; i < keys.length; i++) {\n            assertEquals(reference.get(keys[i]), dict.getProperty(keys[i]));\n        }\n\n        if (rand.nextInt() % 2 == 0) {\n            dict = DictionaryFactory.fromMap(reference);\n        }\n    }\n\n    public Object getRandomObject() {\n        long time = System.currentTimeMillis();\n\n        if (rand.nextBoolean()) {\n            if (rand.nextBoolean()) {\n                return time;\n            } else {\n                return \"\" + time;\n            }\n        } else {\n            if (rand.nextBoolean()) {\n                return new StringBuilder(\"\" + time);\n            } else {\n                return null;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/ads/set/CompactMultiSetMaxTest.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\nimport java.util.Arrays;\nimport junit.framework.TestCase;\n\npublic class CompactMultiSetMaxTest extends TestCase {\n    public CompactMultiSetMaxTest() {}\n\n    public void testSimpleUse() {\n        CompactMultiSetMax<String, String> test = new CompactMultiSetMax<String, String>(4, false);\n\n        ClassifierGetter<String, String> c = new ClassifierGetter<String, String>() {\n            @Override\n            public String getClassifier(String obj) {\n                return obj.substring(0, 3);\n            }\n        };\n\n        test = test.add(\"fooBar\", c); // classifier is foo\n        test = test.add(\"fooBaz\", c); // classifier is foo\n\n        test = test.add(\"barBar\", c); // classifier is bar\n        test = test.add(\"barBaz\", c); // classifier is bar\n\n        Object[] fooStuff = test.getSuperSetWithClassifier(\"foo\");\n        Arrays.sort(fooStuff);\n        assertEquals(2, fooStuff.length);\n        assertEquals(\"fooBar\", fooStuff[0]);\n        assertEquals(\"fooBaz\", fooStuff[1]);\n\n        Object[] barStuff = test.getSuperSetWithClassifier(\"bar\");\n        Arrays.sort(barStuff);\n        assertEquals(2, barStuff.length);\n        assertEquals(\"barBar\", barStuff[0]);\n        assertEquals(\"barBaz\", barStuff[1]);\n\n        test = test.remove(\"fooBar\", c);\n        test = test.remove(\"fooBaz\", c);\n        test = test.remove(\"barBaz\", c);\n\n        fooStuff = test.getSuperSetWithClassifier(\"foo\");\n        assertEquals(0, fooStuff.length);\n\n        barStuff = test.getSuperSetWithClassifier(\"bar\");\n        assertEquals(1, barStuff.length);\n        assertEquals(\"barBar\", barStuff[0]);\n\n        test = test.remove(\"barBar\", c);\n\n        for (Object elem : test.elements) {\n            assertNull(elem);\n        }\n\n        assertEquals(0, test.getOccupiedCells());\n    }\n\n    public void testResize() {\n        CompactMultiSetMax<Integer, Integer> test;\n\n        // Repeat the test 100 times\n        final int numEntries = 10000;\n        for (int numRun = 0; numRun < 10; numRun++) {\n            for (int factor : new int[] {10, 100, 1000}) {\n                final int factorFinal = factor;\n                ClassifierGetter<Integer, Integer> c = new ClassifierGetter<Integer, Integer>() {\n                    @Override\n                    public Integer getClassifier(Integer obj) {\n                        return obj % (numEntries / factorFinal);\n                    }\n                };\n\n                test = new CompactMultiSetMax<Integer, Integer>(4, false);\n\n                for (int i = 0; i < numEntries; i++) {\n                    test = test.add(i, c);\n\n                    assertTrue(test.getOccupiedCells() > 0);\n                }\n\n                for (int key = 0; key < numEntries / factor; key++) {\n                    Object[] matches = test.getSuperSetWithClassifier(key);\n\n                    int count = 0;\n                    for (Object match : matches) {\n                        if (((Integer) match) % (numEntries / factor) == key) {\n                            count++;\n                        }\n                    }\n\n                    assertEquals(factor, count);\n                }\n\n                for (int i = 0; i < numEntries / 2; i++) {\n                    test = test.remove(i, c);\n\n                    // Also remove some random things that can't be there\n                    if (i % 13 == 0) {\n                        // test = test.remove(-i, c);\n                    }\n                }\n\n                for (int key = 0; key < numEntries / factor; key++) {\n                    Object[] matches = test.getSuperSetWithClassifier(key);\n\n                    int count = 0;\n                    for (Object match : matches) {\n                        if (((Integer) match) % (numEntries / factor) == key) {\n                            count++;\n                        }\n                    }\n\n                    assertEquals(factor / 2, count);\n                }\n\n                for (int i = numEntries / 2; i < numEntries; i++) {\n                    test = test.remove(i, c);\n                }\n\n                assertEquals(0, test.getOccupiedCells());\n\n                for (Object elem : test.elements) {\n                    assertNull(\n                            \"For factor \" + factor + \" and numEntries \" + numEntries + \" with elements \"\n                                    + Arrays.asList(CompactSet.getElements(elem)) + \" as \" + elem,\n                            elem);\n                }\n\n                for (int key = 0; key < numEntries; key++) {\n                    Object[] matches = test.getSuperSetWithClassifier(key);\n\n                    assertEquals(0, matches.length);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/ads/set/SetTest.java",
    "content": "package com.lambdazen.bitsy.ads.set;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Random;\nimport junit.framework.TestCase;\n\npublic class SetTest extends TestCase {\n    private Random rand = new Random();\n\n    public void testBasicExpandContract() {\n        Object set = null; // empty set\n\n        // Test remove on null\n        set = CompactSet.remove(set, \"foo\");\n\n        // Add foo\n        set = CompactSet.add(set, \"foo\");\n        assertEquals(1, CompactSet.size(set));\n        Object[] elements = CompactSet.getElements(set);\n        assertEquals(\"foo\", elements[0]);\n\n        // Add foo again\n        set = CompactSet.add(set, \"foo\");\n        assertEquals(1, CompactSet.size(set));\n        elements = CompactSet.getElements(set);\n        assertEquals(\"foo\", elements[0]);\n\n        set = CompactSet.add(set, \"bar\");\n        assertEquals(2, CompactSet.size(set));\n        assertEquals(\"foo\", CompactSet.getElements(set)[0]);\n        assertEquals(\"bar\", CompactSet.getElements(set)[1]);\n\n        // Move down to 0\n        set = CompactSet.remove(set, \"foo\"); // invalid key\n        assertEquals(1, CompactSet.size(set));\n        assertEquals(\"bar\", CompactSet.getElements(set)[0]);\n\n        set = CompactSet.remove(set, \"foo\"); // invalid key\n        assertEquals(1, CompactSet.size(set));\n        assertEquals(\"bar\", CompactSet.getElements(set)[0]);\n\n        set = CompactSet.remove(set, \"bar\");\n        assertNull(set);\n    }\n\n    public void testRandomExpandContract() {\n        randomTestIter(5000, 171);\n        randomTestIter(100000, 17);\n    }\n\n    public void testClassTypes() {\n        Object set = null; // empty set\n\n        set = CompactSet.<Integer>add(set, 1);\n        assertEquals(1, CompactSet.size(set));\n        assertEquals(Integer.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 1);\n        assertEquals(1, CompactSet.size(set));\n        assertEquals(Integer.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 2);\n        assertEquals(2, CompactSet.size(set));\n        assertEquals(Set2.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 2);\n        assertEquals(2, CompactSet.size(set));\n        assertEquals(Set2.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 3);\n        assertEquals(3, CompactSet.size(set));\n        assertEquals(Set3.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 4);\n        assertEquals(4, CompactSet.size(set));\n        assertEquals(Set4.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 5);\n        assertEquals(5, CompactSet.size(set));\n        assertEquals(Set6.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 6);\n        assertEquals(6, CompactSet.size(set));\n        assertEquals(Set6.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 7);\n        assertEquals(7, CompactSet.size(set));\n        assertEquals(Set8.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 8);\n        assertEquals(8, CompactSet.size(set));\n        assertEquals(Set8.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 9);\n        assertEquals(9, CompactSet.size(set));\n        assertEquals(Set12.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 10);\n        assertEquals(10, CompactSet.size(set));\n        assertEquals(Set12.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 11);\n        assertEquals(11, CompactSet.size(set));\n        assertEquals(Set12.class, set.getClass());\n\n        set = CompactSet.<Integer>add(set, 12);\n        assertEquals(12, CompactSet.size(set));\n        assertEquals(Set12.class, set.getClass());\n\n        for (int i = 13; i <= 24; i++) {\n            set = CompactSet.<Integer>add(set, i);\n            assertEquals(i, CompactSet.size(set));\n            assertEquals(Set24.class, set.getClass());\n        }\n\n        set = CompactSet.<Integer>add(set, 25);\n        assertEquals(25, CompactSet.size(set));\n        assertEquals(SetMax.class, set.getClass());\n\n        // Remove\n        for (int i = 25; i > 9; i--) {\n            set = CompactSet.<Integer>remove(set, i);\n            assertEquals(i - 1, CompactSet.size(set));\n\n            if (i > 17) {\n                assertEquals(SetMax.class, set.getClass());\n            } else if (i > 13) {\n                assertTrue((set instanceof Set24) || (set instanceof SetMax)); // Depends on hashcode\n            } else {\n                assertEquals(Set12.class, set.getClass());\n            }\n        }\n\n        set = CompactSet.<Integer>remove(set, 9);\n        assertEquals(8, CompactSet.size(set));\n        assertEquals(Set8.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 8);\n        assertEquals(7, CompactSet.size(set));\n        assertEquals(Set8.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 7);\n        assertEquals(6, CompactSet.size(set));\n        assertEquals(Set6.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 6);\n        assertEquals(5, CompactSet.size(set));\n        assertEquals(Set6.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 5);\n        assertEquals(4, CompactSet.size(set));\n        assertEquals(Set4.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 4);\n        assertEquals(3, CompactSet.size(set));\n        assertEquals(Set3.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 3);\n        assertEquals(2, CompactSet.size(set));\n        assertEquals(Set2.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 2);\n        assertEquals(1, CompactSet.size(set));\n        assertEquals(Integer.class, set.getClass());\n\n        set = CompactSet.<Integer>remove(set, 1);\n        assertNull(set);\n    }\n\n    public void randomTestIter(int numIters, int numKeys) {\n        for (boolean safe : new boolean[] {true, false}) {\n            System.out.println(\"randomTestIter: \" + numIters + \", \" + numKeys + \", \" + safe);\n\n            java.util.Set<String> reference = new HashSet<String>();\n\n            Object set = null;\n\n            for (int i = 0; i < numIters; i++) {\n                String key = \"key \" + (i % numKeys);\n\n                if (rand.nextBoolean() || rand.nextBoolean()) {\n                    // Prob 0.75 to set\n                    if (safe) {\n                        set = CompactSet.addSafe(set, key);\n                    } else {\n                        set = CompactSet.add(set, key);\n                    }\n\n                    reference.add(key);\n                } else {\n                    // Prob 0.25 to remove\n                    set = CompactSet.remove(set, key);\n\n                    reference.remove(key);\n                }\n\n                compareAgainstSet(set, reference);\n            }\n        }\n    }\n\n    public void compareAgainstSet(Object set, java.util.Set<String> reference) {\n        Object[] keys = CompactSet.getElements(set);\n\n        List myKeys = Arrays.asList(keys);\n        List refKeys = Arrays.asList(reference.toArray());\n\n        Collections.sort(myKeys);\n        Collections.sort(refKeys);\n\n        assertEquals(reference.size(), keys.length);\n        assertEquals(reference.size(), CompactSet.size(set));\n        assertEquals(refKeys, myKeys);\n    }\n\n    public Object getRandomObject() {\n        long time = System.currentTimeMillis();\n\n        if (rand.nextBoolean()) {\n            if (rand.nextBoolean()) {\n                return time;\n            } else {\n                return \"\" + time;\n            }\n        } else {\n            if (rand.nextBoolean()) {\n                return new StringBuilder(\"\" + time);\n            } else {\n                return null;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/store/EndpointTest.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.UUID;\nimport junit.framework.TestCase;\n\npublic class EndpointTest extends TestCase {\n    public EndpointTest() {}\n\n    public void testCompare() throws Exception {\n        UUID vid = UUID.randomUUID();\n        UUID eid = UUID.randomUUID();\n        Endpoint e1;\n        Endpoint e2;\n\n        e1 = new Endpoint(null, null);\n        e1.setMarker();\n        e2 = new Endpoint(null, eid);\n\n        assertTrue(e1.isMatch(e2));\n        assertEquals(-1, e1.compareTo(e2));\n        assertEquals(1, e2.compareTo(e1));\n\n        e2 = new Endpoint(\"something\", eid);\n        assertTrue(e1.isMatch(e2));\n        assertEquals(-1, e1.compareTo(e2));\n        assertEquals(1, e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        //        e2 = new Endpoint(eid, null, eid);\n        //        assertFalse(e1.isMatch(e2));\n        //        assertEquals(vid.compareTo(eid), e1.compareTo(e2));\n        //        assertEquals(-vid.compareTo(eid), e2.compareTo(e1));\n        //        assertFalse(e1.equals(e2));\n\n        e1 = new Endpoint(\"foo\", null);\n        e1.setMarker();\n\n        e2 = new Endpoint(\"foo\", eid);\n\n        assertTrue(e1.isMatch(e2));\n        assertEquals(-1, e1.compareTo(e2));\n        assertEquals(1, e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e2 = new Endpoint(\"bar\", eid);\n        assertFalse(e1.isMatch(e2));\n        assertEquals(\"foo\".compareTo(\"bar\"), e1.compareTo(e2));\n        assertEquals(\"bar\".compareTo(\"foo\"), e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e1 = new Endpoint(\"foo\", eid);\n        e1.setMarker();\n\n        e2 = new Endpoint(\"foo\", eid);\n        assertTrue(e1.isMatch(e2));\n        assertEquals(-1, e1.compareTo(e2));\n        assertEquals(1, e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e2 = new Endpoint(\"bar\", eid);\n        assertFalse(e1.isMatch(e2));\n        assertEquals(\"foo\".compareTo(\"bar\"), e1.compareTo(e2));\n        assertEquals(\"bar\".compareTo(\"foo\"), e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e2 = new Endpoint(\"foo\", vid);\n        assertFalse(e1.isMatch(e2));\n        assertEquals(eid.compareTo(vid), e1.compareTo(e2));\n        assertEquals(-eid.compareTo(vid), e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e1 = new Endpoint(\"foo\", eid);\n\n        e2 = new Endpoint(\"foo\", eid);\n        assertEquals(0, e1.compareTo(e2));\n        assertEquals(e1, e2);\n\n        e2 = new Endpoint(\"bar\", eid);\n        assertEquals(\"foo\".compareTo(\"bar\"), e1.compareTo(e2));\n        assertEquals(\"bar\".compareTo(\"foo\"), e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        e2 = new Endpoint(\"foo\", vid);\n        assertEquals(eid.compareTo(vid), e1.compareTo(e2));\n        assertEquals(vid.compareTo(eid), e2.compareTo(e1));\n        assertFalse(e1.equals(e2));\n\n        //        e2 = new Endpoint(eid, \"foo\", vid);\n        //        assertEquals(vid.compareTo(eid), e1.compareTo(e2));\n        //        assertEquals(eid.compareTo(vid), e2.compareTo(e1));\n        //        assertFalse(e1.equals(e2));\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/store/FileBackedMemoryGraphStoreTest.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.FileBasedTestCase;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.DictionaryFactory;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.TreeMap;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\n\npublic class FileBackedMemoryGraphStoreTest extends FileBasedTestCase {\n    FileBackedMemoryGraphStore store;\n\n    public FileBackedMemoryGraphStoreTest() {}\n\n    protected void setUp() throws Exception {\n        System.out.println(\"Making DB\");\n        this.store = new FileBackedMemoryGraphStore(\n                new MemoryGraphStore(true), tempDir(\"test-fbmgst\"), 2 * 1024, 1); // 2K buffer to test rollover\n        System.out.println(\"Made DB\");\n    }\n\n    protected void tearDown() throws Exception {\n        store.shutdown();\n        System.out.println(\"Close\");\n    }\n\n    //    public void testOpenClose() {\n    //        System.out.println(\"Opened DB\");\n    //    }\n\n    public void testSomething() {\n        Map foo = new TreeMap();\n        foo.put(1, 2);\n        foo.put(2, 3);\n\n        assert (foo.values().size() == 2);\n        assert (foo.values().size() == 2);\n    }\n\n    public void testVertexInserts() {\n        int numCommits = 10;\n        int numPerCommit = 10;\n\n        List<UUID> uuids = new ArrayList<UUID>();\n        long ts = System.currentTimeMillis();\n        for (int i = 0; i < numCommits * numPerCommit; i += numPerCommit) {\n            if (i % 1000 == 0) System.out.println(\"Inserting vertex \" + i + \" to \" + (i + numPerCommit));\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit);\n            store.commit(changes);\n\n            uuids.addAll(changes.getVertexIDs());\n        }\n        System.out.println(\"Took \" + (System.currentTimeMillis() - ts) + \" ms to commit \" + (numPerCommit * numCommits)\n                + \" vertices\");\n\n        ts = System.currentTimeMillis();\n        // Check to see if the stuff made it in\n        int counter = 0;\n        for (UUID uuid : uuids) {\n            // System.out.println(\"Found \" + uuid);\n            VertexBean bean = store.getVertex(uuid);\n            assertNotNull(bean);\n            assertEquals(1, bean.getVersion());\n            assertEquals(counter++, bean.getProperties().get(\"Vertex\"));\n        }\n        System.out.println(\"Took \" + (System.currentTimeMillis() - ts) + \" ms to query \" + uuids.size() + \" vertices\");\n    }\n\n    public void testBipartiteGraph() {\n        for (boolean reverse : new boolean[] {false, true}) {\n            for (boolean useEdgeLabels : new boolean[] {true, false}) {\n                System.out.println(\n                        \"Entering iteration with reverse \" + reverse + \", and useEdgeLabels \" + useEdgeLabels);\n\n                int numCommits = 10;\n                int numPerCommit = 10;\n                int partSize = numCommits * numPerCommit;\n\n                UUID[] outVertices = createVertices(numPerCommit, partSize).toArray(new UUID[0]);\n                UUID[] inVertices = createVertices(numPerCommit, partSize).toArray(new UUID[0]);\n                EdgeCommitChanges ecc = new EdgeCommitChanges();\n\n                // Now add edges from one to the other\n                long ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    UUID[] ins = new UUID[] {\n                        inVertices[(5 * i + 1) % partSize],\n                        inVertices[(5 * i + 4) % partSize],\n                        inVertices[(5 * i + 7) % partSize]\n                    };\n\n                    for (int j = 0; j < ins.length; j++) {\n                        String label = \"\"; // null labels are not supported after 2.3.0\n\n                        if (useEdgeLabels) {\n                            label = \"Label \" + j;\n                        }\n\n                        if (!reverse) {\n                            ecc.addEdge(outVertices[i], label, ins[j]);\n                        } else {\n                            ecc.addEdge(ins[j], label, outVertices[i]);\n                        }\n                    }\n\n                    if (i % numPerCommit == 0) {\n                        // Commit now\n                        int size = ecc.size();\n                        store.commit(ecc);\n                        ecc = new EdgeCommitChanges();\n\n                        // double duration = (System.currentTimeMillis() - ts);\n                        // System.out.println(\"Took \" + duration + \" ms to save \" + size + \" edges. Rate = \" + (duration\n                        // / size) + \" ms per edge\");\n\n                        // ts = System.currentTimeMillis();\n                    }\n                }\n                // Commit before the next stage\n                store.commit(ecc);\n\n                // Now check to see if the edges go to the right places\n                ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    UUID[] ins = new UUID[] {\n                        inVertices[(5 * i + 1) % partSize],\n                        inVertices[(5 * i + 4) % partSize],\n                        inVertices[(5 * i + 7) % partSize]\n                    };\n\n                    List<EdgeBean> edgeList;\n                    if (useEdgeLabels && Math.random() < 0.2) {\n                        // System.out.println(\"Explicit label query\");\n                        edgeList = store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, new String[] {\n                            \"Label 0\", \"Label 1\", \"Label 2\"\n                        });\n                    } else {\n                        // System.out.println(\"Null label query\");\n                        edgeList = store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, null);\n                    }\n\n                    if (edgeList.size() < 3) {\n                        // Something is wrong\n                        System.out.println(\"Edges retrieved \" + edgeList);\n                        System.out.println(\"Vertices expected: \");\n                        for (int k = 0; k < 3; k++) {\n                            System.out.print(ins[k] + \" \");\n                        }\n                        fail(\"WRONG edgeList size\");\n                    }\n\n                    for (int j = 0; j < 3; j++) {\n                        EdgeBean edge = edgeList.get(j);\n                        assertEquals(outVertices[i], reverse ? edge.getInVertexId() : edge.getOutVertexId());\n                        // Either foo is missing, or it is bar -- poor man's validation\n                        assertTrue(edge.getProperties() == null\n                                || edge.getProperties().get(\"foo\").equals(\"bar\"));\n\n                        boolean match = false;\n                        for (int k = 0; k < 3; k++) {\n                            UUID otherVertexId = reverse ? edge.getOutVertexId() : edge.getInVertexId();\n                            if (otherVertexId.equals(ins[k])) {\n                                // Match\n                                match = true;\n\n                                if (useEdgeLabels) {\n                                    String label = \"Label \" + k;\n                                    assertEquals(label, edge.getLabel());\n\n                                    // Additional check to make sure that the edge can be retrieved by label\n                                    if (Math.random() < 0.2) {\n                                        List<EdgeBean> edgeByLabelList = store.getEdges(\n                                                outVertices[i],\n                                                reverse ? Direction.IN : Direction.OUT,\n                                                new String[] {label});\n                                        assertEquals(1, edgeByLabelList.size());\n                                        assertEquals(\n                                                edge.getId(),\n                                                edgeByLabelList.get(0).getId());\n                                    }\n                                } else {\n                                    assertEquals(\"\", edge.getLabel());\n                                }\n                            }\n                        }\n\n                        assertTrue(match);\n                    }\n                }\n\n                double duration = (System.currentTimeMillis() - ts);\n                System.out.println(\"Took \" + duration + \" ms to save \" + (numCommits * numPerCommit * 3)\n                        + \" edges. Rate = \" + (duration / (numCommits * numPerCommit * 3)) + \" ms per edge\");\n\n                // Now, remove all the vertices to make sure that the edges are also gone\n                ts = System.currentTimeMillis();\n                deleteVertices(inVertices, numPerCommit);\n                duration = (System.currentTimeMillis() - ts);\n                System.out.println(\"Took \" + duration + \" ms to delete \" + inVertices.length\n                        + \" vertices with 3 incident edges. Rate = \" + (duration / inVertices.length)\n                        + \" ms per vertex\");\n\n                // Check if there are no edges into inVertices\n                ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    List<EdgeBean> edgeList =\n                            store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, null);\n                    assertEquals(0, edgeList.size());\n                }\n            }\n        }\n    }\n\n    private List<UUID> createVertices(int numPerCommit, int partSize) {\n        List<UUID> ans = new ArrayList<UUID>();\n\n        for (int i = 0; i < partSize; i += numPerCommit) {\n            if (i % 1000 == 0) System.out.println(\"Inserting vertex \" + i + \" to \" + (i + numPerCommit));\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit);\n            store.commit(changes);\n            ans.addAll(changes.getVertexIDs());\n        }\n\n        return ans;\n    }\n\n    private void deleteVertices(UUID[] toDelete, int numPerCommit) {\n        int partSize = toDelete.length;\n        for (int i = 0; i < partSize; i += numPerCommit) {\n            // System.out.println(\"Deleting vertex from #\" + i);\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit, toDelete, 1);\n            store.commit(changes);\n        }\n    }\n\n    public class VertexCommitChanges implements ICommitChanges {\n        List<BitsyVertex> vertices;\n\n        int start, num;\n        List<UUID> uuids;\n        UUID[] toDelete;\n        int version;\n\n        public VertexCommitChanges(int start, int num) {\n            this(start, num, null);\n        }\n\n        public VertexCommitChanges(int start, int num, UUID[] toDelete) {\n            this(start, num, toDelete, 0);\n        }\n\n        public VertexCommitChanges(int start, int num, UUID[] toDelete, int version) {\n            this.start = start;\n            this.num = num;\n            this.toDelete = toDelete;\n            this.uuids = new ArrayList<UUID>();\n            this.version = version;\n        }\n\n        public List<UUID> getVertexIDs() {\n            return uuids;\n        }\n\n        @Override\n        public Collection<BitsyVertex> getVertexChanges() {\n            if (vertices == null) {\n                vertices = new ArrayList<BitsyVertex>();\n\n                for (int i = start; i < start + num; i++) {\n                    Map<String, Object> propMap = new TreeMap<String, Object>();\n                    propMap.put(\"Vertex\", i);\n\n                    UUID uuid;\n                    BitsyState state;\n                    if (toDelete == null) {\n                        uuid = UUID.randomUUID();\n                        state = BitsyState.M;\n                    } else {\n                        uuid = toDelete[i];\n                        state = BitsyState.D;\n                    }\n\n                    // Insert or delete a vertex\n                    vertices.add(new BitsyVertex(uuid, null, DictionaryFactory.fromMap(propMap), null, state, version));\n\n                    uuids.add(uuid);\n\n                    if (i % 97 == 0) {\n                        // Place some random unmodified nodes with the same UUID. These should be ignored in the commit.\n                        vertices.add(new BitsyVertex(uuid, null, null, null, BitsyState.U, 23));\n                    }\n                }\n            }\n\n            return vertices;\n        }\n\n        @Override\n        public Collection<BitsyEdge> getEdgeChanges() {\n            return Collections.emptyList();\n        }\n    }\n\n    public class EdgeCommitChanges implements ICommitChanges {\n        List<UUID> outUUIDs;\n        List<UUID> inUUIDs;\n        List<String> edgeLabels;\n        List<UUID> edgeUUIDs;\n        List<BitsyEdge> edges;\n\n        public EdgeCommitChanges() {\n            this.outUUIDs = new ArrayList<UUID>();\n            this.inUUIDs = new ArrayList<UUID>();\n            this.edgeLabels = new ArrayList<String>();\n        }\n\n        public int size() {\n            return outUUIDs.size();\n        }\n\n        public void addEdge(UUID outUUID, String label, UUID inUUID) {\n            outUUIDs.add(outUUID);\n            edgeLabels.add(label);\n            inUUIDs.add(inUUID);\n        }\n\n        @Override\n        public Collection<BitsyVertex> getVertexChanges() {\n            return Collections.emptyList();\n        }\n\n        @Override\n        public Collection<BitsyEdge> getEdgeChanges() {\n            if (edges == null) {\n                this.edgeUUIDs = new ArrayList<UUID>(outUUIDs.size());\n                this.edges = new ArrayList<BitsyEdge>(outUUIDs.size());\n\n                Iterator<UUID> outIter = outUUIDs.iterator();\n                Iterator<String> edgeIter = edgeLabels.iterator();\n                Iterator<UUID> inIter = inUUIDs.iterator();\n\n                while (outIter.hasNext()) {\n                    UUID outV = outIter.next();\n                    UUID inV = inIter.next();\n                    String label = edgeIter.next();\n                    Map<String, Object> edgeProps = null;\n                    if (Math.random() < 0.5) {\n                        edgeProps = new TreeMap<String, Object>();\n                        edgeProps.put(\"foo\", \"bar\");\n                    }\n\n                    UUID edgeUUID = UUID.randomUUID();\n                    edgeUUIDs.add(edgeUUID);\n\n                    BitsyEdge edge = new BitsyEdge(\n                            edgeUUID,\n                            DictionaryFactory.fromMap(edgeProps),\n                            null,\n                            BitsyState.M,\n                            Integer.MIN_VALUE,\n                            label,\n                            outV,\n                            inV);\n                    edges.add(edge);\n\n                    if (Math.random() < 0.01) {\n                        // Place some random unmodified nodes with the same UUID.\n                        // These should be ignored in the commit. Keeping\n                        // probability at 5% to not affect ms/edge too much\n                        edges.add(\n                                new BitsyEdge(edgeUUID, null, null, BitsyState.U, Integer.MIN_VALUE, label, outV, inV));\n                    }\n\n                    // Once in a while, create an edge called \"Invalid\" and remove\n                    // it. If there are issues with the delete logic, it will break\n                    // subsequent asserts. Keeping probability at 5% to not affect ms/edge too much\n                    if (Math.random() < 0.05) {\n                        // Place some random unmodified nodes with the same UUID. These should be ignored in the commit.\n                        UUID deleteEdgeId = UUID.randomUUID();\n\n                        edges.add(new BitsyEdge(\n                                deleteEdgeId,\n                                DictionaryFactory.fromMap(edgeProps),\n                                null,\n                                BitsyState.M,\n                                1,\n                                \"To be removed\",\n                                outV,\n                                inV));\n\n                        // Now remove it\n                        edges.add(new BitsyEdge(\n                                deleteEdgeId,\n                                DictionaryFactory.fromMap(edgeProps),\n                                null,\n                                BitsyState.D,\n                                2,\n                                \"To be removed\",\n                                outV,\n                                inV));\n                    }\n                }\n            }\n\n            return edges;\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/store/MemoryGraphStoreTest.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.lambdazen.bitsy.BitsyEdge;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.BitsyVertex;\nimport com.lambdazen.bitsy.ICommitChanges;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.DictionaryFactory;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.TreeMap;\nimport junit.framework.TestCase;\nimport org.apache.tinkerpop.gremlin.structure.Direction;\n\npublic class MemoryGraphStoreTest extends TestCase {\n    MemoryGraphStore store;\n\n    public MemoryGraphStoreTest() {}\n\n    protected void setUp() {\n        System.out.println(\"Making DB\");\n        this.store = new MemoryGraphStore(true);\n        System.out.println(\"Made DB\");\n    }\n\n    protected void tearDown() {\n        System.out.println(\"Close\");\n    }\n\n    //    public void testOpenClose() {\n    //        System.out.println(\"Opened DB\");\n    //    }\n\n    public void testSomething() {\n        Map foo = new TreeMap();\n        foo.put(1, 2);\n        foo.put(2, 3);\n\n        assert (foo.values().size() == 2);\n        assert (foo.values().size() == 2);\n    }\n\n    public void testVertexInserts() {\n        int numCommits = 100;\n        int numPerCommit = 100;\n\n        List<UUID> uuids = new ArrayList<UUID>();\n        long ts = System.currentTimeMillis();\n        for (int i = 0; i < numCommits * numPerCommit; i += numPerCommit) {\n            if (i % 1000 == 0) System.out.println(\"Inserting vertex \" + i + \" to \" + (i + numPerCommit));\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit);\n            store.commit(changes);\n\n            uuids.addAll(changes.getVertexIDs());\n        }\n        System.out.println(\"Took \" + (System.currentTimeMillis() - ts) + \" ms to commit \" + (numPerCommit * numCommits)\n                + \" vertices\");\n\n        ts = System.currentTimeMillis();\n        // Check to see if the stuff made it in\n        int counter = 0;\n        for (UUID uuid : uuids) {\n            // System.out.println(\"Found \" + uuid);\n            VertexBean bean = store.getVertex(uuid);\n            assertNotNull(bean);\n            assertEquals(1, bean.getVersion());\n            assertEquals(counter++, bean.getProperties().get(\"Vertex\"));\n        }\n        System.out.println(\"Took \" + (System.currentTimeMillis() - ts) + \" ms to query \" + uuids.size() + \" vertices\");\n    }\n\n    public void testBipartiteGraph() {\n        for (boolean reverse : new boolean[] {false, true}) {\n            for (boolean useEdgeLabels : new boolean[] {true, false}) {\n                System.out.println(\n                        \"Entering iteration with reverse \" + reverse + \", and useEdgeLabels \" + useEdgeLabels);\n\n                int numCommits = 100;\n                int numPerCommit = 10;\n                int partSize = numCommits * numPerCommit;\n\n                UUID[] outVertices = createVertices(numPerCommit, partSize).toArray(new UUID[0]);\n                UUID[] inVertices = createVertices(numPerCommit, partSize).toArray(new UUID[0]);\n                EdgeCommitChanges ecc = new EdgeCommitChanges();\n\n                // Now add edges from one to the other\n                long ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    UUID[] ins = new UUID[] {\n                        inVertices[(5 * i + 1) % partSize],\n                        inVertices[(5 * i + 4) % partSize],\n                        inVertices[(5 * i + 7) % partSize]\n                    };\n\n                    for (int j = 0; j < ins.length; j++) {\n                        String label = \"\";\n\n                        if (useEdgeLabels) {\n                            label = \"Label \" + j;\n                        }\n\n                        if (!reverse) {\n                            ecc.addEdge(outVertices[i], label, ins[j]);\n                        } else {\n                            ecc.addEdge(ins[j], label, outVertices[i]);\n                        }\n                    }\n\n                    if (i % numPerCommit == 0) {\n                        // Commit now\n                        int size = ecc.size();\n                        store.commit(ecc);\n                        ecc = new EdgeCommitChanges();\n\n                        // double duration = (System.currentTimeMillis() - ts);\n                        // System.out.println(\"Took \" + duration + \" ms to save \" + size + \" edges. Rate = \" + (duration\n                        // / size) + \" ms per edge\");\n\n                        // ts = System.currentTimeMillis();\n                    }\n                }\n                // Commit before the next stage\n                store.commit(ecc);\n\n                // Now check to see if the edges go to the right places\n                ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    UUID[] ins = new UUID[] {\n                        inVertices[(5 * i + 1) % partSize],\n                        inVertices[(5 * i + 4) % partSize],\n                        inVertices[(5 * i + 7) % partSize]\n                    };\n\n                    List<EdgeBean> edgeList;\n                    if (useEdgeLabels && Math.random() < 0.2) {\n                        // System.out.println(\"Explicit label query\");\n                        edgeList = store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, new String[] {\n                            \"Label 0\", \"Label 1\", \"Label 2\"\n                        });\n                    } else {\n                        // System.out.println(\"Null label query\");\n                        edgeList = store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, null);\n                    }\n\n                    if (edgeList.size() < 3) {\n                        // Something is wrong\n                        System.out.println(\"Edges retrieved \" + edgeList);\n                        System.out.println(\"Vertices expected: \");\n                        for (int k = 0; k < 3; k++) {\n                            System.out.print(ins[k] + \" \");\n                        }\n                        fail(\"WRONG edgeList size\");\n                    }\n\n                    for (int j = 0; j < 3; j++) {\n                        EdgeBean edge = edgeList.get(j);\n                        assertEquals(outVertices[i], reverse ? edge.getInVertexId() : edge.getOutVertexId());\n                        // Either foo is missing, or it is bar -- poor man's validation\n                        assertTrue(edge.getProperties() == null\n                                || \"bar\".equals(edge.getProperties().get(\"foo\")));\n\n                        boolean match = false;\n                        for (int k = 0; k < 3; k++) {\n                            UUID otherVertexId = reverse ? edge.getOutVertexId() : edge.getInVertexId();\n                            if (otherVertexId.equals(ins[k])) {\n                                // Match\n                                match = true;\n\n                                if (useEdgeLabels) {\n                                    String label = \"Label \" + k;\n                                    assertEquals(label, edge.getLabel());\n\n                                    // Additional check to make sure that the edge can be retrieved by label\n                                    if (Math.random() < 0.2) {\n                                        List<EdgeBean> edgeByLabelList = store.getEdges(\n                                                outVertices[i],\n                                                reverse ? Direction.IN : Direction.OUT,\n                                                new String[] {label});\n                                        assertEquals(1, edgeByLabelList.size());\n                                        assertEquals(\n                                                edge.getId(),\n                                                edgeByLabelList.get(0).getId());\n                                    }\n                                } else {\n                                    assertEquals(\"\", edge.getLabel());\n                                }\n                            }\n                        }\n\n                        assertTrue(match);\n                    }\n                }\n\n                double duration = (System.currentTimeMillis() - ts);\n                System.out.println(\"Took \" + duration + \" ms to save \" + (numCommits * numPerCommit * 3)\n                        + \" edges. Rate = \" + (duration / (numCommits * numPerCommit * 3)) + \" ms per edge\");\n\n                // Now, remove all the vertices to make sure that the edges are also gone\n                ts = System.currentTimeMillis();\n                deleteVertices(inVertices, numPerCommit);\n                duration = (System.currentTimeMillis() - ts);\n                System.out.println(\"Took \" + duration + \" ms to delete \" + inVertices.length\n                        + \" vertices with 3 incident edges. Rate = \" + (duration / inVertices.length)\n                        + \" ms per vertex\");\n\n                for (VertexBean vBean : store.getAllVertices()) {\n                    assertNull(vBean.outEdges);\n                    assertNull(vBean.inEdges);\n                }\n\n                // Check if there are no edges into inVertices\n                ts = System.currentTimeMillis();\n                for (int i = 0; i < outVertices.length; i++) {\n                    List<EdgeBean> edgeList =\n                            store.getEdges(outVertices[i], reverse ? Direction.IN : Direction.OUT, null);\n                    assertEquals(0, edgeList.size());\n                }\n            }\n        }\n    }\n\n    private List<UUID> createVertices(int numPerCommit, int partSize) {\n        List<UUID> ans = new ArrayList<UUID>();\n\n        for (int i = 0; i < partSize; i += numPerCommit) {\n            if (i % 1000 == 0) System.out.println(\"Inserting vertex \" + i + \" to \" + (i + numPerCommit));\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit);\n            store.commit(changes);\n            ans.addAll(changes.getVertexIDs());\n        }\n\n        return ans;\n    }\n\n    private void deleteVertices(UUID[] toDelete, int numPerCommit) {\n        int partSize = toDelete.length;\n        for (int i = 0; i < partSize; i += numPerCommit) {\n            // System.out.println(\"Deleting vertex from #\" + i);\n\n            VertexCommitChanges changes = new VertexCommitChanges(i, numPerCommit, toDelete, 1);\n            store.commit(changes);\n        }\n    }\n\n    public class VertexCommitChanges implements ICommitChanges {\n        List<BitsyVertex> vertices;\n\n        int start, num;\n        List<UUID> uuids;\n        UUID[] toDelete;\n        int version;\n\n        public VertexCommitChanges(int start, int num) {\n            this(start, num, null);\n        }\n\n        public VertexCommitChanges(int start, int num, UUID[] toDelete) {\n            this(start, num, toDelete, 0);\n        }\n\n        public VertexCommitChanges(int start, int num, UUID[] toDelete, int version) {\n            this.start = start;\n            this.num = num;\n            this.toDelete = toDelete;\n            this.uuids = new ArrayList<UUID>();\n            this.version = version;\n        }\n\n        public List<UUID> getVertexIDs() {\n            return uuids;\n        }\n\n        @Override\n        public Collection<BitsyVertex> getVertexChanges() {\n            if (vertices == null) {\n                vertices = new ArrayList<BitsyVertex>();\n\n                for (int i = start; i < start + num; i++) {\n                    Map<String, Object> propMap = new TreeMap<String, Object>();\n                    propMap.put(\"Vertex\", i);\n\n                    UUID uuid;\n                    BitsyState state;\n                    if (toDelete == null) {\n                        uuid = UUID.randomUUID();\n                        state = BitsyState.M;\n                    } else {\n                        uuid = toDelete[i];\n                        state = BitsyState.D;\n                    }\n\n                    // Insert or delete a vertex\n                    // vertices.add(new BitsyVertex(uuid, DictionaryFactory.fromMap(propMap), null, state, version));\n                    vertices.add(new BitsyVertex(uuid, null, DictionaryFactory.fromMap(propMap), null, state, version));\n\n                    uuids.add(uuid);\n\n                    if (i % 97 == 0) {\n                        // Place some random unmodified nodes with the same UUID. These should be ignored in the commit.\n                        vertices.add(new BitsyVertex(uuid, null, null, null, BitsyState.U, 23));\n                    }\n                }\n            }\n\n            return vertices;\n        }\n\n        @Override\n        public Collection<BitsyEdge> getEdgeChanges() {\n            return Collections.emptyList();\n        }\n    }\n\n    public class EdgeCommitChanges implements ICommitChanges {\n        List<UUID> outUUIDs;\n        List<UUID> inUUIDs;\n        List<String> edgeLabels;\n        List<UUID> edgeUUIDs;\n        List<BitsyEdge> edges;\n\n        public EdgeCommitChanges() {\n            this.outUUIDs = new ArrayList<UUID>();\n            this.inUUIDs = new ArrayList<UUID>();\n            this.edgeLabels = new ArrayList<String>();\n        }\n\n        public int size() {\n            return outUUIDs.size();\n        }\n\n        public void addEdge(UUID outUUID, String label, UUID inUUID) {\n            outUUIDs.add(outUUID);\n            edgeLabels.add(label);\n            inUUIDs.add(inUUID);\n        }\n\n        @Override\n        public Collection<BitsyVertex> getVertexChanges() {\n            return Collections.emptyList();\n        }\n\n        @Override\n        public Collection<BitsyEdge> getEdgeChanges() {\n            if (edges == null) {\n                this.edgeUUIDs = new ArrayList<UUID>(outUUIDs.size());\n                this.edges = new ArrayList<BitsyEdge>(outUUIDs.size());\n\n                Iterator<UUID> outIter = outUUIDs.iterator();\n                Iterator<String> edgeIter = edgeLabels.iterator();\n                Iterator<UUID> inIter = inUUIDs.iterator();\n\n                while (outIter.hasNext()) {\n                    UUID outV = outIter.next();\n                    UUID inV = inIter.next();\n                    String label = edgeIter.next();\n                    Map<String, Object> edgeProps = null;\n                    if (Math.random() < 0.5) {\n                        edgeProps = new TreeMap<String, Object>();\n                        edgeProps.put(\"foo\", \"bar\");\n                    }\n\n                    UUID edgeUUID = UUID.randomUUID();\n                    edgeUUIDs.add(edgeUUID);\n\n                    BitsyEdge edge = new BitsyEdge(\n                            edgeUUID,\n                            DictionaryFactory.fromMap(edgeProps),\n                            null,\n                            BitsyState.M,\n                            Integer.MIN_VALUE,\n                            label,\n                            outV,\n                            inV);\n                    edges.add(edge);\n\n                    if (Math.random() < 0.01) {\n                        // Place some random unmodified nodes with the same UUID.\n                        // These should be ignored in the commit. Keeping\n                        // probability at 5% to not affect ms/edge too much\n                        edges.add(\n                                new BitsyEdge(edgeUUID, null, null, BitsyState.U, Integer.MIN_VALUE, label, outV, inV));\n                    }\n\n                    // Once in a while, create an edge called \"Invalid\" and remove\n                    // it. If there are issues with the delete logic, it will break\n                    // subsequent asserts. Keeping probability at 5% to not affect ms/edge too much\n                    if (Math.random() < 0.05) {\n                        // Place some random unmodified nodes with the same UUID. These should be ignored in the commit.\n                        UUID deleteEdgeId = UUID.randomUUID();\n\n                        edges.add(new BitsyEdge(\n                                deleteEdgeId,\n                                DictionaryFactory.fromMap(edgeProps),\n                                null,\n                                BitsyState.M,\n                                1,\n                                \"To be removed\",\n                                outV,\n                                inV));\n\n                        // Now remove it\n                        edges.add(new BitsyEdge(\n                                deleteEdgeId,\n                                DictionaryFactory.fromMap(edgeProps),\n                                null,\n                                BitsyState.D,\n                                2,\n                                \"To be removed\",\n                                outV,\n                                inV));\n                    }\n                }\n            }\n\n            return edges;\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/store/RecordTest.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.databind.ObjectReader;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.BitsyState;\nimport com.lambdazen.bitsy.UUID;\nimport com.lambdazen.bitsy.ads.dict.DictionaryFactory;\nimport com.lambdazen.bitsy.store.Record.RecordType;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.TreeMap;\nimport junit.framework.TestCase;\n\npublic class RecordTest extends TestCase {\n    public RecordTest() {}\n\n    public void testRecord() throws Exception {\n        ObjectMapper mapper = new ObjectMapper();\n        TreeMap<String, Object> props = new TreeMap<String, Object>();\n\n        UUID edgeId = UUID.fromString(\"9d09e705-fac4-409b-a0bb-74883fa21313\");\n        UUID outVId = UUID.fromString(\"25f1b840-c521-4398-ac84-9d1a0e305f4c\");\n        UUID inVId = UUID.fromString(\"2c390534-5f50-4924-8792-a06293db4241\");\n\n        VertexBean vBean = new VertexBeanJson(outVId, null, null, 1, BitsyState.D);\n        props.put(\"test \\\"with\\\" quotes\", null);\n        List<Object> bar = new ArrayList<Object>();\n        bar.add(\"another''\\\"one\\\"\");\n        bar.add(\"colon:{}+!#&*(!@#=\");\n        props.put(\"foo\", bar);\n        String str = Record.generateDBLine(RecordType.V, mapper.writeValueAsString(vBean));\n        assertEquals(\n                \"V={\\\"id\\\":\\\"25f1b840-c521-4398-ac84-9d1a0e305f4c\\\",\\\"v\\\":1,\\\"s\\\":\\\"D\\\",\\\"p\\\":null,\\\"l\\\":null}#42fe79ab\\n\",\n                str);\n\n        VertexBean vBean2 = new VertexBeanJson(inVId, \"foo\", null, 1, BitsyState.D);\n        props.put(\"test \\\"with\\\" quotes\", null);\n        props.put(\"foo\", bar);\n        str = Record.generateDBLine(RecordType.V, mapper.writeValueAsString(vBean2));\n        assertEquals(\n                \"V={\\\"id\\\":\\\"2c390534-5f50-4924-8792-a06293db4241\\\",\\\"v\\\":1,\\\"s\\\":\\\"D\\\",\\\"p\\\":null,\\\"l\\\":\\\"foo\\\"}#3656bf28\\n\",\n                str);\n\n        EdgeBean edgeBean =\n                new EdgeBean(edgeId, DictionaryFactory.fromMap(props), Integer.MIN_VALUE, null, vBean, vBean2);\n\n        EdgeBean edgeBeanJson = new EdgeBeanJson(\n                \"\" + edgeId, props, Integer.MIN_VALUE, null, vBean.getIdStr(), vBean2.getIdStr(), BitsyState.M);\n        str = Record.generateDBLine(RecordType.E, mapper.writeValueAsString(edgeBeanJson));\n\n        System.out.println(\"str: \" + str.replaceAll(\"[\\\\\\\\]\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"[\\\"]\", \"\\\\\\\\\\\"\"));\n        assertEquals(\n                \"E={\\\"id\\\":\\\"9d09e705-fac4-409b-a0bb-74883fa21313\\\",\\\"v\\\":-2147483648,\\\"s\\\":\\\"M\\\",\\\"o\\\":\\\"25f1b840-c521-4398-ac84-9d1a0e305f4c\\\",\\\"l\\\":null,\\\"i\\\":\\\"2c390534-5f50-4924-8792-a06293db4241\\\",\\\"p\\\":{\\\"foo\\\":[\\\"another''\\\\\\\"one\\\\\\\"\\\",\\\"colon:{}+!#&*(!@#=\\\"],\\\"test \\\\\\\"with\\\\\\\" quotes\\\":null}}#4cf814b7\\n\",\n                str);\n        // assertEquals(\"E={\\\"class\\\":\\\"com.lambdazen.bitsy.store.EdgeBean\\\",\\\"id\\\":\\\"9d09e705-fac4-409b-a0bb-74883fa21313\\\",\\\"v\\\":-2147483648,\\\"s\\\":\\\"M\\\",\\\"o\\\":\\\"25f1b840-c521-4398-ac84-9d1a0e305f4c\\\",\\\"l\\\":null,\\\"i\\\":\\\"2c390534-5f50-4924-8792-a06293db4241\\\",\\\"p\\\":{\\\"foo\\\":[\\\"another''\\\\\\\"one\\\\\\\"\\\",\\\"colon:{}+!#&*(!@#=\\\"],\\\"test \\\\\\\"with\\\\\\\" quotes\\\":null}}#98e95483\",\n        //        str);\n\n        str = str.trim();\n        Record edgeR = Record.parseRecord(str, 12, null);\n        assertEquals(RecordType.E, edgeR.getType());\n        assertEquals(str.substring(2, str.lastIndexOf(\"#\")), edgeR.getJson());\n\n        try {\n            // Wrong hashcode\n            Record.parseRecord(str.substring(0, str.length() - 1), 13, null);\n            fail(\"wrong hashcode\");\n        } catch (BitsyException e) {\n            // all ok\n        }\n\n        EdgeBeanJson edgeBean2 = (EdgeBeanJson) mapper.readValue(edgeR.getJson(), EdgeBeanJson.class);\n        assertEquals(edgeBean.getId(), edgeBean2.getId());\n        assertEquals(edgeBean.getLabel(), edgeBean2.getLabel());\n        assertEquals(edgeBean.getVersion(), edgeBean2.getVersion());\n        assertEquals(edgeBean.getInVertexId(), edgeBean2.getInVertexId());\n        assertEquals(edgeBean.getOutVertexId(), edgeBean2.getOutVertexId());\n        assertEquals(edgeBean.getProperties(), edgeBean2.getProperties());\n        assertEquals(edgeBean.getProperties(), edgeBean2.getProperties());\n        assertEquals(BitsyState.M, edgeBean2.getState());\n    }\n\n    public void testDictionaryMaxProperties() throws Exception {\n        ObjectMapper mapper = new ObjectMapper();\n        ObjectReader reader = mapper.readerFor(VertexBeanJson.class);\n\n        String json =\n                \"{\\\"id\\\":\\\"40026fee-498a-4cd9-afad-1ae31363c13e\\\",\\\"v\\\":1,\\\"s\\\":\\\"M\\\",\\\"p\\\":{\\\"a00\\\":\\\"00\\\",\\\"a01\\\":\\\"01\\\",\\\"a02\\\":\\\"02\\\",\\\"a03\\\":\\\"03\\\",\\\"a04\\\":\\\"04\\\",\\\"a05\\\":\\\"05\\\",\\\"a06\\\":\\\"06\\\",\\\"a07\\\":\\\"07\\\",\\\"a08\\\":\\\"08\\\",\\\"a09\\\":\\\"09\\\",\\\"a10\\\":\\\"10\\\",\\\"a11\\\":\\\"11\\\",\\\"a12\\\":\\\"12\\\",\\\"a13\\\":\\\"13\\\",\\\"a14\\\":\\\"14\\\",\\\"a15\\\":\\\"15\\\",\\\"a16\\\":\\\"16\\\",\\\"a17\\\":\\\"17\\\",\\\"a18\\\":\\\"18\\\",\\\"a19\\\":\\\"19\\\",\\\"a20\\\":\\\"20\\\",\\\"a21\\\":\\\"21\\\",\\\"a22\\\":\\\"22\\\",\\\"a23\\\":\\\"23\\\",\\\"a24\\\":\\\"24\\\",\\\"a25\\\":\\\"25\\\",\\\"a26\\\":\\\"26\\\",\\\"a27\\\":\\\"27\\\",\\\"a28\\\":\\\"28\\\",\\\"a29\\\":\\\"29\\\",\\\"a30\\\":\\\"30\\\",\\\"a31\\\":\\\"31\\\",\\\"a32\\\":\\\"32\\\",\\\"a33\\\":\\\"33\\\",\\\"a34\\\":\\\"34\\\",\\\"a35\\\":\\\"35\\\",\\\"a36\\\":\\\"36\\\",\\\"a37\\\":\\\"37\\\",\\\"a38\\\":\\\"38\\\",\\\"a39\\\":\\\"39\\\",\\\"a40\\\":\\\"40\\\",\\\"a41\\\":\\\"41\\\",\\\"a42\\\":\\\"42\\\",\\\"a43\\\":\\\"43\\\",\\\"a44\\\":\\\"44\\\",\\\"a45\\\":\\\"45\\\",\\\"a46\\\":\\\"46\\\",\\\"a47\\\":\\\"47\\\",\\\"a48\\\":\\\"48\\\",\\\"a49\\\":\\\"49\\\",\\\"a50\\\":\\\"50\\\"}}\";\n\n        VertexBeanJson vBean = reader.readValue(json);\n\n        int count = vBean.getProperties().size();\n        assertEquals(51, count);\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/store/SingleThreadedStringCanonicalizerTest.java",
    "content": "package com.lambdazen.bitsy.store;\n\nimport junit.framework.TestCase;\n\npublic class SingleThreadedStringCanonicalizerTest extends TestCase {\n    public void testCanonicalize() {\n        IStringCanonicalizer canon = new SingleThreadedStringCanonicalizer();\n\n        String abc1 = \"a\".concat(\"bc\");\n        String abc2 = \"abc\";\n\n        assertEquals(abc1, abc2);\n        assertNotSame(abc1, abc2);\n\n        String c1 = canon.canonicalize(abc1);\n        String c2 = canon.canonicalize(abc2);\n\n        assertSame(c1, c2);\n        assertSame(c1, canon.canonicalize(\"ab\".concat(\"c\")));\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/structure/BitsyGraphStructureTestSuite.java",
    "content": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage com.lambdazen.bitsy.structure;\n\nimport com.lambdazen.bitsy.BitsyGraph;\nimport org.apache.tinkerpop.gremlin.AbstractGremlinSuite;\nimport org.apache.tinkerpop.gremlin.GraphProviderClass;\nimport org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;\nimport org.apache.tinkerpop.gremlin.structure.EdgeTest;\nimport org.apache.tinkerpop.gremlin.structure.VertexTest;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.model.InitializationError;\nimport org.junit.runners.model.RunnerBuilder;\n\n/**\n * @author Marko A. Rodriguez (http://markorodriguez.com)\n */\n@RunWith(BitsyGraphStructureTestSuite.class)\n@GraphProviderClass(provider = BitsyTestGraphProvider.class, graph = BitsyGraph.class)\npublic class BitsyGraphStructureTestSuite extends AbstractGremlinSuite {\n    /*\n     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list\n     * as needed to enforce tests upon implementations.\n     */\n    private static final Class<?>[] allTests = new Class<?>[] {\n        VertexTest.class, EdgeTest.class,\n        //    \tVertexPropertyTest.class,\n        //    \tGraphTest.class,\n        //    \tFeatureSupportTest.class,\n        //    \tPropertyTest.class,\n        //    \tVariablesTest.class,\n\n        //    \tDetachedGraphTest.class,\n        //      DetachedVertexPropertyTest.class,\n        //        DetachedPropertyTest.class\n        //    \tDetachedVertexTest.class,\n        //        DetachedEdgeTest.class,\n\n        //        ReferenceGraphTest.class,\n        //        ReferenceEdgeTest.class,\n        //        ReferenceVertexPropertyTest.class,\n        //        ReferenceVertexTest.class,\n\n        //        CommunityGeneratorTest.class,\n        //        DistributionGeneratorTest.class,\n        //        GraphConstructionTest.class,\n\n        //        TransactionTest.class,\n\n        /* SERIALIZATION TESTS WON'T WORK --\n        IoPropertyTest.class,\n        IoTest.class,\n        IoVertexTest.class,\n        IoCustomTest.class,\n        IoEdgeTest.class,\n        IoGraphTest.class,\n        SerializationTest.class,\n        StarGraphTest.class // has failure related to UUID and kryo\n        */\n\n    };\n\n    public BitsyGraphStructureTestSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {\n        super(klass, builder, allTests, null, false, TraversalEngine.Type.STANDARD);\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/structure/BitsyProcessStandardTestSuite.java",
    "content": "package com.lambdazen.bitsy.structure;\n\nimport com.lambdazen.bitsy.BitsyGraph;\nimport org.apache.tinkerpop.gremlin.AbstractGremlinSuite;\nimport org.apache.tinkerpop.gremlin.GraphProviderClass;\nimport org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.SampleTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SackTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphTest;\nimport org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.model.InitializationError;\nimport org.junit.runners.model.RunnerBuilder;\n\n@RunWith(BitsyProcessStandardTestSuite.class)\n@GraphProviderClass(provider = BitsyTestGraphProvider.class, graph = BitsyGraph.class)\npublic class BitsyProcessStandardTestSuite extends AbstractGremlinSuite {\n    /**\n     * This list of tests in the suite that will be executed as part of this suite.\n     */\n    private static final Class<?>[] allTests = new Class<?>[] {\n\n        // branch\n        //            BranchTest.Traversals.class,\n        //            ChooseTest.Traversals.class,\n        //            OptionalTest.Traversals.class,\n        //            LocalTest.Traversals.class,\n        //            RepeatTest.Traversals.class,\n        //            UnionTest.Traversals.class,\n\n        // filter\n        //            AndTest.Traversals.class,\n        //            CoinTest.Traversals.class,\n        //            CyclicPathTest.Traversals.class,\n        //            DedupTest.Traversals.class,\n        //            DropTest.Traversals.class,\n        //            FilterTest.Traversals.class,\n        HasTest.Traversals.class, IsTest.Traversals.class,\n        //            OrTest.Traversals.class,\n        //            RangeTest.Traversals.class,\n        //            SampleTest.Traversals.class,\n        //            SimplePathTest.Traversals.class,\n        //            TailTest.Traversals.class,\n        //            WhereTest.Traversals.class,\n\n        // map\n        //            AddEdgeTest.Traversals.class,\n        //            AddVertexTest.Traversals.class,\n        //            CoalesceTest.Traversals.class,\n        //            ConstantTest.Traversals.class,\n        //            CountTest.Traversals.class,\n        //            FlatMapTest.Traversals.class,\n        //            FoldTest.Traversals.class,\n        //            GraphTest.Traversals.class,\n        //            LoopsTest.Traversals.class,\n        //            MapTest.Traversals.class,\n        //            MapKeysTest.Traversals.class,\n        //            MapValuesTest.Traversals.class,\n        //            MatchTest.CountMatchTraversals.class,\n        //            MatchTest.GreedyMatchTraversals.class,\n        //            MaxTest.Traversals.class,\n        //            MeanTest.Traversals.class,\n        //            MinTest.Traversals.class,\n        //            SumTest.Traversals.class,\n        //            OrderTest.Traversals.class,\n        //            PathTest.Traversals.class,\n        //            ProfileTest.Traversals.class, // NOT SURE WHY THIS IS FAILING?!\n        //            ProjectTest.Traversals.class,\n\n        //            PropertiesTest.Traversals.class,\n        //            SelectTest.Traversals.class,\n        //            VertexTest.Traversals.class,\n        //            UnfoldTest.Traversals.class,\n        //            ValueMapTest.Traversals.class,\n\n        // sideEffect\n        //            AggregateTest.Traversals.class,\n        //            ExplainTest.Traversals.class,\n        //            GroupTest.Traversals.class,\n        //            GroupTestV3d0.Traversals.class,\n        //            GroupCountTest.Traversals.class,\n        //            InjectTest.Traversals.class,\n        //            SackTest.Traversals.class,\n        //            SideEffectCapTest.Traversals.class,\n        //            SideEffectTest.Traversals.class,\n        //            StoreTest.Traversals.class,\n        //            SubgraphTest.Traversals.class,\n        //            TreeTest.Traversals.class,\n\n        // compliance\n        //            ComplexTest.Traversals.class,\n        //            CoreTraversalTest.class,\n        //            TraversalInterruptionTest.class,\n\n        // creations\n        //            TranslationStrategyProcessTest.class,\n\n        // decorations\n        //            ElementIdStrategyProcessTest.class,\n        //            EventStrategyProcessTest.class,\n        //            ReadOnlyStrategyProcessTest.class,\n        //            PartitionStrategyProcessTest.class,\n        //            SubgraphStrategyProcessTest.class\n    };\n\n    /**\n     * A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.\n     */\n    private static final Class<?>[] testsToEnforce = new Class<?>[] {\n        // branch\n        BranchTest.class,\n        ChooseTest.class,\n        OptionalTest.class,\n        LocalTest.class,\n        RepeatTest.class,\n        UnionTest.class,\n\n        // filter\n        AndTest.class,\n        CoinTest.class,\n        CyclicPathTest.class,\n        DedupTest.class,\n        DropTest.class,\n        FilterTest.class,\n        HasTest.class,\n        IsTest.class,\n        OrTest.class,\n        RangeTest.class,\n        SampleTest.class,\n        SimplePathTest.class,\n        TailTest.class,\n        WhereTest.class,\n\n        // map\n        AddEdgeTest.class,\n        AddVertexTest.class,\n        CoalesceTest.class,\n        ConstantTest.class,\n        CountTest.class,\n        FlatMapTest.class,\n        FoldTest.class,\n        LoopsTest.class,\n        MapTest.class,\n        // MapKeysTest.class,\n        // MapValuesTest.class,\n        MatchTest.class,\n        MaxTest.class,\n        MeanTest.class,\n        MinTest.class,\n        SumTest.class,\n        OrderTest.class,\n        PathTest.class,\n        PropertiesTest.class,\n        ProfileTest.class,\n        ProjectTest.class,\n        SelectTest.class,\n        VertexTest.class,\n        UnfoldTest.class,\n        ValueMapTest.class,\n\n        // sideEffect\n        AggregateTest.class,\n        GroupTest.class,\n        GroupCountTest.class,\n        InjectTest.class,\n        SackTest.class,\n        SideEffectCapTest.class,\n        SideEffectTest.class,\n        StoreTest.class,\n        SubgraphTest.class,\n        TreeTest.class,\n    };\n\n    /**\n     * This constructor is used by JUnit and will run this suite with its concrete implementations of the\n     * {@code testsToEnforce}.\n     */\n    public BitsyProcessStandardTestSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {\n        super(klass, builder, allTests, testsToEnforce, false, TraversalEngine.Type.STANDARD);\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/structure/BitsyTestGraphProvider.java",
    "content": "package com.lambdazen.bitsy.structure;\n\nimport com.lambdazen.bitsy.BitsyGraph;\nimport com.lambdazen.bitsy.BitsyIsolationLevel;\nimport com.lambdazen.bitsy.wrapper.BitsyAutoReloadingGraph;\nimport java.io.File;\nimport java.nio.file.Paths;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Set;\nimport org.apache.commons.configuration2.Configuration;\nimport org.apache.tinkerpop.gremlin.AbstractGraphProvider;\nimport org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.Transaction.READ_WRITE_BEHAVIOR;\n\npublic class BitsyTestGraphProvider extends AbstractGraphProvider {\n    private static final Set<Class> IMPLEMENTATION = new HashSet<Class>() {\n        {\n            add(BitsyAutoReloadingGraph.class);\n        }\n    };\n\n    @Override\n    public void clear(Graph graph, Configuration configuration) throws Exception {\n        if (graph != null) {\n            if (graph.tx().isOpen()) graph.tx().close();\n            graph.tx().onReadWrite(READ_WRITE_BEHAVIOR.MANUAL);\n            graph.tx().open();\n            System.out.println(\"Clearing graph\");\n            graph.vertices().forEachRemaining(v -> v.remove());\n            graph.tx().commit();\n            System.out.println(\"Shutting down graph \" + graph);\n            graph.close();\n        }\n    }\n\n    @Override\n    public Set<Class> getImplementations() {\n        return IMPLEMENTATION;\n    }\n\n    private void wipeOut(File directory) {\n        deleteDirectory(directory, false);\n    }\n\n    protected static void deleteDirectory(final File directory, boolean deleteDir) {\n        if (directory.exists()) {\n            for (File file : directory.listFiles()) {\n                if (file.isDirectory()) {\n                    // System.out.println(\"Deleting dir: \" + file.toString());\n                    deleteDirectory(file, true);\n                } else {\n                    // System.out.println(\"Deleting file: \" + file.toString());\n                    file.delete();\n                }\n            }\n\n            if (deleteDir) {\n                // System.out.println(\"Deleting dir: \" + directory);\n                directory.delete();\n            }\n        }\n        // System.out.println(\"Exiting delete dir\");\n    }\n\n    @Override\n    public Map<String, Object> getBaseConfiguration(\n            String graphName, Class<?> test, String testMethodName, GraphData loadGraphWith) {\n        final String directory = makeTestDirectory(graphName, test, testMethodName);\n        File testDataRootFile = Paths.get(directory).toFile();\n        testDataRootFile.mkdirs();\n\n        try {\n            if (testDataRootFile.exists()) {\n                wipeOut(testDataRootFile);\n            }\n        } catch (Exception ex) {\n            System.out.println(\"SETUP FAILED!!!\");\n            ex.printStackTrace();\n        }\n\n        String testDataRoot = testDataRootFile.getPath();\n\n        return new HashMap<String, Object>() {\n            {\n                put(Graph.GRAPH, BitsyAutoReloadingGraph.class.getName());\n                put(BitsyGraph.DB_PATH_KEY, testDataRoot);\n                put(BitsyGraph.CREATE_DIR_IF_MISSING_KEY, true);\n                put(BitsyGraph.DEFAULT_ISOLATION_LEVEL_KEY, BitsyIsolationLevel.READ_COMMITTED.toString());\n                put(BitsyGraph.VERTEX_INDICES_KEY, \"name, foo\");\n            }\n        };\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/structure/HasLabelTest.java",
    "content": "package com.lambdazen.bitsy.structure;\n\nimport static org.junit.Assert.assertTrue;\n\nimport com.lambdazen.bitsy.BitsyGraph;\nimport java.util.ArrayList;\nimport java.util.List;\nimport org.apache.tinkerpop.gremlin.process.traversal.P;\nimport org.apache.tinkerpop.gremlin.structure.Graph;\nimport org.apache.tinkerpop.gremlin.structure.T;\nimport org.junit.Test;\n\npublic class HasLabelTest {\n    @Test\n    public void bitsyPredicateTest() {\n        Graph g = new BitsyGraph();\n\n        final List<Object> props1 = new ArrayList<>();\n        props1.add(T.label);\n        props1.add(\"vert1\");\n        props1.add(\"p1\");\n        props1.add(1);\n        props1.add(\"p2\");\n        props1.add(\"2\");\n        g.addVertex(props1.toArray());\n\n        final List<Object> props2 = new ArrayList<>();\n        props2.add(T.label);\n        props2.add(\"vert2\");\n        props2.add(\"2p1\");\n        props2.add(1);\n        props2.add(\"2p2\");\n        props2.add(\"2\");\n        Object vert2 = g.addVertex(props2.toArray());\n\n        assertTrue(g.traversal().V().hasLabel(P.within(\"vert2\")).next().equals(vert2));\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/util/CommittableFileLogTest.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.store.FileBackedMemoryGraphStore;\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Random;\nimport junit.framework.TestCase;\n\npublic class CommittableFileLogTest extends TestCase {\n    public CommittableFileLogTest() {}\n\n    public void testRead() throws Exception {\n        File tempFile = File.createTempFile(\"mobydick\", \".txt\");\n\n        InputStream is = getClass().getResourceAsStream(\"mobydick.txt\");\n        assertNotNull(is);\n        BufferedReader br = new BufferedReader(new InputStreamReader(is, FileBackedMemoryGraphStore.utf8));\n\n        CommittableFileLog cflWrite = new CommittableFileLog(tempFile.toPath(), false);\n        cflWrite.openForOverwrite(1L);\n\n        Random rand = new Random();\n        int expectedLines = -1;\n        for (int run = 0; run < 10; run++) {\n            List<String> lines = new ArrayList<String>();\n            String line = null;\n            while ((line = br.readLine()) != null) {\n                lines.add(line);\n                if (run == 0) {\n                    cflWrite.append((line + '\\n').getBytes(FileBackedMemoryGraphStore.utf8));\n                }\n            }\n\n            br.close();\n            is.close();\n\n            if (run == 0) {\n                cflWrite.close();\n            }\n\n            if (expectedLines != -1) {\n                assertEquals(expectedLines, lines.size());\n            }\n\n            System.out.println(\"Finished writing to \" + tempFile);\n\n            List<String> nioLines = new ArrayList<String>();\n            CommittableFileLog cfl = new CommittableFileLog(tempFile.toPath(), false);\n            cfl.openForRead();\n\n            line = null;\n            int byteCounter = 13; // Start with header\n            int linesDeleted = 0;\n            while ((line = cfl.readLine()) != null) {\n                // System.out.println(\"Line: \" + line);\n                nioLines.add(line);\n                int lineBytes = 1 + line.getBytes(FileBackedMemoryGraphStore.utf8).length;\n                byteCounter += lineBytes;\n\n                if (rand.nextDouble() < 0.1) {\n                    cfl.mark();\n                    assertEquals(byteCounter, cfl.getMarkPosition());\n                    linesDeleted = 0;\n                } else if (rand.nextDouble() < 0.15) {\n                    cfl.mark(lineBytes);\n                    // System.out.println(\"Line bytes: \" + lineBytes);\n                    assertEquals(byteCounter - lineBytes, cfl.getMarkPosition());\n                    linesDeleted = 1;\n                } else {\n                    linesDeleted++;\n                }\n            }\n\n            assertEquals(lines.size(), nioLines.size());\n            expectedLines = lines.size() - linesDeleted;\n\n            for (int i = 0; i < lines.size(); i++) {\n                assertEquals(lines.get(i), nioLines.get(i));\n            }\n\n            cfl.truncateAtMark();\n            cfl.close();\n\n            // For the next run -- use the temp file for reading\n            is = Files.newInputStream(tempFile.toPath());\n            br = new BufferedReader(new InputStreamReader(is, FileBackedMemoryGraphStore.utf8));\n\n            // Skip the first line with the header\n            br.readLine();\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/com/lambdazen/bitsy/util/DoubleBufferIT.java",
    "content": "package com.lambdazen.bitsy.util;\n\nimport com.lambdazen.bitsy.BitsyErrorCodes;\nimport com.lambdazen.bitsy.BitsyException;\nimport com.lambdazen.bitsy.util.DoubleBuffer.BufferName;\nimport java.util.List;\nimport junit.framework.TestCase;\n\npublic class DoubleBufferIT extends TestCase {\n    // Temp vars used in inner classes\n    int count;\n    int potFn;\n\n    public DoubleBufferIT() {}\n\n    public void testFixedCtBuf() throws Exception {\n        Thread.sleep(1000);\n        int initThreadCount = Thread.activeCount();\n\n        final int flushSlowSleep = 50;\n        for (boolean flushSlow : new boolean[] {false, true}) {\n            final boolean slow = flushSlow;\n            for (int threshold : new int[] {1, 5, 20, 100}) {\n                System.out.println(\"Testing fixed count buffer with slow \" + slow + \", and threshold \" + threshold);\n                final int finalThreshold = threshold;\n\n                potFn = 0;\n                count = 0;\n                DoubleBuffer<Integer> buf = new DoubleBuffer<>(\n                        new BufferPotential<Integer>() {\n                            @Override\n                            public boolean addWork(Integer newWork) {\n                                potFn += newWork;\n                                return (potFn >= finalThreshold);\n                            }\n\n                            @Override\n                            public void reset() {\n                                potFn = 0;\n                            }\n                        },\n                        new BufferFlusher<Integer>() {\n                            BufferName oldBufName = BufferName.B;\n\n                            @Override\n                            public void flushBuffer(BufferName bufName, List<Integer> workList)\n                                    throws BitsyException, InterruptedException {\n                                if (bufName == oldBufName) {\n                                    throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Buffer doesn't swap\");\n                                }\n\n                                for (Integer work : workList) {\n                                    assertEquals(1, work.intValue());\n                                }\n\n                                oldBufName = bufName;\n                                count++;\n\n                                if (slow) {\n                                    try {\n                                        Thread.sleep(flushSlowSleep);\n                                    } catch (InterruptedException e) {\n                                        System.out.println(\"Interrupted the flusher\");\n                                        throw e;\n                                    }\n                                }\n                            }\n                        },\n                        \"TestThread\");\n\n                for (int i = 0; i < 100; i++) {\n                    buf.addWork(1);\n                    Thread.sleep(50);\n                    if (slow && (i % threshold == 0)) {\n                        // Sleep a little for the flusher to catch up\n                        Thread.sleep(flushSlowSleep + 100);\n                    }\n                }\n\n                assertEquals(1 + initThreadCount, Thread.activeCount());\n\n                assertEquals(100 / finalThreshold, count);\n\n                buf.stop(100);\n\n                assertEquals(initThreadCount, Thread.activeCount());\n            }\n        }\n    }\n\n    public void testException() throws Exception {\n        int initThreadCount = Thread.activeCount();\n\n        System.out.println(\"Testing exception\");\n\n        for (boolean syncMode : new boolean[] {false, true}) {\n            System.out.println(\"Sync mode \" + syncMode);\n\n            DoubleBuffer<Integer> buf = new DoubleBuffer<>(\n                    new BufferPotential<Integer>() {\n                        @Override\n                        public boolean addWork(Integer newWork) {\n                            return true;\n                        }\n\n                        @Override\n                        public void reset() {}\n                    },\n                    new BufferFlusher<Integer>() {\n                        BufferName oldBufName = BufferName.B;\n\n                        @Override\n                        public void flushBuffer(BufferName bufName, List<Integer> workList)\n                                throws BitsyException, InterruptedException {\n                            assertNull(workList);\n\n                            if (bufName == oldBufName) {\n                                throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, \"Buffer doesn't swap\");\n                            }\n\n                            Thread.sleep(2000); // wait 2 seconds\n\n                            if (bufName == BufferName.A) {\n                                throw new BitsyException(BitsyErrorCodes.ACCESS_OUTSIDE_TX_SCOPE, \"test\");\n                            }\n\n                            oldBufName = bufName;\n                            count++;\n                        }\n                    },\n                    \"TestThread\",\n                    false,\n                    true); // sync mode is true\n\n            buf.addWork(1);\n\n            if (syncMode) {\n                Thread.sleep(500); // wait 0.5 seconds... because of sync mode addMode will have to wait\n            } else {\n                Thread.sleep(3000); // wait till the flush is done\n            }\n\n            try {\n                // If sync mode weren't set, add work would have gone through\n                long ts = System.currentTimeMillis();\n                buf.addWork(2);\n\n                if (syncMode) {\n                    // Sync mode may require another addwork for the exception to register\n                    Thread.sleep(100);\n                    buf.addWork(3);\n                }\n\n                assertEquals(\n                        syncMode,\n                        System.currentTimeMillis() - ts\n                                > 1000); // with sync mode at least 1 second must pass before, addWork gets through.\n\n                fail(\"Needs to throw an exception\");\n            } catch (BitsyException e) {\n                assertEquals(BitsyErrorCodes.EXCEPTION_IN_FLUSH, e.getErrorCode());\n                BitsyException cause = (BitsyException) e.getCause();\n                assertEquals(BitsyErrorCodes.ACCESS_OUTSIDE_TX_SCOPE, cause.getErrorCode());\n                assertTrue(cause.getMessage().contains(\"test\"));\n            }\n\n            // Flush thread must have died already\n            Thread.sleep(100);\n            // assertEquals(initThreadCount, Thread.activeCount());\n\n            buf.stop(1000);\n            Thread.sleep(100);\n\n            // assertEquals(initThreadCount, Thread.activeCount());\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/com/lambdazen/bitsy/util/mobydick.txt",
    "content": "\n  A Plough Boy Edition\n\n\n  Contents\n  \n  Herman Melville\n  \n  About the\n  Transcription\n  \n  Bibliographic\n  Description\n\n      \n\n      MOBY DICK; OR THE WHALE\n      by\n      Herman Melville\n\n      CONTENTS\n          Etymology\n        Extracts\n        Chapter 1.  Loomings\n        Chapter 2.  The Carpet-Bag\n        Chapter 3.  The Spouter-Inn\n        Chapter 4.  The Counterpane\n        Chapter 5.  Breakfast\n        Chapter 6.  The Street\n        Chapter 7.  The Chapel\n        Chapter 8.  The Pulpit\n        Chapter 9.  The Sermon\n        Chapter 10.     A Bosom Friend\n        Chapter 11.     Nightgown\n        Chapter 12.     Biographical\n        Chapter 13.     Wheelbarrow\n        Chapter 14.     Nantucket\n        Chapter 15.     Chowder\n        Chapter 16.     The Ship\n        Chapter 17.     The Ramadan\n        Chapter 18.     His Mark\n        Chapter 19.     The Prophet\n        Chapter 20.     All Astir\n        Chapter 21.     Going Aboard\n        Chapter 22.     Merry Christmas\n        Chapter 23.     The Lee Shore\n        Chapter 24.     The Advocate\n        Chapter 25.     Postscript\n        Chapter 26.     Knights and Squires\n        Chapter 27.     Knights and Squires\n        Chapter 28.     Ahab\n        Chapter 29.     Enter Ahab; to Him, Stubb\n        Chapter 30.     The Pipe\n        Chapter 31.     Queen Mab\n        Chapter 32.     Cetology\n        Chapter 33.     The Specksynder\n        Chapter 34.     The Cabin-Table\n        Chapter 35.     The Mast-Head\n        Chapter 36.     The Quarter-Deck\n        Chapter 37.     Sunset\n        Chapter 38.     Dusk\n        Chapter 39.     First Night Watch\n        Chapter 40.     Midnight, Forecastle\n        Chapter 41.     Moby Dick\n        Chapter 42.     The Whiteness of The Whale\n        Chapter 43.     Hark!\n        Chapter 44.     The Chart\n        Chapter 45.     The Affidavit\n        Chapter 46.     Surmises\n        Chapter 47.     The Mat-Maker\n        Chapter 48.     The First Lowering\n        Chapter 49.     The Hyena\n        Chapter 50.     Ahab's Boat and Crew. Fedallah\n        Chapter 51.     The Spirit-Spout\n        Chapter 52.     The Albatross\n        Chapter 53.     The Gam\n        Chapter 54.     The Town-Ho's Story\n        Chapter 55.     Of the Monstrous Pictures of Whales\n        Chapter 56.     Of the Less Erroneous Pictures of Whales and the True Pictures of Whaling Scenes\n        Chapter 57.     Of Whales in Paint; in Teeth; in Wood; in Sheet-Iron; in Stone; in Mountains; in Stars\n        Chapter 58.     Brit\n        Chapter 59.     Squid\n        Chapter 60.     The Line\n        Chapter 61.     Stubb Kills a Whale\n        Chapter 62.     The Dart\n        Chapter 63.     The Crotch\n        Chapter 64.     Stubb's Supper\n        Chapter 65.     The Whale as a Dish\n        Chapter 66.     The Shark Massacre\n        Chapter 67.     Cutting In\n        Chapter 68.     The Blanket\n        Chapter 69.     The Funeral\n        Chapter 70.     The Sphynx\n        Chapter 71.     The Jeroboam's Story\n        Chapter 72.     The Monkey-Rope\n        Chapter 73.     Stubb and Flask Kill a Right Whale; and Then Have a Talk Over Him\n        Chapter 74.     The Sperm Whale's Head - Contrasted View\n        Chapter 75.     The Right Whale's Head - Contrasted View\n        Chapter 76.     The Battering-Ram\n        Chapter 77.     The Great Heidelburgh Tun\n        Chapter 78.     Cistern and Buckets\n        Chapter 79.     The Prairie\n        Chapter 80.     The Nut\n        Chapter 81.     The Pequod Meets The Virgin\n        Chapter 82.     The Honor and Glory of Whaling\n        Chapter 83.     Jonah Historically Regarded\n        Chapter 84.     Pitchpoling\n        Chapter 85.     The Fountain\n        Chapter 86.     The Tail\n        Chapter 87.     The Grand Armada\n        Chapter 88.     Schools and Schoolmasters\n        Chapter 89.     Fast-Fish and Loose-Fish\n        Chapter 90.     Heads or Tails\n        Chapter 91.     The Pequod Meets The Rose-Bud\n        Chapter 92.     Ambergris\n        Chapter 93.     The Castaway\n        Chapter 94.     A Squeeze of the Hand\n        Chapter 95.     The Cassock\n        Chapter 96.     The Try-Works\n        Chapter 97.     The Lamp\n        Chapter 98.     Stowing Down and Clearing Up\n        Chapter 99.     The Doubloon\n        Chapter 100.    Leg and Arm\n        Chapter 101.    The Decanter\n        Chapter 102.    A Bower in the Arsacides\n        Chapter 103.    Measurement of The Whale's Skeleton\n        Chapter 104.    The Fossil Whale\n        Chapter 105.    Does the Whale's Magnitude Diminish? - Will He Perish?\n        Chapter 106.    Ahab's Leg\n        Chapter 107.    The Carpenter\n        Chapter 108.    Ahab and the Carpenter\n        Chapter 109.    Ahab and Starbuck in the Cabin\n        Chapter 110.    Queequeg in His Coffin\n        Chapter 111.    The Pacific\n        Chapter 112.    The Blacksmith\n        Chapter 113.    The Forge\n        Chapter 114.    The Gilder\n        Chapter 115.    The Pequod Meets The Bachelor\n        Chapter 116.    The Dying Whale\n        Chapter 117.    The Whale Watch\n        Chapter 118.    The Quadrant\n        Chapter 119.    The Candles\n        Chapter 120.    The Deck Toward the End of the First Night Watch\n        Chapter 121.    Midnight - The Forecastle Bulwarks\n        Chapter 122.    Midnight Aloft.- Thunder and Lightning\n        Chapter 123.    The Musket\n        Chapter 124.    The Needle\n        Chapter 125.    The Log and Line\n        Chapter 126.    The Life-Buoy\n        Chapter 127.    The Deck\n        Chapter 128.    The Pequod Meets The Rachel\n        Chapter 129.    The Cabin\n        Chapter 130.    The Hat\n        Chapter 131.    The Pequod Meets The Delight\n        Chapter 132.    The Symphony\n        Chapter 133.    The Chase - First Day\n        Chapter 134.    The Chase - Second Day\n        Chapter 135.    The Chase - Third Day\n            Epilogue\n\nETYMOLOGY.\n(Supplied by a Late Consumptive Usher to a Grammar School)\n\nThe pale Usher  threadbare in coat, heart, body, and brain; I see him now. He was ever dusting his old lexicons and grammars, with a queer handkerchief, mockingly embellished with all the gay flags of all the known nations of the world. He loved to dust his old grammars; it somehow mildly reminded him of his mortality.\n\n\"While you take in hand to school others, and to teach them by what name a whale-fish is to be called in our tongue leaving out, through ignorance, the letter H, which almost alone maketh the signification of the word, you deliver that which is not true.\"  HACKLUYT\n\n\"WHALE. * * * Sw. and Dan. hval. This animal is named from roundness or rolling; for in Dan. hvalt is arched or vaulted.\"  WEBSTER'S DICTIONARY \n\n\"WHALE. * * * It is more immediately from the Dut. and Ger. Wallen; a.s. Walw-ian, to roll, to wallow.\"  RICHARDSON'S DICTIONARY \n \nHebrew. \nKETOS,  Greek. \nCETUS,  Latin. \nWHOEL,  Anglo-Saxon. \nHVALT,  Danish. \nWAL,    Dutch. \nHWAL,   Swedish. \nWHALE,  Icelandic. \nWHALE,  English. \nBALEINE,    French. \nBALLENA,    Spanish. \nPEKEE-NUEE-NUEE,    Fegee. \nPEKEE-NUEE-NUEE,    Erromangoan. \n \nEXTRACTS. \n \n(Supplied by a Sub-Sub-Librarian) \n. \n \nIt will be seen that this mere painstaking burrower and grub-worm of a \npoor devil of a Sub-Sub appears to have gone through the long Vaticans \nand street-stalls of the earth, picking up whatever random allusions \nto whales he could anyways find in any book whatsoever, sacred or \nprofane. Therefore you must not, in every case at least, take the \nhiggledy-piggledy whale statements, however authentic, in these \nextracts, for veritable gospel cetology. Far from it. As touching the \nancient authors generally, as well as the poets here appearing, these \nextracts are solely valuable or entertaining, as affording a glancing \nbird's eye view of what has been promiscuously said, thought, fancied, \nand sung of Leviathan, by many nations and generations, including our \nown. \n \nSo fare thee well, poor devil of a Sub-Sub, whose commentator I\nam. Thou belongest to that hopeless, sallow tribe which no wine of\nthis world will ever warm; and for whom even Pale Sherry would be too\nrosy-strong; but with whom one sometimes loves to sit, and feel\npoor-devilish, too; and grow convivial upon tears; and say to them\nbluntly, with full eyes and empty glasses, and in not altogether\nunpleasant sadness  Give it up, Sub-Subs! For by how much the more\npains ye take to please the world, by so much the more shall ye for\never go thankless! Would that I could clear out Hampton Court and the\nTuileries for ye! But gulp down your tears and hie aloft to the\nroyal-mast with your hearts; for your friends who have gone before are\nclearing out the seven-storied heavens, and making refugees of\nlong-pampered Gabriel, Michael, and Raphael, against your coming. Here\nye strike but splintered hearts together  there, ye shall strike\nunsplinterable glasses!  \n \n\"And God created great whales.\"  GENESIS.\n\n\"Leviathan maketh a path to shine after him; One would think the deep\nto be hoary.\"  JOB.\n\n\"Now the Lord had prepared a great fish to swallow up Jonah.\" \nJONAH.\n\n\"There go the ships; there is that Leviathan whom thou hast made to\nplay therein.\"  PSALMS.\n\n\"In that day, the Lord with his sore, and great, and strong sword,\nshall punish Leviathan the piercing serpent, even Leviathan that\ncrooked serpent; and he shall slay the dragon that is in the sea.\" \nISAIAH\n\n\"And what thing soever besides cometh within the chaos of this\nmonster's mouth, be it beast, boat, or stone, down it goes all\nincontinently that foul great swallow of his, and perisheth in the\nbottomless gulf of his paunch.\"  HOLLAND'S PLUTARCH'S MORALS.\n\n\"The Indian Sea breedeth the most and the biggest fishes that are:\namong which the Whales and Whirlpooles called Balaene, take up as much\nin length as four acres or arpens of land.\"  HOLLAND'S PLINY.\n\n\"Scarcely had we proceeded two days on the sea, when about sunrise a\ngreat many Whales and other monsters of the sea, appeared. Among the\nformer, one was of a most monstrous size. ... This came towards us,\nopen-mouthed, raising the waves on all sides, and beating the sea\nbefore him into a foam.\"  TOOKE'S LUCIAN. \"THE TRUE HISTORY.\"\n\n\"He visited this country also with a view of catching horse-whales,\nwhich had bones of very great value for their teeth, of which he\nbrought some to the king. ... The best whales were catched in his own\ncountry, of which some were forty-eight, some fifty yards long. He\nsaid that he was one of six who had killed sixty in two days.\" \nOTHER OR OCTHER'S VERBAL NARRATIVE TAKEN DOWN FROM HIS MOUTH BY KING\nALFRED, A.D. 890.\n\n\"And whereas all the other things, whether beast or vessel, that enter\ninto the dreadful gulf of this monster's (whale's) mouth, are\nimmediately lost and swallowed up, the sea-gudgeon retires into it in\ngreat security, and there sleeps.\"  MONTAIGNE.  APOLOGY FOR\nRAIMOND SEBOND.\n\n\"Let us fly, let us fly! Old Nick take me if is not Leviathan\ndescribed by the noble prophet Moses in the life of patient Job.\" \nRABELAIS.\n\n\"This whale's liver was two cartloads.\"  STOWE'S ANNALS.\n\n\"The great Leviathan that maketh the seas to seethe like boiling pan.\"\n LORD BACON'S VERSION OF THE PSALMS.\n\n\"Touching that monstrous bulk of the whale or ork we have received\nnothing certain. They grow exceeding fat, insomuch that an incredible\nquantity of oil will be extracted out of one whale.\" \nIBID. \"HISTORY OF LIFE AND DEATH.\"\n\n\"The sovereignest thing on earth is parmacetti for an inward bruise.\"\n KING HENRY.\n\n\"Very like a whale.\"  HAMLET.\n\n\"Which to secure, no skill of leach's art Mote him availle, but to\nreturne againe To his wound's worker, that with lowly dart, Dinting\nhis breast, had bred his restless paine, Like as the wounded whale to\nshore flies thro' the maine.\"  THE FAERIE QUEEN.\n\n\"Immense as whales, the motion of whose vast bodies can in a peaceful\ncalm trouble the ocean til it boil.\"  SIR WILLIAM DAVENANT. PREFACE\nTO GONDIBERT.\n\n\"What spermacetti is, men might justly doubt, since the learned\nHosmannus in his work of thirty years, saith plainly, Nescio quid\nsit.\"  SIR T. BROWNE. OF SPERMA CETI AND THE SPERMA CETI\nWHALE. VIDE HIS V. E.\n\n\"Like Spencer's Talus with his modern flail He threatens ruin with his\nponderous tail. ... Their fixed jav'lins in his side he wears, And on\nhis back a grove of pikes appears.\"  WALLER'S BATTLE OF THE SUMMER\nISLANDS.\n\n\"By art is created that great Leviathan, called a Commonwealth or\nState  (in Latin, Civitas) which is but an artificial man.\" \nOPENING SENTENCE OF HOBBES'S LEVIATHAN.\n\n\"Silly Mansoul swallowed it without chewing, as if it had been a sprat\nin the mouth of a whale.\"  PILGRIM'S PROGRESS.\n\n\"That sea beast Leviathan, which God of all his works Created hugest\nthat swim the ocean stream.\"  PARADISE LOST.\n\n -\"There Leviathan, Hugest of living creatures, in the deep\nStretched like a promontory sleeps or swims, And seems a moving land;\nand at his gills Draws in, and at his breath spouts out a sea.\" \nIBID.\n\n\"The mighty whales which swim in a sea of water, and have a sea of oil\nswimming in them.\"  FULLLER'S PROFANE AND HOLY STATE.\n\n\"So close behind some promontory lie The huge Leviathan to attend\ntheir prey, And give no chance, but swallow in the fry, Which through\ntheir gaping jaws mistake the way.\"  DRYDEN'S ANNUS MIRABILIS.\n\n\"While the whale is floating at the stern of the ship, they cut off\nhis head, and tow it with a boat as near the shore as it will come;\nbut it will be aground in twelve or thirteen feet water.\"  THOMAS\nEDGE'S TEN VOYAGES TO SPITZBERGEN, IN PURCHAS.\n\n\"In their way they saw many whales sporting in the ocean, and in\nwantonness fuzzing up the water through their pipes and vents, which\nnature has placed on their shoulders.\"  SIR T. HERBERT'S VOYAGES\nINTO ASIA AND AFRICA. HARRIS COLL.\n\n\"Here they saw such huge troops of whales, that they were forced to\nproceed with a great deal of caution for fear they should run their\nship upon them.\"  SCHOUTEN'S SIXTH CIRCUMNAVIGATION.\n\n\"We set sail from the Elbe, wind N.E. in the ship called The\nJonas-in-the-Whale. ... Some say the whale can't open his mouth, but\nthat is a fable. ... They frequently climb up the masts to see whether\nthey can see a whale, for the first discoverer has a ducat for his\npains. ... I was told of a whale taken near Shetland, that had above a\nbarrel of herrings in his belly. ... One of our harpooneers told me\nthat he caught once a whale in Spitzbergen that was white all over.\"\n A VOYAGE TO GREENLAND, A.D. 1671 HARRIS COLL.\n\n\"Several whales have come in upon this coast (Fife) Anno 1652, one\neighty feet in length of the whale-bone kind came in, which (as I was\ninformed), besides a vast quantity of oil, did afford 500 weight of\nbaleen. The jaws of it stand for a gate in the garden of Pitferren.\"\n SIBBALD'S FIFE AND KINROSS.\n\n\"Myself have agreed to try whether I can master and kill this\nSperma-ceti whale, for I could never hear of any of that sort that was\nkilled by any man, such is his fierceness and swiftness.\"  RICHARD\nSTRAFFORD'S LETTER FROM THE BERMUDAS. PHIL. TRANS. A.D. 1668.\n\n\"Whales in the sea God's voice obey.\"  N. E. PRIMER.\n\n\"We saw also abundance of large whales, there being more in those\nsouthern seas, as I may say, by a hundred to one; than we have to the\nnorthward of us.\"  CAPTAIN COWLEY'S VOYAGE ROUND THE GLOBE,\nA.D. 1729.\n\n\"... and the breath of the whale is frequendy attended with such an\ninsupportable smell, as to bring on a disorder of the brain.\" \nULLOA'S SOUTH AMERICA.\n\n\"To fifty chosen sylphs of special note, We trust the important\ncharge, the petticoat. Oft have we known that seven-fold fence to\nfail, Tho' stuffed with hoops and armed with ribs of whale.\"  RAPE\nOF THE LOCK.\n\n\"If we compare land animals in respect to magnitude, with those that\ntake up their abode in the deep, we shall find they will appear\ncontemptible in the comparison. The whale is doubtless the largest\nanimal in creation.\"  GOLDSMITH, NAT. HIST.\n\n\"If you should write a fable for little fishes, you would make them speak like great wales.\"  GOLDSMITH TO JOHNSON.\n\n\"In the afternoon we saw what was supposed to be a rock, but it was found to be a dead whale, which some Asiatics had killed, and were then towing ashore. They seemed to endeavor to conceal themselves behind the whale, in order to avoid being seen by us.\"  COOK'S VOYAGES.\n\n\"The larger whales, they seldom venture to attack. They stand in so great dread of some of them, that when out at sea they are afraid to mention even their names, and carry dung, lime-stone, juniper-wood, and some other articles of the same nature in their boats, in order to terrify and prevent their too near approach.\"  UNO VON TROIL'S LETTERS ON BANKS'S AND SOLANDER'S VOYAGE TO ICELAND IN 1772.\n\n\"The Spermacetti Whale found by the Nantuckois, is an active, fierce animal, and requires vast address and boldness in the fishermen.\"  THOMAS JEFFERSON'S WHALE MEMORIAL TO THE FRENCH MINISTER IN 1778.\n\n\"And pray, sir, what in the world is equal to it?\"  EDMUND BURKE'S REFERENCE IN PARLIAMENT TO THE NANTUCKET WHALE-FISHERY.\n\n\"Spain  a great whale stranded on the shores of Europe.\"  EDMUND BURKE. (SOMEWHERE.)\n\n\"A tenth branch of the king's ordinary revenue, said to be grounded on the consideration of his guarding and protecting the seas from pirates and robbers, is the right to royal fish, which are whale and sturgeon. And these, when either thrown ashore or caught near the coast, are the property of the king.\"  BLACKSTONE.\n\n\"Soon to the sport of death the crews repair: Rodmond unerring o'er his head suspends The barbed steel, and every turn attends.\"  FALCONER'S SHIPWRECK.\n\n\"Bright shone the roofs, the domes, the spires, And rockets blew self driven, To hang their momentary fire Around the vault of heaven.\n\n\"So fire with water to compare, The ocean serves on high, Up-spouted by a whale in air, To express unwieldy joy.\"  COWPER, ON THE QUEEN'S VISIT TO LONDON.\n\n\"Ten or fifteen gallons of blood are thrown out of the heart at a stroke, with immense velocity.\"  JOHN HUNTER'S ACCOUNT OF THE DISSECTION OF A WHALE. (A SMALL SIZED ONE.)\n\n\"The aorta of a whale is larger in the bore than the main pipe of the water-works at London Bridge, and the water roaring in its passage through that pipe is inferior in impetus and velocity to the blood gushing from the whale's heart.\"  PALEY'S THEOLOGY.\n\n\"The whale is a mammiferous animal without hind feet.\"  BARON CUVIER.\n\n\"In 40 degrees south, we saw Spermacetti Whales, but did not take any till the first of May, the sea being then covered with them.\"  COLNETT'S VOYAGE FOR THE PURPOSE OF EXTENDING THE SPERMACETI WHALE FISHERY.\n\n\"In the free element beneath me swam, Floundered and dived, in play, in chace, in battle, Fishes of every colour, form, and kind; Which language cannot paint, and mariner Had never seen; from dread Leviathan To insect millions peopling every wave: Gather'd in shoals immense, like floating islands, Led by mysterious instincts through that waste And trackless region, though on every side Assaulted by voracious enemies, Whales, sharks, and monsters, arm'd in front or jaw, With swords, saws, spiral horns, or hooked fangs.\"  MONTGOMERY'S WORLD BEFORE THE FLOOD.\n\n\"Io! Paean! Io! sing. To the finny people's king. Not a mightier whale than this In the vast Atlantic is; Not a fatter fish than he, Flounders round the Polar Sea.\"  CHARLES LAMB'S TRIUMPH OF THE WHALE.\n\n\"In the year 1690 some persons were on a high hill observing the whales spouting and sporting with each other, when one observed: there  pointing to the sea  is a green pasture where our children's grand-children will go for bread.\"  OBED MACY'S HISTORY OF NANTUCKET.\n\n\"I built a cottage for Susan and myself and made a gateway in the form of a Gothic Arch, by setting up a whale's jaw bones.\"  HAWTHORNE'S TWICE TOLD TALES.\n\n\"She came to bespeak a monument for her first love, who had been killed by a whale in the Pacific ocean, no less than forty years ago.\"  IBID.\n\n\"No, Sir, 'tis a Right Whale,\" answered Tom; \"I saw his sprout; he threw up a pair of as pretty rainbows as a Christian would wish to look at. He's a raal oil-butt, that fellow!\"  COOPER'S PILOT.\n\n\"The papers were brought in, and we saw in the Berlin Gazette that whales had been introduced on the stage there.\"  ECKERMANN'S CONVERSATIONS WITH GOETHE.\n\n\"My God! Mr. Chace, what is the matter?\" I answered, \"we have been stove by a whale.\"  \"NARRATIVE OF THE SHIPWRECK OF THE WHALE SHIP ESSEX OF NANTUCKET, WHICH WAS ATTACKED AND FINALLY DESTROYED BY A LARGE SPERM WHALE IN THE PACIFIC OCEAN.\" BY OWEN CHACE OF NANTUCKET, FIRST MATE OF SAID VESSEL. NEW YORK, 1821.\n\n\"A mariner sat in the shrouds one night, The wind was piping free; Now bright, now dimmed, was the moonlight pale, And the phospher gleamed in the wake of the whale, As it floundered in the sea.\"  ELIZABETH OAKES SMITH.\n\n\"The quantity of line withdrawn from the boats engaged in the capture of this one whale, amounted altogether to 10,440 yards or nearly six English miles. ...\n\n\"Sometimes the whale shakes its tremendous tail in the air, which, cracking like a whip, resounds to the distance of three or four miles.\"  SCORESBY.\n\n\"Mad with the agonies he endures from these fresh attacks, the infuriated Sperm Whale rolls over and over; he rears his enormous head, and with wide expanded jaws snaps at everything around him; he rushes at the boats with his head; they are propelled before him with vast swiftness, and sometimes utterly destroyed. ... It is a matter of great astonishment that the consideration of the habits of so interesting, and, in a commercial point of view, so important an animal (as the Sperm Whale) should have been so entirely neglected, or should have excited so little curiosity among the numerous, and many of them competent observers, that of late years, must have possessed the most abundant and the most convenient opportunities of witnessing their habitudes.\"  THOMAS BEALE'S HISTORY OF THE SPERM WHALE, 1839.\n\n\"The Cachalot\" (Sperm Whale) \"is not only better armed than the True Whale\" (Greenland or Right Whale) \"in possessing a formidable weapon at either extremity of its body, but also more frequently displays a disposition to employ these weapons offensively and in manner at once so artful, bold, and mischievous, as to lead to its being regarded as the most dangerous to attack of all the known species of the whale tribe.\"  FREDERICK DEBELL BENNETT'S WHALING VOYAGE ROUND THE GLOBE, 1840.\n\nOctober 13. \"There she blows,\" was sung out from the mast-head. \"Where away?\" demanded the captain. \"Three points off the lee bow, sir.\" \"Raise up your wheel. Steady!\" \"Steady, sir.\" \"Mast-head ahoy! Do you see that whale now?\" \"Ay ay, sir! A shoal of Sperm Whales! There she blows! There she breaches!\" \"Sing out! sing out every time!\" \"Ay Ay, sir! There she blows! there  there  THAR she blows  bowes  bo-o-os!\" \"How far off?\" \"Two miles and a half.\" \"Thunder and lightning! so near! Call all hands.\"  J. ROSS BROWNE'S ETCHINGS OF A WHALING CRUIZE. 1846.\n\n\"The Whale-ship Globe, on board of which vessel occurred the horrid transactions we are about to relate, belonged to the island of Nantucket.\"  \"NARRATIVE OF THE GLOBE,\" BY LAY AND HUSSEY SURVIVORS. A.D. 1828.\n\nBeing once pursued by a whale which he had wounded, he parried the assault for some time with a lance; but the furious monster at length rushed on the boat; himself and comrades only being preserved by leaping into the water when they saw the onset was inevitable.\"  MISSIONARY JOURNAL OF TYERMAN AND BENNETT.\n\n\"Nantucket itself,\" said Mr. Webster, \"is a very striking and peculiar portion of the National interest. There is a population of eight or nine thousand persons living here in the sea, adding largely every year to the National wealth by the boldest and most persevering industry.\"  REPORT OF DANIEL WEBSTER'S SPEECH IN THE U. S. SENATE, ON THE APPLICATION FOR THE ERECTION OF A BREAKWATER AT NANTUCKET. 1828.\n\n\"The whale fell directly over him, and probably killed him in a moment.\"  \"THE WHALE AND HIS CAPTORS, OR THE WHALEMAN'S ADVENTURES AND THE WHALE'S BIOGRAPHY, GATHERED ON THE HOMEWARD CRUISE OF THE COMMODORE PREBLE.\" BY REV. HENRY T. CHEEVER.\n\n\"If you make the least damn bit of noise,\" replied Samuel, \"I will send you to hell.\"  LIFE OF SAMUEL COMSTOCK (THE MUTINEER), BY HIS BROTHER, WILLIAM COMSTOCK. ANOTHER VERSION OF THE WHALE-SHIP GLOBE NARRATIVE.\n\n\"The voyages of the Dutch and English to the Northern Ocean, in order, if possible, to discover a passage through it to India, though they failed of their main object, laid-open the haunts of the whale.\"  MCCULLOCH'S COMMERCIAL DICTIONARY.\n\n\"These things are reciprocal; the ball rebounds, only to bound forward again; for now in laying open the haunts of the whale, the whalemen seem to have indirectly hit upon new clews to that same mystic North-West Passage.\"  FROM \"SOMETHING\" UNPUBLISHED.\n\n\"It is impossible to meet a whale-ship on the ocean without being struck by her near appearance. The vessel under short sail, with look-outs at the mast-heads, eagerly scanning the wide expanse around them, has a totally different air from those engaged in regular voyage.\"  CURRENTS AND WHALING. U.S. EX. EX.\n\n\"Pedestrians in the vicinity of London and elsewhere may recollect having seen large curved bones set upright in the earth, either to form arches over gateways, or entrances to alcoves, and they may perhaps have been told that these were the ribs of whales.\"  TALES OF A WHALE VOYAGER TO THE ARCTIC OCEAN.\n\n\"It was not till the boats returned from the pursuit of these whales, that the whites saw their ship in bloody possession of the savages enrolled among the crew.\"  NEWSPAPER ACCOUNT OF THE TAKING AND RETAKING OF THE WHALE-SHIP HOBOMACK.\n\n\"It is generally well known that out of the crews of Whaling vessels (American) few ever return in the ships on board of which they departed.\"  CRUISE IN A WHALE BOAT.\n\n\"Suddenly a mighty mass emerged from the water, and shot up perpendicularly into the air. It was the while.\"  MIRIAM COFFIN OR THE WHALE FISHERMAN.\n\n\"The Whale is harpooned to be sure; but bethink you, how you would manage a powerful unbroken colt, with the mere appliance of a rope tied to the root of his tail.\"  A CHAPTER ON WHALING IN RIBS AND TRUCKS.\n\n\"On one occasion I saw two of these monsters (whales) probably male and female, slowly swimming, one after the other, within less than a stone's throw of the shore\" (Terra Del Fuego), \"over which the beech tree extended its branches.\"  DARWIN'S VOYAGE OF A NATURALIST.\n\n\"'Stern all!' exclaimed the mate, as upon turning his head, he saw the distended jaws of a large Sperm Whale close to the head of the boat, threatening it with instant destruction;  'Stern all, for your lives!'\"  WHARTON THE WHALE KILLER.\n\n\"So be cheery, my lads, let your hearts never fail, While the bold harpooneer is striking the whale!\"  NANTUCKET SONG.\n\n\"Oh, the rare old Whale, mid storm and gale In his ocean home will be A giant in might, where might is right, And King of the boundless sea.\"  WHALE SONG.\n\nCHAPTER 1\nLoomings.\n\nCall me Ishmael. Some years ago  never mind how long precisely  having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off  then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me.\n\nThere now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs  commerce surrounds it with her surf. Right and left, the streets take you waterward. Its extreme downtown is the battery, where that noble mole is washed by waves, and cooled by breezes, which a few hours previous were out of sight of land. Look at the crowds of water-gazers there.\n\nCircumambulate the city of a dreamy Sabbath afternoon. Go from Corlears Hook to Coenties Slip, and from thence, by Whitehall, northward. What do you see?  Posted like silent sentinels all around the town, stand thousands upon thousands of mortal men fixed in ocean reveries. Some leaning against the spiles; some seated upon the pier-heads; some looking over the bulwarks of ships from China; some high aloft in the rigging, as if striving to get a still better seaward peep. But these are all landsmen; of week days pent up in lath and plaster  tied to counters, nailed to benches, clinched to desks. How then is this? Are the green fields gone? What do they here?\n\nBut look! here come more crowds, pacing straight for the water, and seemingly bound for a dive. Strange! Nothing will content them but the extremest limit of the land; loitering under the shady lee of yonder warehouses will not suffice. No. They must get just as nigh the water as they possibly can without falling in. And there they stand  miles of them  leagues. Inlanders all, they come from lanes and alleys, streets and avenues  north, east, south, and west. Yet here they all unite. Tell me, does the magnetic virtue of the needles of the compasses of all those ships attract them thither?\n\nOnce more. Say you are in the country; in some high land of lakes. Take almost any path you please, and ten to one it carries you down in a dale, and leaves you there by a pool in the stream. There is magic in it. Let the most absent-minded of men be plunged in his deepest reveries  stand that man on his legs, set his feet a-going, and he will infallibly lead you to water, if water there be in all that region. Should you ever be athirst in the great American desert, try this experiment, if your caravan happen to be supplied with a metaphysical professor. Yes, as every one knows, meditation and water are wedded for ever.\n\nBut here is an artist. He desires to paint you the dreamiest, shadiest, quietest, most enchanting bit of romantic landscape in all the valley of the Saco. What is the chief element he employs? There stand his trees, each with a hollow trunk, as if a hermit and a crucifix were within; and here sleeps his meadow, and there sleep his cattle; and up from yonder cottage goes a sleepy smoke. Deep into distant woodlands winds a mazy way, reaching to overlapping spurs of mountains bathed in their hill-side blue. But though the picture lies thus tranced, and though this pine-tree shakes down its sighs like leaves upon this shepherd's head, yet all were vain, unless the shepherd's eye were fixed upon the magic stream before him. Go visit the Prairies in June, when for scores on scores of miles you wade knee-deep among Tiger-lilies  what is the one charm wanting?  Water  there is not a drop of water there! Were Niagara but a cataract of sand, would you travel your thousand miles to see it? Why did the poor poet of Tennessee, upon suddenly receiving two handfuls of silver, deliberate whether to buy him a coat, which he sadly needed, or invest his money in a pedestrian trip to Rockaway Beach? Why is almost every robust healthy boy with a robust healthy soul in him, at some time or other crazy to go to sea? Why upon your first voyage as a passenger, did you yourself feel such a mystical vibration, when first told that you and your ship were now out of sight of land? Why did the old Persians hold the sea holy? Why did the Greeks give it a separate deity, and own brother of Jove? Surely all this is not without meaning. And still deeper the meaning of that story of Narcissus, who because he could not grasp the tormenting, mild image he saw in the fountain, plunged into it and was drowned. But that same image, we ourselves see in all rivers and oceans. It is the image of the ungraspable phantom of life; and this is the key to it all.\n\nNow, when I say that I am in the habit of going to sea whenever I begin to grow hazy about the eyes, and begin to be over conscious of my lungs, I do not mean to have it inferred that I ever go to sea as a passenger. For to go as a passenger you must needs have a purse, and a purse is but a rag unless you have something in it. Besides, passengers get sea-sick  grow quarrelsome  don't sleep of nights  do not enjoy themselves much, as a general thing;  no, I never go as a passenger; nor, though I am something of a salt, do I ever go to sea as a Commodore, or a Captain, or a Cook. I abandon the glory and distinction of such offices to those who like them. For my part, I abominate all honourable respectable toils, trials, and tribulations of every kind whatsoever. It is quite as much as I can do to take care of myself, without taking care of ships, barques, brigs, schooners, and what not. And as for going as cook,  though I confess there is considerable glory in that, a cook being a sort of officer on ship-board  yet, somehow, I never fancied broiling fowls;  though once broiled, judiciously buttered, and judgmatically salted and peppered, there is no one who will speak more respectfully, not to say reverentially, of a broiled fowl than I will. It is out of the idolatrous dotings of the old Egyptians upon broiled ibis and roasted river horse, that you see the mummies of those creatures in their huge bake-houses the pyramids.\n\nNo, when I go to sea, I go as a simple sailor, right before the mast, plumb down into the forecastle, aloft there to the royal mast-head. True, they rather order me about some, and make me jump from spar to spar, like a grasshopper in a May meadow. And at first, this sort of thing is unpleasant enough. It touches one's sense of honour, particularly if you come of an old established family in the land, the Van Rensselaers, or Randolphs, or Hardicanutes. And more than all, if just previous to putting your hand into the tar-pot, you have been lording it as a country schoolmaster, making the tallest boys stand in awe of you. The transition is a keen one, I assure you, from a schoolmaster to a sailor, and requires a strong decoction of Seneca and the Stoics to enable you to grin and bear it. But even this wears off in time.\n\nWhat of it, if some old hunks of a sea-captain orders me to get a broom and sweep down the decks? What does that indignity amount to, weighed, I mean, in the scales of the New Testament? Do you think the archangel Gabriel thinks anything the less of me, because I promptly and respectfully obey that old hunks in that particular instance? Who ain't a slave? Tell me that. Well, then, however the old sea-captains may order me about  however they may thump and punch me about, I have the satisfaction of knowing that it is all right; that everybody else is one way or other served in much the same way  either in a physical or metaphysical point of view, that is; and so the universal thump is passed round, and all hands should rub each other's shoulder-blades, and be content.\n\nAgain, I always go to sea as a sailor, because they make a point of paying me for my trouble, whereas they never pay passengers a single penny that I ever heard of. On the contrary, passengers themselves must pay. And there is all the difference in the world between paying and being paid. The act of paying is perhaps the most uncomfortable infliction that the two orchard thieves entailed upon us. But being paid,  what will compare with it? The urbane activity with which a man receives money is really marvellous, considering that we so earnestly believe money to be the root of all earthly ills, and that on no account can a monied man enter heaven. Ah! how cheerfully we consign ourselves to perdition!\n\nFinally, I always go to sea as a sailor, because of the wholesome exercise and pure air of the fore-castle deck. For as in this world, head winds are far more prevalent than winds from astern (that is, if you never violate the Pythagorean maxim), so for the most part the Commodore on the quarter-deck gets his atmosphere at second hand from the sailors on the forecastle. He thinks he breathes it first; but not so. In much the same way do the commonalty lead their leaders in many other things, at the same time that the leaders little suspect it. But wherefore it was that after having repeatedly smelt the sea as a merchant sailor, I should now take it into my head to go on a whaling voyage; this the invisible police officer of the Fates, who has the constant surveillance of me, and secretly dogs me, and influences me in some unaccountable way  he can better answer than any one else. And, doubtless, my going on this whaling voyage, formed part of the grand programme of Providence that was drawn up a long time ago. It came in as a sort of brief interlude and solo between more extensive performances. I take it that this part of the bill must have run something like this:\n\n\"GRAND CONTESTED ELECTION FOR THE PRESIDENCY OF THE UNITED STATES.\n\n\"WHALING VOYAGE BY ONE ISHMAEL.\n\n\"BLOODY BATTLE IN AFFGHANISTAN.\"\n\nThough I cannot tell why it was exactly that those stage managers, the Fates, put me down for this shabby part of a whaling voyage, when others were set down for magnificent parts in high tragedies, and short and easy parts in genteel comedies, and jolly parts in farces  though I cannot tell why this was exactly; yet, now that I recall all the circumstances, I think I can see a little into the springs and motives which being cunningly presented to me under various disguises, induced me to set about performing the part I did, besides cajoling me into the delusion that it was a choice resulting from my own unbiased freewill and discriminating judgment.\n\nChief among these motives was the overwhelming idea of the great whale himself. Such a portentous and mysterious monster roused all my curiosity. Then the wild and distant seas where he rolled his island bulk; the undeliverable, nameless perils of the whale; these, with all the attending marvels of a thousand Patagonian sights and sounds, helped to sway me to my wish. With other men, perhaps, such things would not have been inducements; but as for me, I am tormented with an everlasting itch for things remote. I love to sail forbidden seas, and land on barbarous coasts. Not ignoring what is good, I am quick to perceive a horror, and could still be social with it  would they let me  since it is but well to be on friendly terms with all the inmates of the place one lodges in.\n\nBy reason of these things, then, the whaling voyage was welcome; the great flood-gates of the wonder-world swung open, and in the wild conceits that swayed me to my purpose, two and two there floated into my inmost soul, endless processions of the whale, and, mid most of them all, one grand hooded phantom, like a snow hill in the air.\n\nCHAPTER 2\nThe Carpet-Bag.\n\nI stuffed a shirt or two into my old carpet-bag, tucked it under my arm, and started for Cape Horn and the Pacific. Quitting the good city of old Manhatto, I duly arrived in New Bedford. It was a Saturday night in December. Much was I disappointed upon learning that the little packet for Nantucket had already sailed, and that no way of reaching that place would offer, till the following Monday.\n\nAs most young candidates for the pains and penalties of whaling stop at this same New Bedford, thence to embark on their voyage, it may as well be related that I, for one, had no idea of so doing. For my mind was made up to sail in no other than a Nantucket craft, because there was a fine, boisterous something about everything connected with that famous old island, which amazingly pleased me. Besides though New Bedford has of late been gradually monopolising the business of whaling, and though in this matter poor old Nantucket is now much behind her, yet Nantucket was her great original  the Tyre of this Carthage;  the place where the first dead American whale was stranded. Where else but from Nantucket did those aboriginal whalemen, the Red-Men, first sally out in canoes to give chase to the Leviathan? And where but from Nantucket, too, did that first adventurous little sloop put forth, partly laden with imported cobblestones  so goes the story  to throw at the whales, in order to discover when they were nigh enough to risk a harpoon from the bowsprit?\n\nNow having a night, a day, and still another night following before me in New Bedford, ere I could embark for my destined port, it became a matter of concernment where I was to eat and sleep meanwhile. It was a very dubious-looking, nay, a very dark and dismal night, bitingly cold and cheerless. I knew no one in the place. With anxious grapnels I had sounded my pocket, and only brought up a few pieces of silver,  So, wherever you go, Ishmael, said I to myself, as I stood in the middle of a dreary street shouldering my bag, and comparing the gloom towards the north with the darkness towards the south  wherever in your wisdom you may conclude to lodge for the night, my dear Ishmael, be sure to inquire the price, and don't be too particular.\n\nWith halting steps I paced the streets, and passed the sign of \"The Crossed Harpoons\"  but it looked too expensive and jolly there. Further on, from the bright red windows of the \"Sword-Fish Inn,\" there came such fervent rays, that it seemed to have melted the packed snow and ice from before the house, for everywhere else the congealed frost lay ten inches thick in a hard, asphaltic pavement,  rather weary for me, when I struck my foot against the flinty projections, because from hard, remorseless service the soles of my boots were in a most miserable plight. Too expensive and jolly, again thought I, pausing one moment to watch the broad glare in the street, and hear the sounds of the tinkling glasses within. But go on, Ishmael, said I at last; don't you hear? get away from before the door; your patched boots are stopping the way. So on I went. I now by instinct followed the streets that took me waterward, for there, doubtless, were the cheapest, if not the cheeriest inns.\n\nSuch dreary streets! blocks of blackness, not houses, on either hand, and here and there a candle, like a candle moving about in a tomb. At this hour of the night, of the last day of the week, that quarter of the town proved all but deserted. But presently I came to a smoky light proceeding from a low, wide building, the door of which stood invitingly open. It had a careless look, as if it were meant for the uses of the public; so, entering, the first thing I did was to stumble over an ash-box in the porch. Ha! thought I, ha, as the flying particles almost choked me, are these ashes from that destroyed city, Gomorrah? But \"The Crossed Harpoons,\" and \"The Sword-Fish?\"  this, then must needs be the sign of \"The Trap.\" However, I picked myself up and hearing a loud voice within, pushed on and opened a second, interior door.\n\nIt seemed the great Black Parliament sitting in Tophet. A hundred black faces turned round in their rows to peer; and beyond, a black Angel of Doom was beating a book in a pulpit. It was a negro church; and the preacher's text was about the blackness of darkness, and the weeping and wailing and teeth-gnashing there. Ha, Ishmael, muttered I, backing out, Wretched entertainment at the sign of 'The Trap!'\n\nMoving on, I at last came to a dim sort of light not far from the docks, and heard a forlorn creaking in the air; and looking up, saw a swinging sign over the door with a white painting upon it, faintly representing a tall straight jet of misty spray, and these words underneath  \"The Spouter Inn:  Peter Coffin.\"\n\nCoffin?  Spouter?  Rather ominous in that particular connexion, thought I. But it is a common name in Nantucket, they say, and I suppose this Peter here is an emigrant from there. As the light looked so dim, and the place, for the time, looked quiet enough, and the dilapidated little wooden house itself looked as if it might have been carted here from the ruins of some burnt district, and as the swinging sign had a poverty-stricken sort of creak to it, I thought that here was the very spot for cheap lodgings, and the best of pea coffee.\n\nIt was a queer sort of place  a gable-ended old house, one side palsied as it were, and leaning over sadly. It stood on a sharp bleak corner, where that tempestuous wind Euroclydon kept up a worse howling than ever it did about poor Paul's tossed craft. Euroclydon, nevertheless, is a mighty pleasant zephyr to any one in-doors, with his feet on the hob quietly toasting for bed. \"In judging of that tempestuous wind called Euroclydon,\" says an old writer  of whose works I possess the only copy extant  \"it maketh a marvellous difference, whether thou lookest out at it from a glass window where the frost is all on the outside, or whether thou observest it from that sashless window, where the frost is on both sides, and of which the wight Death is the only glazier.\" True enough, thought I, as this passage occurred to my mind  old black-letter, thou reasonest well. Yes, these eyes are windows, and this body of mine is the house. What a pity they didn't stop up the chinks and the crannies though, and thrust in a little lint here and there. But it's too late to make any improvements now. The universe is finished; the copestone is on, and the chips were carted off a million years ago. Poor Lazarus there, chattering his teeth against the curbstone for his pillow, and shaking off his tatters with his shiverings, he might plug up both ears with rags, and put a corn-cob into his mouth, and yet that would not keep out the tempestuous Euroclydon. Euroclydon! says old Dives, in his red silken wrapper  (he had a redder one afterwards) pooh, pooh! What a fine frosty night; how Orion glitters; what northern lights! Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals.\n\nBut what thinks Lazarus? Can he warm his blue hands by holding them up to the grand northern lights? Would not Lazarus rather be in Sumatra than here? Would he not far rather lay him down lengthwise along the line of the equator; yea, ye gods! go down to the fiery pit itself, in order to keep out this frost?\n\nNow, that Lazarus should lie stranded there on the curbstone before the door of Dives, this is more wonderful than that an iceberg should be moored to one of the Moluccas. Yet Dives himself, he too lives like a Czar in an ice palace made of frozen sighs, and being a president of a temperance society, he only drinks the tepid tears of orphans.\n\nBut no more of this blubbering now, we are going a-whaling, and there is plenty of that yet to come. Let us scrape the ice from our frosted feet, and see what sort of a place this \"Spouter\" may be.\n\nCHAPTER 3\nThe Spouter-Inn.\n\nEntering that gable-ended Spouter-Inn, you found yourself in a wide, low, straggling entry with old-fashioned wainscots, reminding one of the bulwarks of some condemned old craft. On one side hung a very large oilpainting so thoroughly besmoked, and every way defaced, that in the unequal crosslights by which you viewed it, it was only by diligent study and a series of systematic visits to it, and careful inquiry of the neighbors, that you could any way arrive at an understanding of its purpose. Such unaccountable masses of shades and shadows, that at first you almost thought some ambitious young artist, in the time of the New England hags, had endeavored to delineate chaos bewitched. But by dint of much and earnest contemplation, and oft repeated ponderings, and especially by throwing open the little window towards the back of the entry, you at last come to the conclusion that such an idea, however wild, might not be altogether unwarranted.\n\nBut what most puzzled and confounded you was a long, limber, portentous, black mass of something hovering in the centre of the picture over three blue, dim, perpendicular lines floating in a nameless yeast. A boggy, soggy, squitchy picture truly, enough to drive a nervous man distracted. Yet was there a sort of indefinite, half-attained, unimaginable sublimity about it that fairly froze you to it, till you involuntarily took an oath with yourself to find out what that marvellous painting meant. Ever and anon a bright, but, alas, deceptive idea would dart you through.  It's the Black Sea in a midnight gale.  It's the unnatural combat of the four primal elements.  It's a blasted heath.  It's a Hyperborean winter scene.  It's the breaking-up of the icebound stream of Time. But at last all these fancies yielded to that one portentous something in the picture's midst. that once found out, and all the rest were plain. But stop; does it not bear a faint resemblance to a gigantic fish? even the great leviathan himself?\n\nIn fact, the artist's design seemed this: a final theory of my own, partly based upon the aggregated opinions of many aged persons with whom I conversed upon the subject. The picture represents a Cape-Horner in a great hurricane; the half-foundered ship weltering there with its three dismantled masts alone visible; and an exasperated whale, purposing to spring clean over the craft, is in the enormous act of impaling himself upon the three mast-heads.\n\nThe opposite wall of this entry was hung all over with a heathenish array of monstrous clubs and spears. Some were thickly set with glittering teeth resembling ivory saws; others were tufted with knots of human hair; and one was sickle-shaped, with a vast handle sweeping round like the segment made in the new-mown grass by a long-armed mower. You shuddered as you gazed, and wondered what monstrous cannibal and savage could ever have gone a death-harvesting with such a hacking, horrifying implement. Mixed with these were rusty old whaling lances and harpoons all broken and deformed. Some were storied weapons. With this once long lance, now wildly elbowed, fifty years ago did Nathan Swain kill fifteen whales between a sunrise and a sunset. And that harpoon  so like a corkscrew now  was flung in Javan seas, and run away with by a whale, years afterwards slain off the Cape of Blanco. The original iron entered nigh the tail, and, like a restless needle sojourning in the body of a man, travelled full forty feet, and at last was found imbedded in the hump.\n\nCrossing this dusky entry, and on through yon low-arched way  cut through what in old times must have been a great central chimney with fireplaces all round  you enter the public room. A still duskier place is this, with such low ponderous beams above, and such old wrinkled planks beneath, that you would almost fancy you trod some old craft's cockpits, especially of such a howling night, when this corner-anchored old ark rocked so furiously. On one side stood a long, low, shelf-like table covered with cracked glass cases, filled with dusty rarities gathered from this wide world's remotest nooks. Projecting from the further angle of the room stands a dark-looking den  the bar  a rude attempt at a right whale's head. Be that how it may, there stands the vast arched bone of the whale's jaw, so wide, a coach might almost drive beneath it. Within are shabby shelves, ranged round with old decanters, bottles, flasks; and in those jaws of swift destruction, like another cursed Jonah (by which name indeed they called him), bustles a little withered old man, who, for their money, dearly sells the sailors deliriums and death.\n\nAbominable are the tumblers into which he pours his poison. Though true cylinders without  within, the villanous green goggling glasses deceitfully tapered downwards to a cheating bottom. Parallel meridians rudely pecked into the glass, surround these footpads' goblets. Fill to this mark, and your charge is but a penny; to this a penny more; and so on to the full glass  the Cape Horn measure, which you may gulp down for a shilling.\n\nUpon entering the place I found a number of young seamen gathered about a table, examining by a dim light divers specimens of skrimshander. I sought the landlord, and telling him I desired to be accommodated with a room, received for answer that his house was full  not a bed unoccupied. \"But avast,\" he added, tapping his forehead, \"you haint no objections to sharing a harpooneer's blanket, have ye? I s'pose you are goin' a-whalin', so you'd better get used to that sort of thing.\" I told him that I never liked to sleep two in a bed; that if I should ever do so, it would depend upon who the harpooneer might be, and that if he (the landlord) really had no other place for me, and the harpooneer was not decidedly objectionable, why rather than wander further about a strange town on so bitter a night, I would put up with the half of any decent man's blanket.\n\n\"I thought so. All right; take a seat. Supper?  you want supper? Supper'll be ready directly.\"\n\nI sat down on an old wooden settle, carved all over like a bench on the Battery. At one end a ruminating tar was still further adorning it with his jack-knife, stooping over and diligently working away at the space between his legs. He was trying his hand at a ship under full sail, but he didn't make much headway, I thought.\n\nAt last some four or five of us were summoned to our meal in an adjoining room. It was cold as Iceland  no fire at all  the landlord said he couldn't afford it. Nothing but two dismal tallow candles, each in a winding sheet. We were fain to button up our monkey jackets, and hold to our lips cups of scalding tea with our half frozen fingers. But the fare was of the most substantial kind  not only meat and potatoes, but dumplings; good heavens! dumplings for supper! One young fellow in a green box coat, addressed himself to these dumplings in a most direful manner.\n\n\"My boy,\" said the landlord, \"you'll have the nightmare to a dead sartainty.\"\n\n\"Landlord,\" I whispered, \"that aint the harpooneer is it?\"\n\n\"Oh, no,\" said he, looking a sort of diabolically funny, \"the harpooneer is a dark complexioned chap. He never eats dumplings, he don't  he eats nothing but steaks, and he likes 'em rare.\"\n\n\"The devil he does,\" says I. \"Where is that harpooneer? Is he here?\"\n\n\"He'll be here afore long,\" was the answer.\n\nI could not help it, but I began to feel suspicious of this \"dark complexioned\" harpooneer. At any rate, I made up my mind that if it so turned out that we should sleep together, he must undress and get into bed before I did.\n\nSupper over, the company went back to the bar-room, when, knowing not what else to do with myself, I resolved to spend the rest of the evening as a looker on.\n\nPresently a rioting noise was heard without. Starting up, the landlord cried, \"That's the Grampus's crew. I seed her reported in the offing this morning; a three years' voyage, and a full ship. Hurrah, boys; now we'll have the latest news from the Feegees.\"\n\nA tramping of sea boots was heard in the entry; the door was flung open, and in rolled a wild set of mariners enough. Enveloped in their shaggy watch coats, and with their heads muffled in woollen comforters, all bedarned and ragged, and their beards stiff with icicles, they seemed an eruption of bears from Labrador. They had just landed from their boat, and this was the first house they entered. No wonder, then, that they made a straight wake for the whale's mouth  the bar  when the wrinkled little old Jonah, there officiating, soon poured them out brimmers all round. One complained of a bad cold in his head, upon which Jonah mixed him a pitch-like potion of gin and molasses, which he swore was a sovereign cure for all colds and catarrhs whatsoever, never mind of how long standing, or whether caught off the coast of Labrador, or on the weather side of an ice-island.\n\nThe liquor soon mounted into their heads, as it generally does even with the arrantest topers newly landed from sea, and they began capering about most obstreperously.\n\nI observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of \"Bulkington! Bulkington! where's Bulkington?\" and darted out of the house in pursuit of him.\n\nIt was now about nine o'clock, and the room seeming almost supernaturally quiet after these orgies, I began to congratulate myself upon a little plan that had occurred to me just previous to the entrance of the seamen.\n\nNo man prefers to sleep two in a bed. In fact, you would a good deal rather not sleep with your own brother. I don't know how it is, but people like to be private when they are sleeping. And when it comes to sleeping with an unknown stranger, in a strange inn, in a strange town, and that stranger a harpooneer, then your objections indefinitely multiply. Nor was there any earthly reason why I as a sailor should sleep two in a bed, more than anybody else; for sailors no more sleep two in a bed at sea, than bachelor Kings do ashore. To be sure they all sleep together in one apartment, but you have your own hammock, and cover yourself with your own blanket, and sleep in your own skin.\n\nThe more I pondered over this harpooneer, the more I abominated the thought of sleeping with him. It was fair to presume that being a harpooneer, his linen or woollen, as the case might be, would not be of the tidiest, certainly none of the finest. I began to twitch all over. Besides, it was getting late, and my decent harpooneer ought to be home and going bedwards. Suppose now, he should tumble in upon me at midnight  how could I tell from what vile hole he had been coming?\n\n\"Landlord! I've changed my mind about that harpooneer.  I shan't sleep with him. I'll try the bench here.\"\n\n\"Just as you please; I'm sorry I cant spare ye a tablecloth for a mattress, and it's a plaguy rough board here\"  feeling of the knots and notches. \"But wait a bit, Skrimshander; I've got a carpenter's plane there in the bar  wait, I say, and I'll make ye snug enough.\" So saying he procured the plane; and with his old silk handkerchief first dusting the bench, vigorously set to planing away at my bed, the while grinning like an ape. The shavings flew right and left; till at last the plane-iron came bump against an indestructible knot. The landlord was near spraining his wrist, and I told him for heaven's sake to quit  the bed was soft enough to suit me, and I did not know how all the planing in the world could make eider down of a pine plank. So gathering up the shavings with another grin, and throwing them into the great stove in the middle of the room, he went about his business, and left me in a brown study.\n\nI now took the measure of the bench, and found that it was a foot too\nshort; but that could be mended with a chair. But it was a foot too\nnarrow, and the other bench in the room was about four inches higher\nthan the planed one  so there was no yoking them. I then placed the\nfirst bench lengthwise along the only clear space against the wall,\nleaving a little interval between, for my back to settle down in. But\nI soon found that there came such a draught of cold air over me from\nunder the sill of the window, that this plan would never do at all,\nespecially as another current from the rickety door met the one from\nthe window, and both together formed a series of small whirlwinds in\nthe immediate vicinity of the spot where I had thought to spend the\nnight.\n\nThe devil fetch that harpooneer, thought I, but stop, couldn't I steal\na march on him  bolt his door inside, and jump into his bed, not to\nbe wakened by the most violent knockings? It seemed no bad idea; but\nupon second thoughts I dismissed it. For who could tell but what the\nnext morning, so soon as I popped out of the room, the harpooneer\nmight be standing in the entry, all ready to knock me down!\n\nStill, looking round me again, and seeing no possible chance of\nspending a sufferable night unless in some other person's bed, I began\nto think that after all I might be cherishing unwarrantable prejudices\nagainst this unknown harpooneer. Thinks I, I'll wait awhile; he must\nbe dropping in before long. I'll have a good look at him then, and\nperhaps we may become jolly good bedfellows after all  there's no\ntelling.\n\nBut though the other boarders kept coming in by ones, twos, and\nthrees, and going to bed, yet no sign of my harpooneer.\n\n\"Landlord! said I, \"what sort of a chap is he  does he always keep\nsuch late hours?\" It was now hard upon twelve o'clock.\n\nThe landlord chuckled again with his lean chuckle, and seemed to be\nmightily tickled at something beyond my comprehension. \"No,\" he\nanswered, \"generally he's an early bird  airley to bed and airley\nto rise  yes, he's the bird what catches the worm. But to-night he\nwent out a peddling, you see, and I don't see what on airth keeps him\nso late, unless, may be, he can't sell his head.\"\n\n\"Can't sell his head?  What sort of a bamboozingly story is this\nyou are telling me?\" getting into a towering rage. \"Do you pretend to\nsay, landlord, that this harpooneer is actually engaged this blessed\nSaturday night, or rather Sunday morning, in peddling his head around\nthis town?\"\n\n\"That's precisely it,\" said the landlord, \"and I told him he couldn't\nsell it here, the market's overstocked.\"\n\n\"With what?\" shouted I.\n\n\"With heads to be sure; ain't there too many heads in the world?\"\n\n\"I tell you what it is, landlord,\" said I quite calmly, \"you'd better\nstop spinning that yarn to me  I'm not green.\"\n\n\"May be not,\" taking out a stick and whittling a toothpick, \"but I\nrayther guess you'll be done BROWN if that ere harpooneer hears you a\nslanderin' his head.\"\n\n\"I'll break it for him,\" said I, now flying into a passion again at\nthis unaccountable farrago of the landlord's.\n\n\"It's broke a'ready,\" said he.\n\n\"Broke,\" said I  \"broke, do you mean?\"\n\n\"Sartain, and that's the very reason he can't sell it, I guess.\"\n\n\"Landlord,\" said I, going up to him as cool as Mt. Hecla in a\nsnow-storm  \"landlord, stop whittling. You and I must understand\none another, and that too without delay. I come to your house and want\na bed; you tell me you can only give me half a one; that the other\nhalf belongs to a certain harpooneer. And about this harpooneer, whom\nI have not yet seen, you persist in telling me the most mystifying and\nexasperating stories tending to beget in me an uncomfortable feeling\ntowards the man whom you design for my bedfellow  a sort of\nconnexion, landlord, which is an intimate and confidential one in the\nhighest degree. I now demand of you to speak out and tell me who and\nwhat this harpooneer is, and whether I shall be in all respects safe\nto spend the night with him. And in the first place, you will be so\ngood as to unsay that story about selling his head, which if true I\ntake to be good evidence that this harpooneer is stark mad, and I've\nno idea of sleeping with a madman; and you, sir, YOU I mean, landlord,\nyou, sir, by trying to induce me to do so knowingly, would thereby\nrender yourself liable to a criminal prosecution.\"\n\n\"Wall,\" said the landlord, fetching a long breath, \"that's a purty\nlong sarmon for a chap that rips a little now and then. But be easy,\nbe easy, this here harpooneer I have been tellin' you of has just\narrived from the south seas, where he bought up a lot of 'balmed New\nZealand heads (great curios, you know), and he's sold all on 'em but\none, and that one he's trying to sell to-night, cause to-morrow's\nSunday, and it would not do to be sellin' human heads about the\nstreets when folks is goin' to churches. He wanted to, last Sunday,\nbut I stopped him just as he was goin' out of the door with four heads\nstrung on a string, for all the airth like a string of inions.\"\n\nThis account cleared up the otherwise unaccountable mystery, and\nshowed that the landlord, after all, had had no idea of fooling me \nbut at the same time what could I think of a harpooneer who stayed out\nof a Saturday night clean into the holy Sabbath, engaged in such a\ncannibal business as selling the heads of dead idolators?\n\n\"Depend upon it, landlord, that harpooneer is a dangerous man.\"\n\n\"He pays reg'lar,\" was the rejoinder. \"But come, it's getting dreadful\nlate, you had better be turning flukes  it's a nice bed; Sal and me\nslept in that ere bed the night we were spliced. There's plenty of\nroom for two to kick about in that bed; it's an almighty big bed\nthat. Why, afore we give it up, Sal used to put our Sam and little\nJohnny in the foot of it. But I got a dreaming and sprawling about one\nnight, and somehow, Sam got pitched on the floor, and came near\nbreaking his arm. Arter that, Sal said it wouldn't do. Come along\nhere, I'll give ye a glim in a jiffy;\" and so saying he lighted a\ncandle and held it towards me, offering to lead the way. But I stood\nirresolute; when looking at a clock in the corner, he exclaimed \"I vum\nit's Sunday  you won't see that harpooneer to-night; he's come to\nanchor somewhere  come along then; do come; won't ye come?\"\n\nI considered the matter a moment, and then up stairs we went, and I\nwas ushered into a small room, cold as a clam, and furnished, sure\nenough, with a prodigious bed, almost big enough indeed for any four\nharpooneers to sleep abreast.\n\n\"There,\" said the landlord, placing the candle on a crazy old sea\nchest that did double duty as a wash-stand and centre table; \"there,\nmake yourself comfortable now, and good night to ye.\" I turned round\nfrom eyeing the bed, but he had disappeared.\n\nFolding back the counterpane, I stooped over the bed. Though none of\nthe most elegant, it yet stood the scrutiny tolerably well. I then\nglanced round the room; and besides the bedstead and centre table,\ncould see no other furniture belonging to the place, but a rude shelf,\nthe four walls, and a papered fireboard representing a man striking a\nwhale. Of things not properly belonging to the room, there was a\nhammock lashed up, and thrown upon the floor in one corner; also a\nlarge seaman's bag, containing the harpooneer's wardrobe, no doubt in\nlieu of a land trunk. Likewise, there was a parcel of outlandish bone\nfish hooks on the shelf over the fire-place, and a tall harpoon\nstanding at the head of the bed.\n\nBut what is this on the chest? I took it up, and held it close to the\nlight, and felt it, and smelt it, and tried every way possible to\narrive at some satisfactory conclusion concerning it. I can compare it\nto nothing but a large door mat, ornamented at the edges with little\ntinkling tags something like the stained porcupine quills round an\nIndian moccasin. There was a hole or slit in the middle of this mat,\nas you see the same in South American ponchos. But could it be\npossible that any sober harpooneer would get into a door mat, and\nparade the streets of any Christian town in that sort of guise? I put\nit on, to try it, and it weighed me down like a hamper, being\nuncommonly shaggy and thick, and I thought a little damp, as though\nthis mysterious harpooneer had been wearing it of a rainy day. I went\nup in it to a bit of glass stuck against the wall, and I never saw\nsuch a sight in my life. I tore myself out of it in such a hurry that\nI gave myself a kink in the neck.\n\nI sat down on the side of the bed, and commenced thinking about this\nhead-peddling harpooneer, and his door mat. After thinking some time\non the bed-side, I got up and took off my monkey jacket, and then\nstood in the middle of the room thinking. I then took off my coat, and\nthought a little more in my shirt sleeves. But beginning to feel very\ncold now, half undressed as I was, and remembering what the landlord\nsaid about the harpooneer's not coming home at all that night, it\nbeing so very late, I made no more ado, but jumped out of my\npantaloons and boots, and then blowing out the light tumbled into bed,\nand commended myself to the care of heaven.\n\nWhether that mattress was stuffed with corn-cobs or broken crockery,\nthere is no telling, but I rolled about a good deal, and could not\nsleep for a long time. At last I slid off into a light doze, and had\npretty nearly made a good offing towards the land of Nod, when I heard\na heavy footfall in the passage, and saw a glimmer of light come into\nthe room from under the door.\n\nLord save me, thinks I, that must be the harpooneer, the infernal\nhead-peddler. But I lay perfectly still, and resolved not to say a\nword till spoken to. Holding a light in one hand, and that identical\nNew Zealand head in the other, the stranger entered the room, and\nwithout looking towards the bed, placed his candle a good way off from\nme on the floor in one corner, and then began working away at the\nknotted cords of the large bag I before spoke of as being in the\nroom. I was all eagerness to see his face, but he kept it averted for\nsome time while employed in unlacing the bag's mouth. This\naccomplished, however, he turned round  when, good heavens! what a\nsight! Such a face! It was of a dark, purplish, yellow colour, here\nand there stuck over with large blackish looking squares. Yes, it's\njust as I thought, he's a terrible bedfellow; he's been in a fight,\ngot dreadfully cut, and here he is, just from the surgeon. But at that\nmoment he chanced to turn his face so towards the light, that I\nplainly saw they could not be sticking-plasters at all, those black\nsquares on his cheeks. They were stains of some sort or other. At\nfirst I knew not what to make of this; but soon an inkling of the\ntruth occurred to me. I remembered a story of a white man  a\nwhaleman too  who, falling among the cannibals, had been tattooed\nby them. I concluded that this harpooneer, in the course of his\ndistant voyages, must have met with a similar adventure. And what is\nit, thought I, after all! It's only his outside; a man can be honest\nin any sort of skin. But then, what to make of his unearthly\ncomplexion, that part of it, I mean, lying round about, and completely\nindependent of the squares of tattooing. To be sure, it might be\nnothing but a good coat of tropical tanning; but I never heard of a\nhot sun's tanning a white man into a purplish yellow one. However, I\nhad never been in the South Seas; and perhaps the sun there produced\nthese extraordinary effects upon the skin. Now, while all these ideas\nwere passing through me like lightning, this harpooneer never noticed\nme at all. But, after some difficulty having opened his bag, he\ncommenced fumbling in it, and presently pulled out a sort of tomahawk,\nand a seal-skin wallet with the hair on. Placing these on the old\nchest in the middle of the room, he then took the New Zealand head \na ghastly thing enough  and crammed it down into the bag. He now\ntook off his hat  a new beaver hat  when I came nigh singing out\nwith fresh surprise. There was no hair on his head  none to speak\nof at least  nothing but a small scalp-knot twisted up on his\nforehead. His bald purplish head now looked for all the world like a\nmildewed skull. Had not the stranger stood between me and the door, I\nwould have bolted out of it quicker than ever I bolted a dinner.\n\nEven as it was, I thought something of slipping out of the window, but\nit was the second floor back. I am no coward, but what to make of this\nhead-peddling purple rascal altogether passed my\ncomprehension. Ignorance is the parent of fear, and being completely\nnonplussed and confounded about the stranger, I confess I was now as\nmuch afraid of him as if it was the devil himself who had thus broken\ninto my room at the dead of night. In fact, I was so afraid of him\nthat I was not game enough just then to address him, and demand a\nsatisfactory answer concerning what seemed inexplicable in him.\n\nMeanwhile, he continued the business of undressing, and at last showed\nhis chest and arms. As I live, these covered parts of him were\ncheckered with the same squares as his face; his back, too, was all\nover the same dark squares; he seemed to have been in a Thirty Years'\nWar, and just escaped from it with a sticking-plaster shirt. Still\nmore, his very legs were marked, as if a parcel of dark green frogs\nwere running up the trunks of young palms. It was now quite plain that\nhe must be some abominable savage or other shipped aboard of a\nwhaleman in the South Seas, and so landed in this Christian country. I\nquaked to think of it. A peddler of heads too  perhaps the heads of\nhis own brothers. He might take a fancy to mine  heavens! look at\nthat tomahawk!\n\nBut there was no time for shuddering, for now the savage went about\nsomething that completely fascinated my attention, and convinced me\nthat he must indeed be a heathen. Going to his heavy grego, or\nwrapall, or dreadnaught, which he had previously hung on a chair, he\nfumbled in the pockets, and produced at length a curious little\ndeformed image with a hunch on its back, and exactly the colour of a\nthree days' old Congo baby. Remembering the embalmed head, at first I\nalmost thought that this black manikin was a real baby preserved in\nsome similar manner. But seeing that it was not at all limber, and\nthat it glistened a good deal like polished ebony, I concluded that it\nmust be nothing but a wooden idol, which indeed it proved to be. For\nnow the savage goes up to the empty fire-place, and removing the\npapered fire-board, sets up this little hunch-backed image, like a\ntenpin, between the andirons. The chimney jambs and all the bricks\ninside were very sooty, so that I thought this fire-place made a very\nappropriate little shrine or chapel for his Congo idol.\n\nI now screwed my eyes hard towards the half hidden image, feeling but\nill at ease meantime  to see what was next to follow. First he\ntakes about a double handful of shavings out of his grego pocket, and\nplaces them carefully before the idol; then laying a bit of ship\nbiscuit on top and applying the flame from the lamp, he kindled the\nshavings into a sacrificial blaze. Presently, after many hasty\nsnatches into the fire, and still hastier withdrawals of his fingers\n(whereby he seemed to be scorching them badly), he at last succeeded\nin drawing out the biscuit; then blowing off the heat and ashes a\nlittle, he made a polite offer of it to the little negro. But the\nlittle devil did not seem to fancy such dry sort of fare at all; he\nnever moved his lips. All these strange antics were accompanied by\nstill stranger guttural noises from the devotee, who seemed to be\npraying in a sing-song or else singing some pagan psalmody or other,\nduring which his face twitched about in the most unnatural manner. At\nlast extinguishing the fire, he took the idol up very unceremoniously,\nand bagged it again in his grego pocket as carelessly as if he were a\nsportsman bagging a dead woodcock.\n\nAll these queer proceedings increased my uncomfortableness, and seeing\nhim now exhibiting strong symptoms of concluding his business\noperations, and jumping into bed with me, I thought it was high time,\nnow or never, before the light was put out, to break the spell in\nwhich I had so long been bound.\n\nBut the interval I spent in deliberating what to say, was a fatal\none. Taking up his tomahawk from the table, he examined the head of it\nfor an instant, and then holding it to the light, with his mouth at\nthe handle, he puffed out great clouds of tobacco smoke. The next\nmoment the light was extinguished, and this wild cannibal, tomahawk\nbetween his teeth, sprang into bed with me. I sang out, I could not\nhelp it now; and giving a sudden grunt of astonishment he began\nfeeling me.\n\nStammering out something, I knew not what, I rolled away from him\nagainst the wall, and then conjured him, whoever or whatever he might\nbe, to keep quiet, and let me get up and light the lamp again. But his\nguttural responses satisfied me at once that he but ill comprehended\nmy meaning.\n\n\"Who-e debel you?\"  he at last said  \"you no speak-e, dam-me, I\nkill-e.\" And so saying the lighted tomahawk began flourishing about me\nin the dark.\n\n\"Landlord, for God's sake, Peter Coffin!\" shouted I. \"Landlord! Watch!\nCoffin! Angels! save me!\"\n\n\"Speak-e! tell-ee me who-ee be, or dam-me, I kill-e!\" again growled\nthe cannibal, while his horrid flourishings of the tomahawk scattered\nthe hot tobacco ashes about me till I thought my linen would get on\nfire. But thank heaven, at that moment the landlord came into the room\nlight in hand, and leaping from the bed I ran up to him.\n\n\"Don't be afraid now,\" said he, grinning again, \"Queequeg here\nwouldn't harm a hair of your head.\"\n\n\"Stop your grinning,\" shouted I, \"and why didn't you tell me that that\ninfernal harpooneer was a cannibal?\"\n\n\"I thought ye know'd it;  didn't I tell ye, he was a peddlin' heads\naround town?  but turn flukes again and go to sleep. Queequeg, look\nhere  you sabbee me, I sabbee  you this man sleepe you  you\nsabbee?\"\n\n\"Me sabbee plenty\"  grunted Queequeg, puffing away at his pipe and\nsitting up in bed.\n\n\"You gettee in,\" he added, motioning to me with his tomahawk, and\nthrowing the clothes to one side. He really did this in not only a\ncivil but a really kind and charitable way. I stood looking at him a\nmoment. For all his tattooings he was on the whole a clean, comely\nlooking cannibal. What's all this fuss I have been making about,\nthought I to myself  the man's a human being just as I am: he has\njust as much reason to fear me, as I have to be afraid of him. Better\nsleep with a sober cannibal than a drunken Christian.\n\n\"Landlord,\" said I, \"tell him to stash his tomahawk there, or pipe, or\nwhatever you call it; tell him to stop smoking, in short, and I will\nturn in with him. But I don't fancy having a man smoking in bed with\nme. It's dangerous. Besides, I ain't insured.\"\n\nThis being told to Queequeg, he at once complied, and again politely\nmotioned me to get into bed  rolling over to one side as much as to\nsay  I won't touch a leg of ye.\"\n\n\"Good night, landlord,\" said I, \"you may go.\"\n\nI turned in, and never slept better in my life.\n\nCHAPTER 4 The Counterpane.\n\nUpon waking next morning about daylight, I found Queequeg's arm thrown\nover me in the most loving and affectionate manner. You had almost\nthought I had been his wife. The counterpane was of patchwork, full of\nodd little parti-coloured squares and triangles; and this arm of his\ntattooed all over with an interminable Cretan labyrinth of a figure,\nno two parts of which were of one precise shade  owing I suppose to\nhis keeping his arm at sea unmethodically in sun and shade, his shirt\nsleeves irregularly rolled up at various times  this same arm of\nhis, I say, looked for all the world like a strip of that same\npatchwork quilt. Indeed, partly lying on it as the arm did when I\nfirst awoke, I could hardly tell it from the quilt, they so blended\ntheir hues together; and it was only by the sense of weight and\npressure that I could tell that Queequeg was hugging me.\n\nMy sensations were strange. Let me try to explain them. When I was a\nchild, I well remember a somewhat similar circumstance that befell me;\nwhether it was a reality or a dream, I never could entirely\nsettle. The circumstance was this. I had been cutting up some caper or\nother  I think it was trying to crawl up the chimney, as I had seen\na little sweep do a few days previous; and my stepmother who, somehow\nor other, was all the time whipping me, or sending me to bed\nsupperless,  my mother dragged me by the legs out of the chimney\nand packed me off to bed, though it was only two o'clock in the\nafternoon of the 21st June, the longest day in the year in our\nhemisphere. I felt dreadfully. But there was no help for it, so up\nstairs I went to my little room in the third floor, undressed myself\nas slowly as possible so as to kill time, and with a bitter sigh got\nbetween the sheets.\n\nI lay there dismally calculating that sixteen entire hours must elapse\nbefore I could hope for a resurrection. Sixteen hours in bed! the\nsmall of my back ached to think of it. And it was so light too; the\nsun shining in at the window, and a great rattling of coaches in the\nstreets, and the sound of gay voices all over the house. I felt worse\nand worse  at last I got up, dressed, and softly going down in my\nstockinged feet, sought out my stepmother, and suddenly threw myself\nat her feet, beseeching her as a particular favour to give me a good\nslippering for my misbehaviour; anything indeed but condemning me to\nlie abed such an unendurable length of time. But she was the best and\nmost conscientious of stepmothers, and back I had to go to my\nroom. For several hours I lay there broad awake, feeling a great deal\nworse than I have ever done since, even from the greatest subsequent\nmisfortunes. At last I must have fallen into a troubled nightmare of a\ndoze; and slowly waking from it  half steeped in dreams  I\nopened my eyes, and the before sun-lit room was now wrapped in outer\ndarkness. Instantly I felt a shock running through all my frame;\nnothing was to be seen, and nothing was to be heard; but a\nsupernatural hand seemed placed in mine. My arm hung over the\ncounterpane, and the nameless, unimaginable, silent form or phantom,\nto which the hand belonged, seemed closely seated by my bed-side. For\nwhat seemed ages piled on ages, I lay there, frozen with the most\nawful fears, not daring to drag away my hand; yet ever thinking that\nif I could but stir it one single inch, the horrid spell would be\nbroken. I knew not how this consciousness at last glided away from me;\nbut waking in the morning, I shudderingly remembered it all, and for\ndays and weeks and months afterwards I lost myself in confounding\nattempts to explain the mystery. Nay, to this very hour, I often\npuzzle myself with it.\n\nNow, take away the awful fear, and my sensations at feeling the\nsupernatural hand in mine were very similar, in their strangeness, to\nthose which I experienced on waking up and seeing Queequeg's pagan arm\nthrown round me. But at length all the past night's events soberly\nrecurred, one by one, in fixed reality, and then I lay only alive to\nthe comical predicament. For though I tried to move his arm  unlock\nhis bridegroom clasp  yet, sleeping as he was, he still hugged me\ntightly, as though naught but death should part us twain. I now strove\nto rouse him  \"Queequeg!\"  but his only answer was a snore. I\nthen rolled over, my neck feeling as if it were in a horse-collar; and\nsuddenly felt a slight scratch. Throwing aside the counterpane, there\nlay the tomahawk sleeping by the savage's side, as if it were a\nhatchet-faced baby. A pretty pickle, truly, thought I; abed here in a\nstrange house in the broad day, with a cannibal and a tomahawk!\n\"Queequeg!  in the name of goodness, Queequeg, wake!\" At length, by\ndint of much wriggling, and loud and incessant expostulations upon the\nunbecomingness of his hugging a fellow male in that matrimonial sort\nof style, I succeeded in extracting a grunt; and presently, he drew\nback his arm, shook himself all over like a Newfoundland dog just from\nthe water, and sat up in bed, stiff as a pike-staff, looking at me,\nand rubbing his eyes as if he did not altogether remember how I came\nto be there, though a dim consciousness of knowing something about me\nseemed slowly dawning over him. Meanwhile, I lay quietly eyeing him,\nhaving no serious misgivings now, and bent upon narrowly observing so\ncurious a creature. When, at last, his mind seemed made up touching\nthe character of his bedfellow, and he became, as it were, reconciled\nto the fact; he jumped out upon the floor, and by certain signs and\nsounds gave me to understand that, if it pleased me, he would dress\nfirst and then leave me to dress afterwards, leaving the whole\napartment to myself. Thinks I, Queequeg, under the circumstances, this\nis a very civilized overture; but, the truth is, these savages have an\ninnate sense of delicacy, say what you will; it is marvellous how\nessentially polite they are. I pay this particular compliment to\nQueequeg, because he treated me with so much civility and\nconsideration, while I was guilty of great rudeness; staring at him\nfrom the bed, and watching all his toilette motions; for the time my\ncuriosity getting the better of my breeding. Nevertheless, a man like\nQueequeg you don't see every day, he and his ways were well worth\nunusual regarding.\n\nHe commenced dressing at top by donning his beaver hat, a very tall\none, by the by, and then  still minus his trowsers  he hunted up\nhis boots. What under the heavens he did it for, I cannot tell, but\nhis next movement was to crush himself  boots in hand, and hat on\n under the bed; when, from sundry violent gaspings and strainings,\nI inferred he was hard at work booting himself; though by no law of\npropriety that I ever heard of, is any man required to be private when\nputting on his boots. But Queequeg, do you see, was a creature in the\ntransition stage  neither caterpillar nor butterfly. He was just\nenough civilized to show off his outlandishness in the strangest\npossible manners. His education was not yet completed. He was an\nundergraduate. If he had not been a small degree civilized, he very\nprobably would not have troubled himself with boots at all; but then,\nif he had not been still a savage, he never would have dreamt of\ngetting under the bed to put them on. At last, he emerged with his hat\nvery much dented and crushed down over his eyes, and began creaking\nand limping about the room, as if, not being much accustomed to boots,\nhis pair of damp, wrinkled cowhide ones  probably not made to order\neither  rather pinched and tormented him at the first go off of a\nbitter cold morning.\n\nSeeing, now, that there were no curtains to the window, and that the\nstreet being very narrow, the house opposite commanded a plain view\ninto the room, and observing more and more the indecorous figure that\nQueequeg made, staving about with little else but his hat and boots\non; I begged him as well as I could, to accelerate his toilet\nsomewhat, and particularly to get into his pantaloons as soon as\npossible. He complied, and then proceeded to wash himself. At that\ntime in the morning any Christian would have washed his face; but\nQueequeg, to my amazement, contented himself with restricting his\nablutions to his chest, arms, and hands. He then donned his waistcoat,\nand taking up a piece of hard soap on the wash-stand centre table,\ndipped it into water and commenced lathering his face. I was watching\nto see where he kept his razor, when lo and behold, he takes the\nharpoon from the bed corner, slips out the long wooden stock,\nunsheathes the head, whets it a little on his boot, and striding up to\nthe bit of mirror against the wall, begins a vigorous scraping, or\nrather harpooning of his cheeks. Thinks I, Queequeg, this is using\nRogers's best cutlery with a vengeance. Afterwards I wondered the less\nat this operation when I came to know of what fine steel the head of a\nharpoon is made, and how exceedingly sharp the long straight edges are\nalways kept.\n\nThe rest of his toilet was soon achieved, and he proudly marched out\nof the room, wrapped up in his great pilot monkey jacket, and sporting\nhis harpoon like a marshal's baton.\n\nCHAPTER 5 Breakfast.\n\nI quickly followed suit, and descending into the bar-room accosted the\ngrinning landlord very pleasantly. I cherished no malice towards him,\nthough he had been skylarking with me not a little in the matter of my\nbedfellow.\n\nHowever, a good laugh is a mighty good thing, and rather too scarce a\ngood thing; the more's the pity. So, if any one man, in his own proper\nperson, afford stuff for a good joke to anybody, let him not be\nbackward, but let him cheerfully allow himself to spend and be spent\nin that way. And the man that has anything bountifully laughable about\nhim, be sure there is more in that man than you perhaps think for.\n\nThe bar-room was now full of the boarders who had been dropping in the\nnight previous, and whom I had not as yet had a good look at. They\nwere nearly all whalemen; chief mates, and second mates, and third\nmates, and sea carpenters, and sea coopers, and sea blacksmiths, and\nharpooneers, and ship keepers; a brown and brawny company, with bosky\nbeards; an unshorn, shaggy set, all wearing monkey jackets for morning\ngowns.\n\nYou could pretty plainly tell how long each one had been ashore. This\nyoung fellow's healthy cheek is like a sun-toasted pear in hue, and\nwould seem to smell almost as musky; he cannot have been three days\nlanded from his Indian voyage. That man next him looks a few shades\nlighter; you might say a touch of satin wood is in him. In the\ncomplexion of a third still lingers a tropic tawn, but slightly\nbleached withal; he doubtless has tarried whole weeks ashore. But who\ncould show a cheek like Queequeg? which, barred with various tints,\nseemed like the Andes' western slope, to show forth in one array,\ncontrasting climates, zone by zone.\n\n\"Grub, ho!\" now cried the landlord, flinging open a door, and in we\nwent to breakfast.\n\nThey say that men who have seen the world, thereby become quite at\nease in manner, quite self-possessed in company. Not always, though:\nLedyard, the great New England traveller, and Mungo Park, the Scotch\none; of all men, they possessed the least assurance in the parlor. But\nperhaps the mere crossing of Siberia in a sledge drawn by dogs as\nLedyard did, or the taking a long solitary walk on an empty stomach,\nin the negro heart of Africa, which was the sum of poor Mungo's\nperformances  this kind of travel, I say, may not be the very best\nmode of attaining a high social polish. Still, for the most part, that\nsort of thing is to be had anywhere.\n\nThese reflections just here are occasioned by the circumstance that\nafter we were all seated at the table, and I was preparing to hear\nsome good stories about whaling; to my no small surprise, nearly every\nman maintained a profound silence. And not only that, but they looked\nembarrassed. Yes, here were a set of sea-dogs, many of whom without\nthe slightest bashfulness had boarded great whales on the high seas\n entire strangers to them  and duelled them dead without\nwinking; and yet, here they sat at a social breakfast table  all of\nthe same calling, all of kindred tastes  looking round as\nsheepishly at each other as though they had never been out of sight of\nsome sheepfold among the Green Mountains. A curious sight; these\nbashful bears, these timid warrior whalemen!\n\nBut as for Queequeg  why, Queequeg sat there among them  at the\nhead of the table, too, it so chanced; as cool as an icicle. To be\nsure I cannot say much for his breeding. His greatest admirer could\nnot have cordially justified his bringing his harpoon into breakfast\nwith him, and using it there without ceremony; reaching over the table\nwith it, to the imminent jeopardy of many heads, and grappling the\nbeefsteaks towards him. But that was certainly very coolly done by\nhim, and every one knows that in most people's estimation, to do\nanything coolly is to do it genteelly.\n\nWe will not speak of all Queequeg's peculiarities here; how he\neschewed coffee and hot rolls, and applied his undivided attention to\nbeefsteaks, done rare. Enough, that when breakfast was over he\nwithdrew like the rest into the public room, lighted his\ntomahawk-pipe, and was sitting there quietly digesting and smoking\nwith his inseparable hat on, when I sallied out for a stroll.\n\nCHAPTER 6 The Street.\n\nIf I had been astonished at first catching a glimpse of so outlandish\nan individual as Queequeg circulating among the polite society of a\ncivilized town, that astonishment soon departed upon taking my first\ndaylight stroll through the streets of New Bedford.\n\nIn thoroughfares nigh the docks, any considerable seaport will\nfrequently offer to view the queerest looking nondescripts from\nforeign parts. Even in Broadway and Chestnut streets, Mediterranean\nmariners will sometimes jostle the affrighted ladies. Regent Street is\nnot unknown to Lascars and Malays; and at Bombay, in the Apollo Green,\nlive Yankees have often scared the natives. But New Bedford beats all\nWater Street and Wapping. In these last-mentioned haunts you see only\nsailors; but in New Bedford, actual cannibals stand chatting at street\ncorners; savages outright; many of whom yet carry on their bones\nunholy flesh. It makes a stranger stare.\n\nBut, besides the Feegeeans, Tongatobooarrs, Erromanggoans,\nPannangians, and Brighggians, and, besides the wild specimens of the\nwhaling-craft which unheeded reel about the streets, you will see\nother sights still more curious, certainly more comical. There weekly\narrive in this town scores of green Vermonters and New Hampshire men,\nall athirst for gain and glory in the fishery. They are mostly young,\nof stalwart frames; fellows who have felled forests, and now seek to\ndrop the axe and snatch the whale-lance. Many are as green as the\nGreen Mountains whence they came. In some things you would think them\nbut a few hours old. Look there! that chap strutting round the\ncorner. He wears a beaver hat and swallow-tailed coat, girdled with a\nsailor-belt and sheath-knife. Here comes another with a sou'-wester\nand a bombazine cloak.\n\nNo town-bred dandy will compare with a country-bred one  I mean a\ndownright bumpkin dandy  a fellow that, in the dog-days, will mow\nhis two acres in buckskin gloves for fear of tanning his hands. Now\nwhen a country dandy like this takes it into his head to make a\ndistinguished reputation, and joins the great whale-fishery, you\nshould see the comical things he does upon reaching the seaport. In\nbespeaking his sea-outfit, he orders bell-buttons to his waistcoats;\nstraps to his canvas trowsers. Ah, poor Hay-Seed! how bitterly will\nburst those straps in the first howling gale, when thou art driven,\nstraps, buttons, and all, down the throat of the tempest.\n\nBut think not that this famous town has only harpooneers, cannibals,\nand bumpkins to show her visitors. Not at all. Still New Bedford is a\nqueer place. Had it not been for us whalemen, that tract of land would\nthis day perhaps have been in as howling condition as the coast of\nLabrador. As it is, parts of her back country are enough to frighten\none, they look so bony. The town itself is perhaps the dearest place\nto live in, in all New England. It is a land of oil, true enough: but\nnot like Canaan; a land, also, of corn and wine. The streets do not\nrun with milk; nor in the spring-time do they pave them with fresh\neggs. Yet, in spite of this, nowhere in all America will you find more\npatrician-like houses; parks and gardens more opulent, than in New\nBedford. Whence came they? how planted upon this once scraggy scoria\nof a country?\n\nGo and gaze upon the iron emblematical harpoons round yonder lofty\nmansion, and your question will be answered. Yes; all these brave\nhouses and flowery gardens came from the Atlantic, Pacific, and Indian\noceans. One and all, they were harpooned and dragged up hither from\nthe bottom of the sea. Can Herr Alexander perform a feat like that?\n\nIn New Bedford, fathers, they say, give whales for dowers to their\ndaughters, and portion off their nieces with a few porpoises\na-piece. You must go to New Bedford to see a brilliant wedding; for,\nthey say, they have reservoirs of oil in every house, and every night\nrecklessly burn their lengths in spermaceti candles.\n\nIn summer time, the town is sweet to see; full of fine maples  long\navenues of green and gold. And in August, high in air, the beautiful\nand bountiful horse-chestnuts, candelabra-wise, proffer the passer-by\ntheir tapering upright cones of congregated blossoms. So omnipotent is\nart; which in many a district of New Bedford has superinduced bright\nterraces of flowers upon the barren refuse rocks thrown aside at\ncreation's final day.\n\nAnd the women of New Bedford, they bloom like their own red roses. But\nroses only bloom in summer; whereas the fine carnation of their cheeks\nis perennial as sunlight in the seventh heavens. Elsewhere match that\nbloom of theirs, ye cannot, save in Salem, where they tell me the\nyoung girls breathe such musk, their sailor sweethearts smell them\nmiles off shore, as though they were drawing nigh the odorous Moluccas\ninstead of the Puritanic sands.\n\nCHAPTER 7 The Chapel.\n\nIn this same New Bedford there stands a Whaleman's Chapel, and few are\nthe moody fishermen, shortly bound for the Indian Ocean or Pacific,\nwho fail to make a Sunday visit to the spot. I am sure that I did not.\n\nReturning from my first morning stroll, I again sallied out upon this\nspecial errand. The sky had changed from clear, sunny cold, to driving\nsleet and mist. Wrapping myself in my shaggy jacket of the cloth\ncalled bearskin, I fought my way against the stubborn storm. Entering,\nI found a small scattered congregation of sailors, and sailors' wives\nand widows. A muffled silence reigned, only broken at times by the\nshrieks of the storm. Each silent worshipper seemed purposely sitting\napart from the other, as if each silent grief were insular and\nincommunicable. The chaplain had not yet arrived; and there these\nsilent islands of men and women sat steadfastly eyeing several marble\ntablets, with black borders, masoned into the wall on either side the\npulpit. Three of them ran something like the following, but I do not\npretend to quote: \n\nSACRED TO THE MEMORY OF JOHN TALBOT, Who, at the age of eighteen, was\nlost overboard, Near the Isle of Desolation, off Patagonia, November\n1st, 1836.  THIS TABLET Is erected to his Memory BY HIS SISTER.\n\nSACRED TO THE MEMORY\n\nOF ROBERT LONG, WILLIS ELLERY, NATHAN COLEMAN, WALTER CANNY, SETH\nMACY, AND SAMUEL GLEIG, Forming one of the boats' crews OF THE SHIP\nELIZA Who were towed out of sight by a Whale, On the Off-shore Ground\nin the PACIFIC, December 31st, 1839.  THIS MARBLE Is here placed by\ntheir surviving SHIPMATES.\n\nSACRED TO THE MEMORY OF The late CAPTAIN EZEKIEL HARDY, Who in the\nbows of his boat was killed by a Sperm Whale on the coast of Japan,\nAugust 3d, 1833.  THIS TABLET Is erected to his Memory BY HIS WIDOW.\n\nShaking off the sleet from my ice-glazed hat and jacket, I seated\nmyself near the door, and turning sideways was surprised to see\nQueequeg near me. Affected by the solemnity of the scene, there was a\nwondering gaze of incredulous curiosity in his countenance. This\nsavage was the only person present who seemed to notice my entrance;\nbecause he was the only one who could not read, and, therefore, was\nnot reading those frigid inscriptions on the wall. Whether any of the\nrelatives of the seamen whose names appeared there were now among the\ncongregation, I knew not; but so many are the unrecorded accidents in\nthe fishery, and so plainly did several women present wear the\ncountenance if not the trappings of some unceasing grief, that I feel\nsure that here before me were assembled those, in whose unhealing\nhearts the sight of those bleak tablets sympathetically caused the old\nwounds to bleed afresh.\n\nOh! ye whose dead lie buried beneath the green grass; who standing\namong flowers can say  here, here lies my beloved; ye know not the\ndesolation that broods in bosoms like these. What bitter blanks in\nthose black-bordered marbles which cover no ashes! What despair in\nthose immovable inscriptions! What deadly voids and unbidden\ninfidelities in the lines that seem to gnaw upon all Faith, and refuse\nresurrections to the beings who have placelessly perished without a\ngrave. As well might those tablets stand in the cave of Elephanta as\nhere.\n\nIn what census of living creatures, the dead of mankind are included;\nwhy it is that a universal proverb says of them, that they tell no\ntales, though containing more secrets than the Goodwin Sands; how it\nis that to his name who yesterday departed for the other world, we\nprefix so significant and infidel a word, and yet do not thus entitle\nhim, if he but embarks for the remotest Indies of this living earth;\nwhy the Life Insurance Companies pay death-forfeitures upon immortals;\nin what eternal, unstirring paralysis, and deadly, hopeless trance,\nyet lies antique Adam who died sixty round centuries ago; how it is\nthat we still refuse to be comforted for those who we nevertheless\nmaintain are dwelling in unspeakable bliss; why all the living so\nstrive to hush all the dead; wherefore but the rumor of a knocking in\na tomb will terrify a whole city. All these things are not without\ntheir meanings.\n\nBut Faith, like a jackal, feeds among the tombs, and even from these\ndead doubts she gathers her most vital hope.\n\nIt needs scarcely to be told, with what feelings, on the eve of a\nNantucket voyage, I regarded those marble tablets, and by the murky\nlight of that darkened, doleful day read the fate of the whalemen who\nhad gone before me. Yes, Ishmael, the same fate may be thine. But\nsomehow I grew merry again. Delightful inducements to embark, fine\nchance for promotion, it seems  aye, a stove boat will make me an\nimmortal by brevet. Yes, there is death in this business of whaling\n a speechlessly quick chaotic bundling of a man into Eternity. But\nwhat then? Methinks we have hugely mistaken this matter of Life and\nDeath. Methinks that what they call my shadow here on earth is my true\nsubstance. Methinks that in looking at things spiritual, we are too\nmuch like oysters observing the sun through the water, and thinking\nthat thick water the thinnest of air. Methinks my body is but the lees\nof my better being. In fact take my body who will, take it I say, it\nis not me. And therefore three cheers for Nantucket; and come a stove\nboat and stove body when they will, for stave my soul, Jove himself\ncannot.\n\nCHAPTER 8 The Pulpit.\n\nI had not been seated very long ere a man of a certain venerable\nrobustness entered; immediately as the storm-pelted door flew back\nupon admitting him, a quick regardful eyeing of him by all the\ncongregation, sufficiently attested that this fine old man was the\nchaplain. Yes, it was the famous Father Mapple, so called by the\nwhalemen, among whom he was a very great favourite. He had been a\nsailor and a harpooneer in his youth, but for many years past had\ndedicated his life to the ministry. At the time I now write of, Father\nMapple was in the hardy winter of a healthy old age; that sort of old\nage which seems merging into a second flowering youth, for among all\nthe fissures of his wrinkles, there shone certain mild gleams of a\nnewly developing bloom  the spring verdure peeping forth even\nbeneath February's snow. No one having previously heard his history,\ncould for the first time behold Father Mapple without the utmost\ninterest, because there were certain engrafted clerical peculiarities\nabout him, imputable to that adventurous maritime life he had\nled. When he entered I observed that he carried no umbrella, and\ncertainly had not come in his carriage, for his tarpaulin hat ran down\nwith melting sleet, and his great pilot cloth jacket seemed almost to\ndrag him to the floor with the weight of the water it had\nabsorbed. However, hat and coat and overshoes were one by one removed,\nand hung up in a little space in an adjacent corner; when, arrayed in\na decent suit, he quietly approached the pulpit.\n\nLike most old fashioned pulpits, it was a very lofty one, and since a\nregular stairs to such a height would, by its long angle with the\nfloor, seriously contract the already small area of the chapel, the\narchitect, it seemed, had acted upon the hint of Father Mapple, and\nfinished the pulpit without a stairs, substituting a perpendicular\nside ladder, like those used in mounting a ship from a boat at\nsea. The wife of a whaling captain had provided the chapel with a\nhandsome pair of red worsted man-ropes for this ladder, which, being\nitself nicely headed, and stained with a mahogany colour, the whole\ncontrivance, considering what manner of chapel it was, seemed by no\nmeans in bad taste. Halting for an instant at the foot of the ladder,\nand with both hands grasping the ornamental knobs of the man-ropes,\nFather Mapple cast a look upwards, and then with a truly sailor-like\nbut still reverential dexterity, hand over hand, mounted the steps as\nif ascending the main-top of his vessel.\n\nThe perpendicular parts of this side ladder, as is usually the case\nwith swinging ones, were of cloth-covered rope, only the rounds were\nof wood, so that at every step there was a joint. At my first glimpse\nof the pulpit, it had not escaped me that however convenient for a\nship, these joints in the present instance seemed unnecessary. For I\nwas not prepared to see Father Mapple after gaining the height, slowly\nturn round, and stooping over the pulpit, deliberately drag up the\nladder step by step, till the whole was deposited within, leaving him\nimpregnable in his little Quebec.\n\nI pondered some time without fully comprehending the reason for\nthis. Father Mapple enjoyed such a wide reputation for sincerity and\nsanctity, that I could not suspect him of courting notoriety by any\nmere tricks of the stage. No, thought I, there must be some sober\nreason for this thing; furthermore, it must symbolize something\nunseen. Can it be, then, that by that act of physical isolation, he\nsignifies his spiritual withdrawal for the time, from all outward\nworldly ties and connexions? Yes, for replenished with the meat and\nwine of the word, to the faithful man of God, this pulpit, I see, is a\nself-containing stronghold  a lofty Ehrenbreitstein, with a\nperennial well of water within the walls.\n\nBut the side ladder was not the only strange feature of the place,\nborrowed from the chaplain's former sea-farings. Between the marble\ncenotaphs on either hand of the pulpit, the wall which formed its back\nwas adorned with a large painting representing a gallant ship beating\nagainst a terrible storm off a lee coast of black rocks and snowy\nbreakers. But high above the flying scud and dark-rolling clouds,\nthere floated a little isle of sunlight, from which beamed forth an\nangel's face; and this bright face shed a distinct spot of radiance\nupon the ship's tossed deck, something like that silver plate now\ninserted into the Victory's plank where Nelson fell. \"Ah, noble ship,\"\nthe angel seemed to say, \"beat on, beat on, thou noble ship, and bear\na hardy helm; for lo! the sun is breaking through; the clouds are\nrolling off  serenest azure is at hand.\"\n\nNor was the pulpit itself without a trace of the same sea-taste that\nhad achieved the ladder and the picture. Its panelled front was in the\nlikeness of a ship's bluff bows, and the Holy Bible rested on a\nprojecting piece of scroll work, fashioned after a ship's\nfiddle-headed beak.\n\nWhat could be more full of meaning?  for the pulpit is ever this\nearth's foremost part; all the rest comes in its rear; the pulpit\nleads the world. From thence it is the storm of God's quick wrath is\nfirst descried, and the bow must bear the earliest brunt. From thence\nit is the God of breezes fair or foul is first invoked for favourable\nwinds. Yes, the world's a ship on its passage out, and not a voyage\ncomplete; and the pulpit is its prow.\n\nCHAPTER 9 The Sermon.\n\nFather Mapple rose, and in a mild voice of unassuming authority\nordered the scattered people to condense. \"Starboard gangway, there!\nside away to larboard  larboard gangway to starboard! Midships!\nmidships!\"\n\nThere was a low rumbling of heavy sea-boots among the benches, and a\nstill slighter shuffling of women's shoes, and all was quiet again,\nand every eye on the preacher.\n\nHe paused a little; then kneeling in the pulpit's bows, folded his\nlarge brown hands across his chest, uplifted his closed eyes, and\noffered a prayer so deeply devout that he seemed kneeling and praying\nat the bottom of the sea.\n\nThis ended, in prolonged solemn tones, like the continual tolling of a\nbell in a ship that is foundering at sea in a fog  in such tones he\ncommenced reading the following hymn; but changing his manner towards\nthe concluding stanzas, burst forth with a pealing exultation and joy\n\n\n\"The ribs and terrors in the whale, Arched over me a dismal gloom,\nWhile all God's sun-lit waves rolled by, And lift me deepening down to\ndoom.\n\n\"I saw the opening maw of hell, With endless pains and sorrows there;\nWhich none but they that feel can tell  Oh, I was plunging to\ndespair.\n\n\"In black distress, I called my God, When I could scarce believe him\nmine, He bowed his ear to my complaints  No more the whale did me\nconfine.\n\n\"With speed he flew to my relief, As on a radiant dolphin borne;\nAwful, yet bright, as lightning shone The face of my Deliverer God.\n\n\"My song for ever shall record That terrible, that joyful hour; I give\nthe glory to my God, His all the mercy and the power.\n\nNearly all joined in singing this hymn, which swelled high above the\nhowling of the storm. A brief pause ensued; the preacher slowly turned\nover the leaves of the Bible, and at last, folding his hand down upon\nthe proper page, said: \"Beloved shipmates, clinch the last verse of\nthe first chapter of Jonah  'And God had prepared a great fish to\nswallow up Jonah.'\"\n\n\"Shipmates, this book, containing only four chapters  four yarns\n is one of the smallest strands in the mighty cable of the\nScriptures. Yet what depths of the soul does Jonah's deep sealine\nsound! what a pregnant lesson to us is this prophet! What a noble\nthing is that canticle in the fish's belly! How billow-like and\nboisterously grand! We feel the floods surging over us; we sound with\nhim to the kelpy bottom of the waters; sea-weed and all the slime of\nthe sea is about us! But what is this lesson that the book of Jonah\nteaches? Shipmates, it is a two-stranded lesson; a lesson to us all as\nsinful men, and a lesson to me as a pilot of the living God. As sinful\nmen, it is a lesson to us all, because it is a story of the sin,\nhard-heartedness, suddenly awakened fears, the swift punishment,\nrepentance, prayers, and finally the deliverance and joy of Jonah. As\nwith all sinners among men, the sin of this son of Amittai was in his\nwilful disobedience of the command of God  never mind now what that\ncommand was, or how conveyed  which he found a hard command. But\nall the things that God would have us do are hard for us to do \nremember that  and hence, he oftener commands us than endeavors to\npersuade. And if we obey God, we must disobey ourselves; and it is in\nthis disobeying ourselves, wherein the hardness of obeying God\nconsists.\n\n\"With this sin of disobedience in him, Jonah still further flouts at\nGod, by seeking to flee from Him. He thinks that a ship made by men\nwill carry him into countries where God does not reign, but only the\nCaptains of this earth. He skulks about the wharves of Joppa, and\nseeks a ship that's bound for Tarshish. There lurks, perhaps, a\nhitherto unheeded meaning here. By all accounts Tarshish could have\nbeen no other city than the modern Cadiz. That's the opinion of\nlearned men. And where is Cadiz, shipmates? Cadiz is in Spain; as far\nby water, from Joppa, as Jonah could possibly have sailed in those\nancient days, when the Atlantic was an almost unknown sea. Because\nJoppa, the modern Jaffa, shipmates, is on the most easterly coast of\nthe Mediterranean, the Syrian; and Tarshish or Cadiz more than two\nthousand miles to the westward from that, just outside the Straits of\nGibraltar. See ye not then, shipmates, that Jonah sought to flee\nworld-wide from God? Miserable man! Oh! most contemptible and worthy\nof all scorn; with slouched hat and guilty eye, skulking from his God;\nprowling among the shipping like a vile burglar hastening to cross the\nseas. So disordered, self-condemning is his look, that had there been\npolicemen in those days, Jonah, on the mere suspicion of something\nwrong, had been arrested ere he touched a deck. How plainly he's a\nfugitive! no baggage, not a hat-box, valise, or carpet-bag,  no\nfriends accompany him to the wharf with their adieux. At last, after\nmuch dodging search, he finds the Tarshish ship receiving the last\nitems of her cargo; and as he steps on board to see its Captain in the\ncabin, all the sailors for the moment desist from hoisting in the\ngoods, to mark the stranger's evil eye. Jonah sees this; but in vain\nhe tries to look all ease and confidence; in vain essays his wretched\nsmile. Strong intuitions of the man assure the mariners he can be no\ninnocent. In their gamesome but still serious way, one whispers to the\nother  \"Jack, he's robbed a widow;\" or, \"Joe, do you mark him; he's\na bigamist;\" or, \"Harry lad, I guess he's the adulterer that broke\njail in old Gomorrah, or belike, one of the missing murderers from\nSodom.\" Another runs to read the bill that's stuck against the spile\nupon the wharf to which the ship is moored, offering five hundred gold\ncoins for the apprehension of a parricide, and containing a\ndescription of his person. He reads, and looks from Jonah to the bill;\nwhile all his sympathetic shipmates now crowd round Jonah, prepared to\nlay their hands upon him. Frighted Jonah trembles, and summoning all\nhis boldness to his face, only looks so much the more a coward. He\nwill not confess himself suspected; but that itself is strong\nsuspicion. So he makes the best of it; and when the sailors find him\nnot to be the man that is advertised, they let him pass, and he\ndescends into the cabin.\n\n\"'Who's there?' cries the Captain at his busy desk, hurriedly making\nout his papers for the Customs  'Who's there?' Oh! how that\nharmless question mangles Jonah! For the instant he almost turns to\nflee again. But he rallies. 'I seek a passage in this ship to\nTarshish; how soon sail ye, sir?' Thus far the busy Captain had not\nlooked up to Jonah, though the man now stands before him; but no\nsooner does he hear that hollow voice, than he darts a scrutinizing\nglance. 'We sail with the next coming tide,' at last he slowly\nanswered, still intently eyeing him. 'No sooner, sir?'  'Soon\nenough for any honest man that goes a passenger.' Ha! Jonah, that's\nanother stab. But he swiftly calls away the Captain from that\nscent. 'I'll sail with ye,'  he says,  'the passage money how\nmuch is that?  I'll pay now.' For it is particularly written,\nshipmates, as if it were a thing not to be overlooked in this history,\n'that he paid the fare thereof' ere the craft did sail. And taken with\nthe context, this is full of meaning.\n\n\"Now Jonah's Captain, shipmates, was one whose discernment detects\ncrime in any, but whose cupidity exposes it only in the penniless. In\nthis world, shipmates, sin that pays its way can travel freely, and\nwithout a passport; whereas Virtue, if a pauper, is stopped at all\nfrontiers. So Jonah's Captain prepares to test the length of Jonah's\npurse, ere he judge him openly. He charges him thrice the usual sum;\nand it's assented to. Then the Captain knows that Jonah is a fugitive;\nbut at the same time resolves to help a flight that paves its rear\nwith gold. Yet when Jonah fairly takes out his purse, prudent\nsuspicions still molest the Captain. He rings every coin to find a\ncounterfeit. Not a forger, any way, he mutters; and Jonah is put down\nfor his passage. 'Point out my state-room, Sir,' says Jonah now, 'I'm\ntravel-weary; I need sleep.' 'Thou lookest like it,' says the Captain,\n'there's thy room.' Jonah enters, and would lock the door, but the\nlock contains no key. Hearing him foolishly fumbling there, the\nCaptain laughs lowly to himself, and mutters something about the doors\nof convicts' cells being never allowed to be locked within. All\ndressed and dusty as he is, Jonah throws himself into his berth, and\nfinds the little state-room ceiling almost resting on his\nforehead. The air is close, and Jonah gasps. Then, in that contracted\nhole, sunk, too, beneath the ship's water-line, Jonah feels the\nheralding presentiment of that stifling hour, when the whale shall\nhold him in the smallest of his bowels' wards.\n\n\"Screwed at its axis against the side, a swinging lamp slightly\noscillates in Jonah's room; and the ship, heeling over towards the\nwharf with the weight of the last bales received, the lamp, flame and\nall, though in slight motion, still maintains a permanent obliquity\nwith reference to the room; though, in truth, infallibly straight\nitself, it but made obvious the false, lying levels among which it\nhung. The lamp alarms and frightens Jonah; as lying in his berth his\ntormented eyes roll round the place, and this thus far successful\nfugitive finds no refuge for his restless glance. But that\ncontradiction in the lamp more and more appals him. The floor, the\nceiling, and the side, are all awry. 'Oh! so my conscience hangs in\nme!' he groans, 'straight upwards, so it burns; but the chambers of my\nsoul are all in crookedness!'\n\n\"Like one who after a night of drunken revelry hies to his bed, still\nreeling, but with conscience yet pricking him, as the plungings of the\nRoman race-horse but so much the more strike his steel tags into him;\nas one who in that miserable plight still turns and turns in giddy\nanguish, praying God for annihilation until the fit be passed; and at\nlast amid the whirl of woe he feels, a deep stupor steals over him, as\nover the man who bleeds to death, for conscience is the wound, and\nthere's naught to staunch it; so, after sore wrestlings in his berth,\nJonah's prodigy of ponderous misery drags him drowning down to sleep.\n\n\"And now the time of tide has come; the ship casts off her cables; and\nfrom the deserted wharf the uncheered ship for Tarshish, all\ncareening, glides to sea. That ship, my friends, was the first of\nrecorded smugglers! the contraband was Jonah. But the sea rebels; he\nwill not bear the wicked burden. A dreadful storm comes on, the ship\nis like to break. But now when the boatswain calls all hands to\nlighten her; when boxes, bales, and jars are clattering overboard;\nwhen the wind is shrieking, and the men are yelling, and every plank\nthunders with trampling feet right over Jonah's head; in all this\nraging tumult, Jonah sleeps his hideous sleep. He sees no black sky\nand raging sea, feels not the reeling timbers, and little hears he or\nheeds he the far rush of the mighty whale, which even now with open\nmouth is cleaving the seas after him. Aye, shipmates, Jonah was gone\ndown into the sides of the ship  a berth in the cabin as I have\ntaken it, and was fast asleep. But the frightened master comes to him,\nand shrieks in his dead ear, 'What meanest thou, O, sleeper! arise!'\nStartled from his lethargy by that direful cry, Jonah staggers to his\nfeet, and stumbling to the deck, grasps a shroud, to look out upon the\nsea. But at that moment he is sprung upon by a panther billow leaping\nover the bulwarks. Wave after wave thus leaps into the ship, and\nfinding no speedy vent runs roaring fore and aft, till the mariners\ncome nigh to drowning while yet afloat. And ever, as the white moon\nshows her affrighted face from the steep gullies in the blackness\noverhead, aghast Jonah sees the rearing bowsprit pointing high upward,\nbut soon beat downward again towards the tormented deep.\n\n\"Terrors upon terrors run shouting through his soul. In all his\ncringing attitudes, the God-fugitive is now too plainly known. The\nsailors mark him; more and more certain grow their suspicions of him,\nand at last, fully to test the truth, by referring the whole matter to\nhigh Heaven, they fall to casting lots, to see for whose cause this\ngreat tempest was upon them. The lot is Jonah's; that discovered, then\nhow furiously they mob him with their questions. 'What is thine\noccupation? Whence comest thou? Thy country? What people? But mark\nnow, my shipmates, the behavior of poor Jonah. The eager mariners but\nask him who he is, and where from; whereas, they not only receive an\nanswer to those questions, but likewise another answer to a question\nnot put by them, but the unsolicited answer is forced from Jonah by\nthe hard hand of God that is upon him.\n\n\"'I am a Hebrew,' he cries  and then  'I fear the Lord the God\nof Heaven who hath made the sea and the dry land!' Fear him, O Jonah?\nAye, well mightest thou fear the Lord God then! Straightway, he now\ngoes on to make a full confession; whereupon the mariners became more\nand more appalled, but still are pitiful. For when Jonah, not yet\nsupplicating God for mercy, since he but too well knew the darkness of\nhis deserts,  when wretched Jonah cries out to them to take him and\ncast him forth into the sea, for he knew that for his sake this great\ntempest was upon them; they mercifully turn from him, and seek by\nother means to save the ship. But all in vain; the indignant gale\nhowls louder; then, with one hand raised invokingly to God, with the\nother they not unreluctantly lay hold of Jonah.\n\n\"And now behold Jonah taken up as an anchor and dropped into the sea;\nwhen instantly an oily calmness floats out from the east, and the sea\nis still, as Jonah carries down the gale with him, leaving smooth\nwater behind. He goes down in the whirling heart of such a masterless\ncommotion that he scarce heeds the moment when he drops seething into\nthe yawning jaws awaiting him; and the whale shoots-to all his ivory\nteeth, like so many white bolts, upon his prison. Then Jonah prayed\nunto the Lord out of the fish's belly. But observe his prayer, and\nlearn a weighty lesson. For sinful as he is, Jonah does not weep and\nwail for direct deliverance. He feels that his dreadful punishment is\njust. He leaves all his deliverance to God, contenting himself with\nthis, that spite of all his pains and pangs, he will still look\ntowards His holy temple. And here, shipmates, is true and faithful\nrepentance; not clamorous for pardon, but grateful for punishment. And\nhow pleasing to God was this conduct in Jonah, is shown in the\neventual deliverance of him from the sea and the whale. Shipmates, I\ndo not place Jonah before you to be copied for his sin but I do place\nhim before you as a model for repentance. Sin not; but if you do, take\nheed to repent of it like Jonah.\"\n\nWhile he was speaking these words, the howling of the shrieking,\nslanting storm without seemed to add new power to the preacher, who,\nwhen describing Jonah's sea-storm, seemed tossed by a storm\nhimself. His deep chest heaved as with a ground-swell; his tossed arms\nseemed the warring elements at work; and the thunders that rolled away\nfrom off his swarthy brow, and the light leaping from his eye, made\nall his simple hearers look on him with a quick fear that was strange\nto them.\n\nThere now came a lull in his look, as he silently turned over the\nleaves of the Book once more; and, at last, standing motionless, with\nclosed eyes, for the moment, seemed communing with God and himself.\n\nBut again he leaned over towards the people, and bowing his head\nlowly, with an aspect of the deepest yet manliest humility, he spake\nthese words:\n\n\"Shipmates, God has laid but one hand upon you; both his hands press\nupon me. I have read ye by what murky light may be mine the lesson\nthat Jonah teaches to all sinners; and therefore to ye, and still more\nto me, for I am a greater sinner than ye. And now how gladly would I\ncome down from this mast-head and sit on the hatches there where you\nsit, and listen as you listen, while some one of you reads me that\nother and more awful lesson which Jonah teaches to me, as a pilot of\nthe living God. How being an anointed pilot-prophet, or speaker of\ntrue things, and bidden by the Lord to sound those unwelcome truths in\nthe ears of a wicked Nineveh, Jonah, appalled at the hostility he\nshould raise, fled from his mission, and sought to escape his duty and\nhis God by taking ship at Joppa. But God is everywhere; Tarshish he\nnever reached. As we have seen, God came upon him in the whale, and\nswallowed him down to living gulfs of doom, and with swift slantings\ntore him along 'into the midst of the seas,' where the eddying depths\nsucked him ten thousand fathoms down, and 'the weeds were wrapped\nabout his head,' and all the watery world of woe bowled over him. Yet\neven then beyond the reach of any plummet  'out of the belly of\nhell'  when the whale grounded upon the ocean's utmost bones, even\nthen, God heard the engulphed, repenting prophet when he cried. Then\nGod spake unto the fish; and from the shuddering cold and blackness of\nthe sea, the whale came breeching up towards the warm and pleasant\nsun, and all the delights of air and earth; and 'vomited out Jonah\nupon the dry land;' when the word of the Lord came a second time; and\nJonah, bruised and beaten  his ears, like two sea-shells, still\nmultitudinously murmuring of the ocean  Jonah did the Almighty's\nbidding. And what was that, shipmates? To preach the Truth to the face\nof Falsehood! That was it!\n\n\"This, shipmates, this is that other lesson; and woe to that pilot of\nthe living God who slights it. Woe to him whom this world charms from\nGospel duty! Woe to him who seeks to pour oil upon the waters when God\nhas brewed them into a gale! Woe to him who seeks to please rather\nthan to appal! Woe to him whose good name is more to him than\ngoodness! Woe to him who, in this world, courts not dishonour! Woe to\nhim who would not be true, even though to be false were salvation!\nYea, woe to him who, as the great Pilot Paul has it, while preaching\nto others is himself a castaway!\"\n\nHe dropped and fell away from himself for a moment; then lifting his\nface to them again, showed a deep joy in his eyes, as he cried out\nwith a heavenly enthusiasm,  \"But oh! shipmates! on the starboard\nhand of every woe, there is a sure delight; and higher the top of that\ndelight, than the bottom of the woe is deep. Is not the main-truck\nhigher than the kelson is low? Delight is to him  a far, far\nupward, and inward delight  who against the proud gods and\ncommodores of this earth, ever stands forth his own inexorable\nself. Delight is to him whose strong arms yet support him, when the\nship of this base treacherous world has gone down beneath him. Delight\nis to him, who gives no quarter in the truth, and kills, burns, and\ndestroys all sin though he pluck it out from under the robes of\nSenators and Judges. Delight,  top-gallant delight is to him, who\nacknowledges no law or lord, but the Lord his God, and is only a\npatriot to heaven. Delight is to him, whom all the waves of the\nbillows of the seas of the boisterous mob can never shake from this\nsure Keel of the Ages. And eternal delight and deliciousness will be\nhis, who coming to lay him down, can say with his final breath  O\nFather!  chiefly known to me by Thy rod  mortal or immortal,\nhere I die. I have striven to be Thine, more than to be this world's,\nor mine own. Yet this is nothing: I leave eternity to Thee; for what\nis man that he should live out the lifetime of his God?\"\n\nHe said no more, but slowly waving a benediction, covered his face\nwith his hands, and so remained kneeling, till all the people had\ndeparted, and he was left alone in the place.\n\nCHAPTER 10 A Bosom Friend.\n\nReturning to the Spouter-Inn from the Chapel, I found Queequeg there\nquite alone; he having left the Chapel before the benediction some\ntime. He was sitting on a bench before the fire, with his feet on the\nstove hearth, and in one hand was holding close up to his face that\nlittle negro idol of his; peering hard into its face, and with a\njack-knife gently whittling away at its nose, meanwhile humming to\nhimself in his heathenish way.\n\nBut being now interrupted, he put up the image; and pretty soon, going\nto the table, took up a large book there, and placing it on his lap\nbegan counting the pages with deliberate regularity; at every fiftieth\npage  as I fancied  stopping a moment, looking vacantly around\nhim, and giving utterance to a long-drawn gurgling whistle of\nastonishment. He would then begin again at the next fifty; seeming to\ncommence at number one each time, as though he could not count more\nthan fifty, and it was only by such a large number of fifties being\nfound together, that his astonishment at the multitude of pages was\nexcited.\n\nWith much interest I sat watching him. Savage though he was, and\nhideously marred about the face  at least to my taste  his\ncountenance yet had a something in it which was by no means\ndisagreeable. You cannot hide the soul. Through all his unearthly\ntattooings, I thought I saw the traces of a simple honest heart; and\nin his large, deep eyes, fiery black and bold, there seemed tokens of\na spirit that would dare a thousand devils. And besides all this,\nthere was a certain lofty bearing about the Pagan, which even his\nuncouthness could not altogether maim. He looked like a man who had\nnever cringed and never had had a creditor. Whether it was, too, that\nhis head being shaved, his forehead was drawn out in freer and\nbrighter relief, and looked more expansive than it otherwise would,\nthis I will not venture to decide; but certain it was his head was\nphrenologically an excellent one. It may seem ridiculous, but it\nreminded me of General Washington's head, as seen in the popular busts\nof him. It had the same long regularly graded retreating slope from\nabove the brows, which were likewise very projecting, like two long\npromontories thickly wooded on top. Queequeg was George Washington\ncannibalistically developed.\n\nWhilst I was thus closely scanning him, half-pretending meanwhile to\nbe looking out at the storm from the casement, he never heeded my\npresence, never troubled himself with so much as a single glance; but\nappeared wholly occupied with counting the pages of the marvellous\nbook. Considering how sociably we had been sleeping together the night\nprevious, and especially considering the affectionate arm I had found\nthrown over me upon waking in the morning, I thought this indifference\nof his very strange. But savages are strange beings; at times you do\nnot know exactly how to take them. At first they are overawing; their\ncalm self-collectedness of simplicity seems a Socratic wisdom. I had\nnoticed also that Queequeg never consorted at all, or but very little,\nwith the other seamen in the inn. He made no advances whatever;\nappeared to have no desire to enlarge the circle of his\nacquaintances. All this struck me as mighty singular; yet, upon second\nthoughts, there was something almost sublime in it. Here was a man\nsome twenty thousand miles from home, by the way of Cape Horn, that is\n which was the only way he could get there  thrown among people\nas strange to him as though he were in the planet Jupiter; and yet he\nseemed entirely at his ease; preserving the utmost serenity; content\nwith his own companionship; always equal to himself. Surely this was a\ntouch of fine philosophy; though no doubt he had never heard there was\nsuch a thing as that. But, perhaps, to be true philosophers, we\nmortals should not be conscious of so living or so striving. So soon\nas I hear that such or such a man gives himself out for a philosopher,\nI conclude that, like the dyspeptic old woman, he must have \"broken\nhis digester.\"\n\nAs I sat there in that now lonely room; the fire burning low, in that\nmild stage when, after its first intensity has warmed the air, it then\nonly glows to be looked at; the evening shades and phantoms gathering\nround the casements, and peering in upon us silent, solitary twain;\nthe storm booming without in solemn swells; I began to be sensible of\nstrange feelings. I felt a melting in me. No more my splintered heart\nand maddened hand were turned against the wolfish world. This soothing\nsavage had redeemed it. There he sat, his very indifference speaking a\nnature in which there lurked no civilized hypocrisies and bland\ndeceits. Wild he was; a very sight of sights to see; yet I began to\nfeel myself mysteriously drawn towards him. And those same things that\nwould have repelled most others, they were the very magnets that thus\ndrew me. I'll try a pagan friend, thought I, since Christian kindness\nhas proved but hollow courtesy. I drew my bench near him, and made\nsome friendly signs and hints, doing my best to talk with him\nmeanwhile. At first he little noticed these advances; but presently,\nupon my referring to his last night's hospitalities, he made out to\nask me whether we were again to be bedfellows. I told him yes; whereat\nI thought he looked pleased, perhaps a little complimented.\n\nWe then turned over the book together, and I endeavored to explain to\nhim the purpose of the printing, and the meaning of the few pictures\nthat were in it. Thus I soon engaged his interest; and from that we\nwent to jabbering the best we could about the various outer sights to\nbe seen in this famous town. Soon I proposed a social smoke; and,\nproducing his pouch and tomahawk, he quietly offered me a puff. And\nthen we sat exchanging puffs from that wild pipe of his, and keeping\nit regularly passing between us.\n\nIf there yet lurked any ice of indifference towards me in the Pagan's\nbreast, this pleasant, genial smoke we had, soon thawed it out, and\nleft us cronies. He seemed to take to me quite as naturally and\nunbiddenly as I to him; and when our smoke was over, he pressed his\nforehead against mine, clasped me round the waist, and said that\nhenceforth we were married; meaning, in his country's phrase, that we\nwere bosom friends; he would gladly die for me, if need should be. In\na countryman, this sudden flame of friendship would have seemed far\ntoo premature, a thing to be much distrusted; but in this simple\nsavage those old rules would not apply.\n\nAfter supper, and another social chat and smoke, we went to our room\ntogether. He made me a present of his embalmed head; took out his\nenormous tobacco wallet, and groping under the tobacco, drew out some\nthirty dollars in silver; then spreading them on the table, and\nmechanically dividing them into two equal portions, pushed one of them\ntowards me, and said it was mine. I was going to remonstrate; but he\nsilenced me by pouring them into my trowsers' pockets. I let them\nstay. He then went about his evening prayers, took out his idol, and\nremoved the paper fireboard. By certain signs and symptoms, I thought\nhe seemed anxious for me to join him; but well knowing what was to\nfollow, I deliberated a moment whether, in case he invited me, I would\ncomply or otherwise.\n\nI was a good Christian; born and bred in the bosom of the infallible\nPresbyterian Church. How then could I unite with this wild idolator in\nworshipping his piece of wood? But what is worship? thought I. Do you\nsuppose now, Ishmael, that the magnanimous God of heaven and earth \npagans and all included  can possibly be jealous of an\ninsignificant bit of black wood? Impossible! But what is worship? \nto do the will of God  that is worship. And what is the will of\nGod?  to do to my fellow man what I would have my fellow man to do\nto me  that is the will of God. Now, Queequeg is my fellow man. And\nwhat do I wish that this Queequeg would do to me? Why, unite with me\nin my particular Presbyterian form of worship. Consequently, I must\nthen unite with him in his; ergo, I must turn idolator. So I kindled\nthe shavings; helped prop up the innocent little idol; offered him\nburnt biscuit with Queequeg; salamed before him twice or thrice;\nkissed his nose; and that done, we undressed and went to bed, at peace\nwith our own consciences and all the world. But we did not go to sleep\nwithout some little chat.\n\nHow it is I know not; but there is no place like a bed for\nconfidential disclosures between friends. Man and wife, they say,\nthere open the very bottom of their souls to each other; and some old\ncouples often lie and chat over old times till nearly morning. Thus,\nthen, in our hearts' honeymoon, lay I and Queequeg  a cosy, loving\npair.\n\nCHAPTER 11 Nightgown.\n\nWe had lain thus in bed, chatting and napping at short intervals, and\nQueequeg now and then affectionately throwing his brown tattooed legs\nover mine, and then drawing them back; so entirely sociable and free\nand easy were we; when, at last, by reason of our confabulations, what\nlittle nappishness remained in us altogether departed, and we felt\nlike getting up again, though day-break was yet some way down the\nfuture.\n\nYes, we became very wakeful; so much so that our recumbent position\nbegan to grow wearisome, and by little and little we found ourselves\nsitting up; the clothes well tucked around us, leaning against the\nhead-board with our four knees drawn up close together, and our two\nnoses bending over them, as if our kneepans were warming-pans. We felt\nvery nice and snug, the more so since it was so chilly out of doors;\nindeed out of bed-clothes too, seeing that there was no fire in the\nroom. The more so, I say, because truly to enjoy bodily warmth, some\nsmall part of you must be cold, for there is no quality in this world\nthat is not what it is merely by contrast. Nothing exists in\nitself. If you flatter yourself that you are all over comfortable, and\nhave been so a long time, then you cannot be said to be comfortable\nany more. But if, like Queequeg and me in the bed, the tip of your\nnose or the crown of your head be slightly chilled, why then, indeed,\nin the general consciousness you feel most delightfully and\nunmistakably warm. For this reason a sleeping apartment should never\nbe furnished with a fire, which is one of the luxurious discomforts of\nthe rich. For the height of this sort of deliciousness is to have\nnothing but the blanket between you and your snugness and the cold of\nthe outer air. Then there you lie like the one warm spark in the heart\nof an arctic crystal.\n\nWe had been sitting in this crouching manner for some time, when all\nat once I thought I would open my eyes; for when between sheets,\nwhether by day or by night, and whether asleep or awake, I have a way\nof always keeping my eyes shut, in order the more to concentrate the\nsnugness of being in bed. Because no man can ever feel his own\nidentity aright except his eyes be closed; as if darkness were indeed\nthe proper element of our essences, though light be more congenial to\nour clayey part. Upon opening my eyes then, and coming out of my own\npleasant and self-created darkness into the imposed and coarse outer\ngloom of the unilluminated twelve-o'clock-at-night, I experienced a\ndisagreeable revulsion. Nor did I at all object to the hint from\nQueequeg that perhaps it were best to strike a light, seeing that we\nwere so wide awake; and besides he felt a strong desire to have a few\nquiet puffs from his Tomahawk. Be it said, that though I had felt such\na strong repugnance to his smoking in the bed the night before, yet\nsee how elastic our stiff prejudices grow when love once comes to bend\nthem. For now I liked nothing better than to have Queequeg smoking by\nme, even in bed, because he seemed to be full of such serene household\njoy then. I no more felt unduly concerned for the landlord's policy of\ninsurance. I was only alive to the condensed confidential\ncomfortableness of sharing a pipe and a blanket with a real\nfriend. With our shaggy jackets drawn about our shoulders, we now\npassed the Tomahawk from one to the other, till slowly there grew over\nus a blue hanging tester of smoke, illuminated by the flame of the\nnew-lit lamp.\n\nWhether it was that this undulating tester rolled the savage away to\nfar distant scenes, I know not, but he now spoke of his native island;\nand, eager to hear his history, I begged him to go on and tell it. He\ngladly complied. Though at the time I but ill comprehended not a few\nof his words, yet subsequent disclosures, when I had become more\nfamiliar with his broken phraseology, now enable me to present the\nwhole story such as it may prove in the mere skeleton I give.\n\nCHAPTER 12 Biographical.\n\nQueequeg was a native of Rokovoko, an island far away to the West and\nSouth. It is not down in any map; true places never are.\n\nWhen a new-hatched savage running wild about his native woodlands in a\ngrass clout, followed by the nibbling goats, as if he were a green\nsapling; even then, in Queequeg's ambitious soul, lurked a strong\ndesire to see something more of Christendom than a specimen whaler or\ntwo. His father was a High Chief, a King; his uncle a High Priest; and\non the maternal side he boasted aunts who were the wives of\nunconquerable warriors. There was excellent blood in his veins \nroyal stuff; though sadly vitiated, I fear, by the cannibal propensity\nhe nourished in his untutored youth.\n\nA Sag Harbor ship visited his father's bay, and Queequeg sought a\npassage to Christian lands. But the ship, having her full complement\nof seamen, spurned his suit; and not all the King his father's\ninfluence could prevail. But Queequeg vowed a vow. Alone in his canoe,\nhe paddled off to a distant strait, which he knew the ship must pass\nthrough when she quitted the island. On one side was a coral reef; on\nthe other a low tongue of land, covered with mangrove thickets that\ngrew out into the water. Hiding his canoe, still afloat, among these\nthickets, with its prow seaward, he sat down in the stern, paddle low\nin hand; and when the ship was gliding by, like a flash he darted out;\ngained her side; with one backward dash of his foot capsized and sank\nhis canoe; climbed up the chains; and throwing himself at full length\nupon the deck, grappled a ring-bolt there, and swore not to let it go,\nthough hacked in pieces.\n\nIn vain the captain threatened to throw him overboard; suspended a\ncutlass over his naked wrists; Queequeg was the son of a King, and\nQueequeg budged not. Struck by his desperate dauntlessness, and his\nwild desire to visit Christendom, the captain at last relented, and\ntold him he might make himself at home. But this fine young savage \nthis sea Prince of Wales, never saw the Captain's cabin. They put him\ndown among the sailors, and made a whaleman of him. But like Czar\nPeter content to toil in the shipyards of foreign cities, Queequeg\ndisdained no seeming ignominy, if thereby he might happily gain the\npower of enlightening his untutored countrymen. For at bottom  so\nhe told me  he was actuated by a profound desire to learn among the\nChristians, the arts whereby to make his people still happier than\nthey were; and more than that, still better than they were. But, alas!\nthe practices of whalemen soon convinced him that even Christians\ncould be both miserable and wicked; infinitely more so, than all his\nfather's heathens. Arrived at last in old Sag Harbor; and seeing what\nthe sailors did there; and then going on to Nantucket, and seeing how\nthey spent their wages in that place also, poor Queequeg gave it up\nfor lost. Thought he, it's a wicked world in all meridians; I'll die a\npagan.\n\nAnd thus an old idolator at heart, he yet lived among these\nChristians, wore their clothes, and tried to talk their\ngibberish. Hence the queer ways about him, though now some time from\nhome.\n\nBy hints, I asked him whether he did not propose going back, and\nhaving a coronation; since he might now consider his father dead and\ngone, he being very old and feeble at the last accounts. He answered\nno, not yet; and added that he was fearful Christianity, or rather\nChristians, had unfitted him for ascending the pure and undefiled\nthrone of thirty pagan Kings before him. But by and by, he said, he\nwould return,  as soon as he felt himself baptized again. For the\nnonce, however, he proposed to sail about, and sow his wild oats in\nall four oceans. They had made a harpooneer of him, and that barbed\niron was in lieu of a sceptre now.\n\nI asked him what might be his immediate purpose, touching his future\nmovements. He answered, to go to sea again, in his old vocation. Upon\nthis, I told him that whaling was my own design, and informed him of\nmy intention to sail out of Nantucket, as being the most promising\nport for an adventurous whaleman to embark from. He at once resolved\nto accompany me to that island, ship aboard the same vessel, get into\nthe same watch, the same boat, the same mess with me, in short to\nshare my every hap; with both my hands in his, boldly dip into the\nPotluck of both worlds. To all this I joyously assented; for besides\nthe affection I now felt for Queequeg, he was an experienced\nharpooneer, and as such, could not fail to be of great usefulness to\none, who, like me, was wholly ignorant of the mysteries of whaling,\nthough well acquainted with the sea, as known to merchant seamen.\n\nHis story being ended with his pipe's last dying puff, Queequeg\nembraced me, pressed his forehead against mine, and blowing out the\nlight, we rolled over from each other, this way and that, and very\nsoon were sleeping.\n\nCHAPTER 13 Wheelbarrow.\n\nNext morning, Monday, after disposing of the embalmed head to a\nbarber, for a block, I settled my own and comrade's bill; using,\nhowever, my comrade's money. The grinning landlord, as well as the\nboarders, seemed amazingly tickled at the sudden friendship which had\nsprung up between me and Queequeg  especially as Peter Coffin's\ncock and bull stories about him had previously so much alarmed me\nconcerning the very person whom I now companied with.\n\nWe borrowed a wheelbarrow, and embarking our things, including my own\npoor carpet-bag, and Queequeg's canvas sack and hammock, away we went\ndown to \"the Moss,\" the little Nantucket packet schooner moored at the\nwharf. As we were going along the people stared; not at Queequeg so\nmuch  for they were used to seeing cannibals like him in their\nstreets,  but at seeing him and me upon such confidential\nterms. But we heeded them not, going along wheeling the barrow by\nturns, and Queequeg now and then stopping to adjust the sheath on his\nharpoon barbs. I asked him why he carried such a troublesome thing\nwith him ashore, and whether all whaling ships did not find their own\nharpoons. To this, in substance, he replied, that though what I hinted\nwas true enough, yet he had a particular affection for his own\nharpoon, because it was of assured stuff, well tried in many a mortal\ncombat, and deeply intimate with the hearts of whales. In short, like\nmany inland reapers and mowers, who go into the farmers' meadows armed\nwith their own scythes  though in no wise obliged to furnish them\n even so, Queequeg, for his own private reasons, preferred his own\nharpoon.\n\nShifting the barrow from my hand to his, he told me a funny story\nabout the first wheelbarrow he had ever seen. It was in Sag\nHarbor. The owners of his ship, it seems, had lent him one, in which\nto carry his heavy chest to his boarding house. Not to seem ignorant\nabout the thing  though in truth he was entirely so, concerning the\nprecise way in which to manage the barrow  Queequeg puts his chest\nupon it; lashes it fast; and then shoulders the barrow and marches up\nthe wharf. \"Why,\" said I, \"Queequeg, you might have known better than\nthat, one would think. Didn't the people laugh?\"\n\nUpon this, he told me another story. The people of his island of\nRokovoko, it seems, at their wedding feasts express the fragrant water\nof young cocoanuts into a large stained calabash like a punchbowl; and\nthis punchbowl always forms the great central ornament on the braided\nmat where the feast is held. Now a certain grand merchant ship once\ntouched at Rokovoko, and its commander  from all accounts, a very\nstately punctilious gentleman, at least for a sea captain  this\ncommander was invited to the wedding feast of Queequeg's sister, a\npretty young princess just turned of ten. Well; when all the wedding\nguests were assembled at the bride's bamboo cottage, this Captain\nmarches in, and being assigned the post of honour, placed himself over\nagainst the punchbowl, and between the High Priest and his majesty the\nKing, Queequeg's father. Grace being said,  for those people have\ntheir grace as well as we  though Queequeg told me that unlike us,\nwho at such times look downwards to our platters, they, on the\ncontrary, copying the ducks, glance upwards to the great Giver of all\nfeasts  Grace, I say, being said, the High Priest opens the banquet\nby the immemorial ceremony of the island; that is, dipping his\nconsecrated and consecrating fingers into the bowl before the blessed\nbeverage circulates. Seeing himself placed next the Priest, and noting\nthe ceremony, and thinking himself  being Captain of a ship  as\nhaving plain precedence over a mere island King, especially in the\nKing's own house  the Captain coolly proceeds to wash his hands in\nthe punchbowl;  taking it I suppose for a huge finger-glass. \"Now,\"\nsaid Queequeg, \"what you tink now?  Didn't our people laugh?\"\n\nAt last, passage paid, and luggage safe, we stood on board the\nschooner. Hoisting sail, it glided down the Acushnet river. On one\nside, New Bedford rose in terraces of streets, their ice-covered trees\nall glittering in the clear, cold air. Huge hills and mountains of\ncasks on casks were piled upon her wharves, and side by side the\nworld-wandering whale ships lay silent and safely moored at last;\nwhile from others came a sound of carpenters and coopers, with blended\nnoises of fires and forges to melt the pitch, all betokening that new\ncruises were on the start; that one most perilous and long voyage\nended, only begins a second; and a second ended, only begins a third,\nand so on, for ever and for aye. Such is the endlessness, yea, the\nintolerableness of all earthly effort.\n\nGaining the more open water, the bracing breeze waxed fresh; the\nlittle Moss tossed the quick foam from her bows, as a young colt his\nsnortings. How I snuffed that Tartar air!  how I spurned that\nturnpike earth!  that common highway all over dented with the marks\nof slavish heels and hoofs; and turned me to admire the magnanimity of\nthe sea which will permit no records.\n\nAt the same foam-fountain, Queequeg seemed to drink and reel with\nme. His dusky nostrils swelled apart; he showed his filed and pointed\nteeth. On, on we flew; and our offing gained, the Moss did homage to\nthe blast; ducked and dived her bows as a slave before the\nSultan. Sideways leaning, we sideways darted; every ropeyarn tingling\nlike a wire; the two tall masts buckling like Indian canes in land\ntornadoes. So full of this reeling scene were we, as we stood by the\nplunging bowsprit, that for some time we did not notice the jeering\nglances of the passengers, a lubber-like assembly, who marvelled that\ntwo fellow beings should be so companionable; as though a white man\nwere anything more dignified than a whitewashed negro. But there were\nsome boobies and bumpkins there, who, by their intense greenness, must\nhave come from the heart and centre of all verdure. Queequeg caught\none of these young saplings mimicking him behind his back. I thought\nthe bumpkin's hour of doom was come. Dropping his harpoon, the brawny\nsavage caught him in his arms, and by an almost miraculous dexterity\nand strength, sent him high up bodily into the air; then slightly\ntapping his stern in mid-somerset, the fellow landed with bursting\nlungs upon his feet, while Queequeg, turning his back upon him,\nlighted his tomahawk pipe and passed it to me for a puff.\n\n\"Capting! Capting! yelled the bumpkin, running towards that officer;\n\"Capting, Capting, here's the devil.\"\n\n\"Hallo, YOU sir,\" cried the Captain, a gaunt rib of the sea, stalking\nup to Queequeg, \"what in thunder do you mean by that? Don't you know\nyou might have killed that chap?\"\n\n\"What him say?\" said Queequeg, as he mildly turned to me.\n\n\"He say,\" said I, \"that you came near kill-e that man there,\" pointing\nto the still shivering greenhorn.\n\n\"Kill-e,\" cried Queequeg, twisting his tattooed face into an unearthly\nexpression of disdain, \"ah! him bevy small-e fish-e; Queequeg no\nkill-e so small-e fish-e; Queequeg kill-e big whale!\"\n\n\"Look you,\" roared the Captain, \"I'll kill-e YOU, you cannibal, if you\ntry any more of your tricks aboard here; so mind your eye.\"\n\nBut it so happened just then, that it was high time for the Captain to\nmind his own eye. The prodigious strain upon the main-sail had parted\nthe weather-sheet, and the tremendous boom was now flying from side to\nside, completely sweeping the entire after part of the deck. The poor\nfellow whom Queequeg had handled so roughly, was swept overboard; all\nhands were in a panic; and to attempt snatching at the boom to stay\nit, seemed madness. It flew from right to left, and back again, almost\nin one ticking of a watch, and every instant seemed on the point of\nsnapping into splinters. Nothing was done, and nothing seemed capable\nof being done; those on deck rushed towards the bows, and stood eyeing\nthe boom as if it were the lower jaw of an exasperated whale. In the\nmidst of this consternation, Queequeg dropped deftly to his knees, and\ncrawling under the path of the boom, whipped hold of a rope, secured\none end to the bulwarks, and then flinging the other like a lasso,\ncaught it round the boom as it swept over his head, and at the next\njerk, the spar was that way trapped, and all was safe. The schooner\nwas run into the wind, and while the hands were clearing away the\nstern boat, Queequeg, stripped to the waist, darted from the side with\na long living arc of a leap. For three minutes or more he was seen\nswimming like a dog, throwing his long arms straight out before him,\nand by turns revealing his brawny shoulders through the freezing\nfoam. I looked at the grand and glorious fellow, but saw no one to be\nsaved. The greenhorn had gone down. Shooting himself perpendicularly\nfrom the water, Queequeg, now took an instant's glance around him, and\nseeming to see just how matters were, dived down and disappeared. A\nfew minutes more, and he rose again, one arm still striking out, and\nwith the other dragging a lifeless form. The boat soon picked them\nup. The poor bumpkin was restored. All hands voted Queequeg a noble\ntrump; the captain begged his pardon. From that hour I clove to\nQueequeg like a barnacle; yea, till poor Queequeg took his last long\ndive.\n\nWas there ever such unconsciousness? He did not seem to think that he\nat all deserved a medal from the Humane and Magnanimous Societies. He\nonly asked for water  fresh water  something to wipe the brine\noff; that done, he put on dry clothes, lighted his pipe, and leaning\nagainst the bulwarks, and mildly eyeing those around him, seemed to be\nsaying to himself  \"It's a mutual, joint-stock world, in all\nmeridians. We cannibals must help these Christians.\"\n\nCHAPTER 14 Nantucket.\n\nNothing more happened on the passage worthy the mentioning; so, after\na fine run, we safely arrived in Nantucket.\n\nNantucket! Take out your map and look at it. See what a real corner of\nthe world it occupies; how it stands there, away off shore, more\nlonely than the Eddystone lighthouse. Look at it  a mere hillock,\nand elbow of sand; all beach, without a background. There is more sand\nthere than you would use in twenty years as a substitute for blotting\npaper. Some gamesome wights will tell you that they have to plant\nweeds there, they don't grow naturally; that they import Canada\nthistles; that they have to send beyond seas for a spile to stop a\nleak in an oil cask; that pieces of wood in Nantucket are carried\nabout like bits of the true cross in Rome; that people there plant\ntoadstools before their houses, to get under the shade in summer time;\nthat one blade of grass makes an oasis, three blades in a day's walk a\nprairie; that they wear quicksand shoes, something like Laplander\nsnow-shoes; that they are so shut up, belted about, every way\ninclosed, surrounded, and made an utter island of by the ocean, that\nto their very chairs and tables small clams will sometimes be found\nadhering, as to the backs of sea turtles. But these extravaganzas only\nshow that Nantucket is no Illinois.\n\nLook now at the wondrous traditional story of how this island was\nsettled by the red-men. Thus goes the legend. In olden times an eagle\nswooped down upon the New England coast, and carried off an infant\nIndian in his talons. With loud lament the parents saw their child\nborne out of sight over the wide waters. They resolved to follow in\nthe same direction. Setting out in their canoes, after a perilous\npassage they discovered the island, and there they found an empty\nivory casket,  the poor little Indian's skeleton.\n\nWhat wonder, then, that these Nantucketers, born on a beach, should\ntake to the sea for a livelihood! They first caught crabs and quohogs\nin the sand; grown bolder, they waded out with nets for mackerel; more\nexperienced, they pushed off in boats and captured cod; and at last,\nlaunching a navy of great ships on the sea, explored this watery\nworld; put an incessant belt of circumnavigations round it; peeped in\nat Behring's Straits; and in all seasons and all oceans declared\neverlasting war with the mightiest animated mass that has survived the\nflood; most monstrous and most mountainous! That Himmalehan, salt-sea\nMastodon, clothed with such portentousness of unconscious power, that\nhis very panics are more to be dreaded than his most fearless and\nmalicious assaults!\n\nAnd thus have these naked Nantucketers, these sea hermits, issuing\nfrom their ant-hill in the sea, overrun and conquered the watery world\nlike so many Alexanders; parcelling out among them the Atlantic,\nPacific, and Indian oceans, as the three pirate powers did Poland. Let\nAmerica add Mexico to Texas, and pile Cuba upon Canada; let the\nEnglish overswarm all India, and hang out their blazing banner from\nthe sun; two thirds of this terraqueous globe are the\nNantucketer's. For the sea is his; he owns it, as Emperors own\nempires; other seamen having but a right of way through it. Merchant\nships are but extension bridges; armed ones but floating forts; even\npirates and privateers, though following the sea as highwaymen the\nroad, they but plunder other ships, other fragments of the land like\nthemselves, without seeking to draw their living from the bottomless\ndeep itself. The Nantucketer, he alone resides and riots on the sea;\nhe alone, in Bible language, goes down to it in ships; to and fro\nploughing it as his own special plantation. There is his home; there\nlies his business, which a Noah's flood would not interrupt, though it\noverwhelmed all the millions in China. He lives on the sea, as prairie\ncocks in the prairie; he hides among the waves, he climbs them as\nchamois hunters climb the Alps. For years he knows not the land; so\nthat when he comes to it at last, it smells like another world, more\nstrangely than the moon would to an Earthsman. With the landless gull,\nthat at sunset folds her wings and is rocked to sleep between billows;\nso at nightfall, the Nantucketer, out of sight of land, furls his\nsails, and lays him to his rest, while under his very pillow rush\nherds of walruses and whales.\n\nCHAPTER 15 Chowder.\n\nIt was quite late in the evening when the little Moss came snugly to\nanchor, and Queequeg and I went ashore; so we could attend to no\nbusiness that day, at least none but a supper and a bed. The landlord\nof the Spouter-Inn had recommended us to his cousin Hosea Hussey of\nthe Try Pots, whom he asserted to be the proprietor of one of the best\nkept hotels in all Nantucket, and moreover he had assured us that\nCousin Hosea, as he called him, was famous for his chowders. In short,\nhe plainly hinted that we could not possibly do better than try\npot-luck at the Try Pots. But the directions he had given us about\nkeeping a yellow warehouse on our starboard hand till we opened a\nwhite church to the larboard, and then keeping that on the larboard\nhand till we made a corner three points to the starboard, and that\ndone, then ask the first man we met where the place was: these crooked\ndirections of his very much puzzled us at first, especially as, at the\noutset, Queequeg insisted that the yellow warehouse  our first\npoint of departure  must be left on the larboard hand, whereas I\nhad understood Peter Coffin to say it was on the starboard. However,\nby dint of beating about a little in the dark, and now and then\nknocking up a peaceable inhabitant to inquire the way, we at last came\nto something which there was no mistaking.\n\nTwo enormous wooden pots painted black, and suspended by asses' ears,\nswung from the cross-trees of an old top-mast, planted in front of an\nold doorway. The horns of the cross-trees were sawed off on the other\nside, so that this old top-mast looked not a little like a\ngallows. Perhaps I was over sensitive to such impressions at the time,\nbut I could not help staring at this gallows with a vague misgiving. A\nsort of crick was in my neck as I gazed up to the two remaining horns;\nyes, two of them, one for Queequeg, and one for me. It's ominous,\nthinks I. A Coffin my Innkeeper upon landing in my first whaling port;\ntombstones staring at me in the whalemen's chapel; and here a gallows!\nand a pair of prodigious black pots too! Are these last throwing out\noblique hints touching Tophet?\n\nI was called from these reflections by the sight of a freckled woman\nwith yellow hair and a yellow gown, standing in the porch of the inn,\nunder a dull red lamp swinging there, that looked much like an injured\neye, and carrying on a brisk scolding with a man in a purple woollen\nshirt.\n\n\"Get along with ye,\" said she to the man, \"or I'll be combing ye!\"\n\n\"Come on, Queequeg,\" said I, \"all right. There's Mrs. Hussey.\"\n\nAnd so it turned out; Mr. Hosea Hussey being from home, but leaving\nMrs. Hussey entirely competent to attend to all his affairs. Upon\nmaking known our desires for a supper and a bed, Mrs. Hussey,\npostponing further scolding for the present, ushered us into a little\nroom, and seating us at a table spread with the relics of a recently\nconcluded repast, turned round to us and said  \"Clam or Cod?\"\n\n\"What's that about Cods, ma'am?\" said I, with much politeness.\n\n\"Clam or Cod?\" she repeated.\n\n\"A clam for supper? a cold clam; is that what you mean, Mrs. Hussey?\"\nsays I, \"but that's a rather cold and clammy reception in the winter\ntime, ain't it, Mrs. Hussey?\"\n\nBut being in a great hurry to resume scolding the man in the purple\nShirt, who was waiting for it in the entry, and seeming to hear\nnothing but the word \"clam,\" Mrs. Hussey hurried towards an open door\nleading to the kitchen, and bawling out \"clam for two,\" disappeared.\n\n\"Queequeg,\" said I, \"do you think that we can make out a supper for us\nboth on one clam?\"\n\nHowever, a warm savory steam from the kitchen served to belie the\napparently cheerless prospect before us. But when that smoking chowder\ncame in, the mystery was delightfully explained. Oh, sweet friends!\nhearken to me. It was made of small juicy clams, scarcely bigger than\nhazel nuts, mixed with pounded ship biscuit, and salted pork cut up\ninto little flakes; the whole enriched with butter, and plentifully\nseasoned with pepper and salt. Our appetites being sharpened by the\nfrosty voyage, and in particular, Queequeg seeing his favourite\nfishing food before him, and the chowder being surpassingly excellent,\nwe despatched it with great expedition: when leaning back a moment and\nbethinking me of Mrs. Hussey's clam and cod announcement, I thought I\nwould try a little experiment. Stepping to the kitchen door, I uttered\nthe word \"cod\" with great emphasis, and resumed my seat. In a few\nmoments the savoury steam came forth again, but with a different\nflavor, and in good time a fine cod-chowder was placed before us.\n\nWe resumed business; and while plying our spoons in the bowl, thinks I\nto myself, I wonder now if this here has any effect on the head?\nWhat's that stultifying saying about chowder-headed people? \"But look,\nQueequeg, ain't that a live eel in your bowl? Where's your harpoon?\"\n\nFishiest of all fishy places was the Try Pots, which well deserved its\nname; for the pots there were always boiling chowders. Chowder for\nbreakfast, and chowder for dinner, and chowder for supper, till you\nbegan to look for fish-bones coming through your clothes. The area\nbefore the house was paved with clam-shells. Mrs. Hussey wore a\npolished necklace of codfish vertebra; and Hosea Hussey had his\naccount books bound in superior old shark-skin. There was a fishy\nflavor to the milk, too, which I could not at all account for, till\none morning happening to take a stroll along the beach among some\nfishermen's boats, I saw Hosea's brindled cow feeding on fish\nremnants, and marching along the sand with each foot in a cod's\ndecapitated head, looking very slip-shod, I assure ye.\n\nSupper concluded, we received a lamp, and directions from Mrs. Hussey\nconcerning the nearest way to bed; but, as Queequeg was about to\nprecede me up the stairs, the lady reached forth her arm, and demanded\nhis harpoon; she allowed no harpoon in her chambers. \"Why not? said I;\n\"every true whaleman sleeps with his harpoon  but why not?\"\n\"Because it's dangerous,\" says she. \"Ever since young Stiggs coming\nfrom that unfort'nt v'y'ge of his, when he was gone four years and a\nhalf, with only three barrels of ile, was found dead in my first floor\nback, with his harpoon in his side; ever since then I allow no\nboarders to take sich dangerous weepons in their rooms at night. So,\nMr. Queequeg\" (for she had learned his name), \"I will just take this\nhere iron, and keep it for you till morning. But the chowder; clam or\ncod to-morrow for breakfast, men?\"\n\n\"Both,\" says I; \"and let's have a couple of smoked herring by way of\nvariety.\"\n\nCHAPTER 16 The Ship.\n\nIn bed we concocted our plans for the morrow. But to my surprise and\nno small concern, Queequeg now gave me to understand, that he had been\ndiligently consulting Yojo  the name of his black little god \nand Yojo had told him two or three times over, and strongly insisted\nupon it everyway, that instead of our going together among the\nwhaling-fleet in harbor, and in concert selecting our craft; instead\nof this, I say, Yojo earnestly enjoined that the selection of the ship\nshould rest wholly with me, inasmuch as Yojo purposed befriending us;\nand, in order to do so, had already pitched upon a vessel, which, if\nleft to myself, I, Ishmael, should infallibly light upon, for all the\nworld as though it had turned out by chance; and in that vessel I must\nimmediately ship myself, for the present irrespective of Queequeg.\n\nI have forgotten to mention that, in many things, Queequeg placed\ngreat confidence in the excellence of Yojo's judgment and surprising\nforecast of things; and cherished Yojo with considerable esteem, as a\nrather good sort of god, who perhaps meant well enough upon the whole,\nbut in all cases did not succeed in his benevolent designs.\n\nNow, this plan of Queequeg's, or rather Yojo's, touching the selection\nof our craft; I did not like that plan at all. I had not a little\nrelied upon Queequeg's sagacity to point out the whaler best fitted to\ncarry us and our fortunes securely. But as all my remonstrances\nproduced no effect upon Queequeg, I was obliged to acquiesce; and\naccordingly prepared to set about this business with a determined\nrushing sort of energy and vigor, that should quickly settle that\ntrifling little affair. Next morning early, leaving Queequeg shut up\nwith Yojo in our little bedroom  for it seemed that it was some\nsort of Lent or Ramadan, or day of fasting, humiliation, and prayer\nwith Queequeg and Yojo that day; how it was I never could find out,\nfor, though I applied myself to it several times, I never could master\nhis liturgies and XXXIX Articles  leaving Queequeg, then, fasting\non his tomahawk pipe, and Yojo warming himself at his sacrificial fire\nof shavings, I sallied out among the shipping. After much prolonged\nsauntering and many random inquiries, I learnt that there were three\nships up for three-years' voyages  The Devil-Dam, the Tit-bit, and\nthe Pequod. Devil-Dam, I do not know the origin of; Tit-bit is\nobvious; Pequod, you will no doubt remember, was the name of a\ncelebrated tribe of Massachusetts Indians; now extinct as the ancient\nMedes. I peered and pryed about the Devil-dam; from her, hopped over\nto the Tit-bit; and finally, going on board the Pequod, looked around\nher for a moment, and then decided that this was the very ship for us.\n\nYou may have seen many a quaint craft in your day, for aught I know;\n square-toed luggers; mountainous Japanese junks; butter-box\ngalliots, and what not; but take my word for it, you never saw such a\nrare old craft as this same rare old Pequod. She was a ship of the old\nschool, rather small if anything; with an old-fashioned claw-footed\nlook about her. Long seasoned and weather-stained in the typhoons and\ncalms of all four oceans, her old hull's complexion was darkened like\na French grenadier's, who has alike fought in Egypt and Siberia. Her\nvenerable bows looked bearded. Her masts  cut somewhere on the\ncoast of Japan, where her original ones were lost overboard in a gale\n her masts stood stiffly up like the spines of the three old kings\nof Cologne. Her ancient decks were worn and wrinkled, like the\npilgrim-worshipped flag-stone in Canterbury Cathedral where Becket\nbled. But to all these her old antiquities, were added new and\nmarvellous features, pertaining to the wild business that for more\nthan half a century she had followed. Old Captain Peleg, many years\nher chief-mate, before he commanded another vessel of his own, and now\na retired seaman, and one of the principal owners of the Pequod, \nthis old Peleg, during the term of his chief-mateship, had built upon\nher original grotesqueness, and inlaid it, all over, with a quaintness\nboth of material and device, unmatched by anything except it be\nThorkill-Hake's carved buckler or bedstead. She was apparelled like\nany barbaric Ethiopian emperor, his neck heavy with pendants of\npolished ivory. She was a thing of trophies. A cannibal of a craft,\ntricking herself forth in the chased bones of her enemies. All round,\nher unpanelled, open bulwarks were garnished like one continuous jaw,\nwith the long sharp teeth of the sperm whale, inserted there for pins,\nto fasten her old hempen thews and tendons to. Those thews ran not\nthrough base blocks of land wood, but deftly travelled over sheaves of\nsea-ivory. Scorning a turnstile wheel at her reverend helm, she\nsported there a tiller; and that tiller was in one mass, curiously\ncarved from the long narrow lower jaw of her hereditary foe. The\nhelmsman who steered by that tiller in a tempest, felt like the\nTartar, when he holds back his fiery steed by clutching its jaw. A\nnoble craft, but somehow a most melancholy! All noble things are\ntouched with that.\n\nNow when I looked about the quarter-deck, for some one having\nauthority, in order to propose myself as a candidate for the voyage,\nat first I saw nobody; but I could not well overlook a strange sort of\ntent, or rather wigwam, pitched a little behind the main-mast. It\nseemed only a temporary erection used in port. It was of a conical\nshape, some ten feet high; consisting of the long, huge slabs of\nlimber black bone taken from the middle and highest part of the jaws\nof the right-whale. Planted with their broad ends on the deck, a\ncircle of these slabs laced together, mutually sloped towards each\nother, and at the apex united in a tufted point, where the loose hairy\nfibres waved to and fro like the top-knot on some old Pottowottamie\nSachem's head. A triangular opening faced towards the bows of the\nship, so that the insider commanded a complete view forward.\n\nAnd half concealed in this queer tenement, I at length found one who\nby his aspect seemed to have authority; and who, it being noon, and\nthe ship's work suspended, was now enjoying respite from the burden of\ncommand. He was seated on an old-fashioned oaken chair, wriggling all\nover with curious carving; and the bottom of which was formed of a\nstout interlacing of the same elastic stuff of which the wigwam was\nconstructed.\n\nThere was nothing so very particular, perhaps, about the appearance of\nthe elderly man I saw; he was brown and brawny, like most old seamen,\nand heavily rolled up in blue pilot-cloth, cut in the Quaker style;\nonly there was a fine and almost microscopic net-work of the minutest\nwrinkles interlacing round his eyes, which must have arisen from his\ncontinual sailings in many hard gales, and always looking to windward;\n for this causes the muscles about the eyes to become pursed\ntogether. Such eye-wrinkles are very effectual in a scowl.\n\n\"Is this the Captain of the Pequod?\" said I, advancing to the door of\nthe tent.\n\n\"Supposing it be the captain of the Pequod, what dost thou want of\nhim?\" he demanded.\n\n\"I was thinking of shipping.\"\n\n\"Thou wast, wast thou? I see thou art no Nantucketer  ever been in\na stove boat?\"\n\n\"No, Sir, I never have.\"\n\n\"Dost know nothing at all about whaling, I dare say  eh?\n\n\"Nothing, Sir; but I have no doubt I shall soon learn. I've been\nseveral voyages in the merchant service, and I think that  \"\n\n\"Merchant service be damned. Talk not that lingo to me. Dost see that\nleg?  I'll take that leg away from thy stern, if ever thou talkest\nof the marchant service to me again. Marchant service indeed! I\nsuppose now ye feel considerable proud of having served in those\nmarchant ships. But flukes! man, what makes thee want to go a whaling,\neh?  it looks a little suspicious, don't it, eh?  Hast not been\na pirate, hast thou?  Didst not rob thy last Captain, didst thou?\n Dost not think of murdering the officers when thou gettest to\nsea?\"\n\nI protested my innocence of these things. I saw that under the mask of\nthese half humorous innuendoes, this old seaman, as an insulated\nQuakerish Nantucketer, was full of his insular prejudices, and rather\ndistrustful of all aliens, unless they hailed from Cape Cod or the\nVineyard.\n\n\"But what takes thee a-whaling? I want to know that before I think of\nshipping ye.\"\n\n\"Well, sir, I want to see what whaling is. I want to see the world.\"\n\n\"Want to see what whaling is, eh? Have ye clapped eye on Captain\nAhab?\"\n\n\"Who is Captain Ahab, sir?\"\n\n\"Aye, aye, I thought so. Captain Ahab is the Captain of this ship.\"\n\n\"I am mistaken then. I thought I was speaking to the Captain himself.\"\n\n\"Thou art speaking to Captain Peleg  that's who ye are speaking to,\nyoung man. It belongs to me and Captain Bildad to see the Pequod\nfitted out for the voyage, and supplied with all her needs, including\ncrew. We are part owners and agents. But as I was going to say, if\nthou wantest to know what whaling is, as thou tellest ye do, I can put\nye in a way of finding it out before ye bind yourself to it, past\nbacking out. Clap eye on Captain Ahab, young man, and thou wilt find\nthat he has only one leg.\"\n\n\"What do you mean, sir? Was the other one lost by a whale?\"\n\n\"Lost by a whale! Young man, come nearer to me: it was devoured,\nchewed up, crunched by the monstrousest parmacetty that ever chipped a\nboat!  ah, ah!\"\n\nI was a little alarmed by his energy, perhaps also a little touched at\nthe hearty grief in his concluding exclamation, but said as calmly as\nI could, \"What you say is no doubt true enough, sir; but how could I\nknow there was any peculiar ferocity in that particular whale, though\nindeed I might have inferred as much from the simple fact of the\naccident.\"\n\n\"Look ye now, young man, thy lungs are a sort of soft, d'ye see; thou\ndost not talk shark a bit. Sure, ye've been to sea before now; sure of\nthat?\"\n\n\"Sir,\" said I, \"I thought I told you that I had been four voyages in\nthe merchant  \"\n\n\"Hard down out of that! Mind what I said about the marchant service\n don't aggravate me  I won't have it. But let us understand each\nother. I have given thee a hint about what whaling is; do ye yet feel\ninclined for it?\"\n\n\"I do, sir.\"\n\n\"Very good. Now, art thou the man to pitch a harpoon down a live\nwhale's throat, and then jump after it? Answer, quick!\"\n\n\"I am, sir, if it should be positively indispensable to do so; not to\nbe got rid of, that is; which I don't take to be the fact.\"\n\n\"Good again. Now then, thou not only wantest to go a-whaling, to find\nout by experience what whaling is, but ye also want to go in order to\nsee the world? Was not that what ye said? I thought so. Well then,\njust step forward there, and take a peep over the weather-bow, and\nthen back to me and tell me what ye see there.\"\n\nFor a moment I stood a little puzzled by this curious request, not\nknowing exactly how to take it, whether humorously or in earnest. But\nconcentrating all his crow's feet into one scowl, Captain Peleg\nstarted me on the errand.\n\nGoing forward and glancing over the weather bow, I perceived that the\nship swinging to her anchor with the flood-tide, was now obliquely\npointing towards the open ocean. The prospect was unlimited, but\nexceedingly monotonous and forbidding; not the slightest variety that\nI could see.\n\n\"Well, what's the report?\" said Peleg when I came back; \"what did ye\nsee?\"\n\n\"Not much,\" I replied  \"nothing but water; considerable horizon\nthough, and there's a squall coming up, I think.\"\n\n\"Well, what does thou think then of seeing the world? Do ye wish to go\nround Cape Horn to see any more of it, eh? Can't ye see the world\nwhere you stand?\"\n\nI was a little staggered, but go a-whaling I must, and I would; and\nthe Pequod was as good a ship as any  I thought the best  and\nall this I now repeated to Peleg. Seeing me so determined, he\nexpressed his willingness to ship me.\n\n\"And thou mayest as well sign the papers right off,\" he added \n\"come along with ye.\" And so saying, he led the way below deck into\nthe cabin.\n\nSeated on the transom was what seemed to me a most uncommon and\nsurprising figure. It turned out to be Captain Bildad, who along with\nCaptain Peleg was one of the largest owners of the vessel; the other\nshares, as is sometimes the case in these ports, being held by a crowd\nof old annuitants; widows, fatherless children, and chancery wards;\neach owning about the value of a timber head, or a foot of plank, or a\nnail or two in the ship. People in Nantucket invest their money in\nwhaling vessels, the same way that you do yours in approved state\nstocks bringing in good interest.\n\nNow, Bildad, like Peleg, and indeed many other Nantucketers, was a\nQuaker, the island having been originally settled by that sect; and to\nthis day its inhabitants in general retain in an uncommon measure the\npeculiarities of the Quaker, only variously and anomalously modified\nby things altogether alien and heterogeneous. For some of these same\nQuakers are the most sanguinary of all sailors and whale-hunters. They\nare fighting Quakers; they are Quakers with a vengeance.\n\nSo that there are instances among them of men, who, named with\nScripture names  a singularly common fashion on the island  and\nin childhood naturally imbibing the stately dramatic thee and thou of\nthe Quaker idiom; still, from the audacious, daring, and boundless\nadventure of their subsequent lives, strangely blend with these\nunoutgrown peculiarities, a thousand bold dashes of character, not\nunworthy a Scandinavian sea-king, or a poetical Pagan Roman. And when\nthese things unite in a man of greatly superior natural force, with a\nglobular brain and a ponderous heart; who has also by the stillness\nand seclusion of many long night-watches in the remotest waters, and\nbeneath constellations never seen here at the north, been led to think\nuntraditionally and independently; receiving all nature's sweet or\nsavage impressions fresh from her own virgin voluntary and confiding\nbreast, and thereby chiefly, but with some help from accidental\nadvantages, to learn a bold and nervous lofty language  that man\nmakes one in a whole nation's census  a mighty pageant creature,\nformed for noble tragedies. Nor will it at all detract from him,\ndramatically regarded, if either by birth or other circumstances, he\nhave what seems a half wilful overruling morbidness at the bottom of\nhis nature. For all men tragically great are made so through a certain\nmorbidness. Be sure of this, O young ambition, all mortal greatness is\nbut disease. But, as yet we have not to do with such an one, but with\nquite another; and still a man, who, if indeed peculiar, it only\nresults again from another phase of the Quaker, modified by individual\ncircumstances.\n\nLike Captain Peleg, Captain Bildad was a well-to-do, retired\nwhaleman. But unlike Captain Peleg  who cared not a rush for what\nare called serious things, and indeed deemed those self-same serious\nthings the veriest of all trifles  Captain Bildad had not only been\noriginally educated according to the strictest sect of Nantucket\nQuakerism, but all his subsequent ocean life, and the sight of many\nunclad, lovely island creatures, round the Horn  all that had not\nmoved this native born Quaker one single jot, had not so much as\naltered one angle of his vest. Still, for all this immutableness, was\nthere some lack of common consistency about worthy Captain\nPeleg. Though refusing, from conscientious scruples, to bear arms\nagainst land invaders, yet himself had illimitably invaded the\nAtlantic and Pacific; and though a sworn foe to human bloodshed, yet\nhad he in his straight-bodied coat, spilled tuns upon tuns of\nleviathan gore. How now in the contemplative evening of his days, the\npious Bildad reconciled these things in the reminiscence, I do not\nknow; but it did not seem to concern him much, and very probably he\nhad long since come to the sage and sensible conclusion that a man's\nreligion is one thing, and this practical world quite another. This\nworld pays dividends. Rising from a little cabin-boy in short clothes\nof the drabbest drab, to a harpooneer in a broad shad-bellied\nwaistcoat; from that becoming boat-header, chief-mate, and captain,\nand finally a ship owner; Bildad, as I hinted before, had concluded\nhis adventurous career by wholly retiring from active life at the\ngoodly age of sixty, and dedicating his remaining days to the quiet\nreceiving of his well-earned income.\n\nNow, Bildad, I am sorry to say, had the reputation of being an\nincorrigible old hunks, and in his sea-going days, a bitter, hard\ntask-master. They told me in Nantucket, though it certainly seems a\ncurious story, that when he sailed the old Categut whaleman, his crew,\nupon arriving home, were mostly all carried ashore to the hospital,\nsore exhausted and worn out. For a pious man, especially for a Quaker,\nhe was certainly rather hard-hearted, to say the least. He never used\nto swear, though, at his men, they said; but somehow he got an\ninordinate quantity of cruel, unmitigated hard work out of them. When\nBildad was a chief-mate, to have his drab-coloured eye intently\nlooking at you, made you feel completely nervous, till you could\nclutch something  a hammer or a marling-spike, and go to work like\nmad, at something or other, never mind what. Indolence and idleness\nperished before him. His own person was the exact embodiment of his\nutilitarian character. On his long, gaunt body, he carried no spare\nflesh, no superfluous beard, his chin having a soft, economical nap to\nit, like the worn nap of his broad-brimmed hat.\n\nSuch, then, was the person that I saw seated on the transom when I\nfollowed Captain Peleg down into the cabin. The space between the\ndecks was small; and there, bolt-upright, sat old Bildad, who always\nsat so, and never leaned, and this to save his coat tails. His\nbroad-brim was placed beside him; his legs were stiffly crossed; his\ndrab vesture was buttoned up to his chin; and spectacles on nose, he\nseemed absorbed in reading from a ponderous volume.\n\n\"Bildad,\" cried Captain Peleg, \"at it again, Bildad, eh? Ye have been\nstudying those Scriptures, now, for the last thirty years, to my\ncertain knowledge. How far ye got, Bildad?\"\n\nAs if long habituated to such profane talk from his old shipmate,\nBildad, without noticing his present irreverence, quietly looked up,\nand seeing me, glanced again inquiringly towards Peleg.\n\n\"He says he's our man, Bildad,\" said Peleg, \"he wants to ship.\"\n\n\"Dost thee?\" said Bildad, in a hollow tone, and turning round to me.\n\n\"I dost,\" said I unconsciously, he was so intense a Quaker.\n\n\"What do ye think of him, Bildad?\" said Peleg.\n\n\"He'll do,\" said Bildad, eyeing me, and then went on spelling away at\nhis book in a mumbling tone quite audible.\n\nI thought him the queerest old Quaker I ever saw, especially as Peleg,\nhis friend and old shipmate, seemed such a blusterer. But I said\nnothing, only looking round me sharply. Peleg now threw open a chest,\nand drawing forth the ship's articles, placed pen and ink before him,\nand seated himself at a little table. I began to think it was high\ntime to settle with myself at what terms I would be willing to engage\nfor the voyage. I was already aware that in the whaling business they\npaid no wages; but all hands, including the captain, received certain\nshares of the profits called lays, and that these lays were\nproportioned to the degree of importance pertaining to the respective\nduties of the ship's company. I was also aware that being a green hand\nat whaling, my own lay would not be very large; but considering that I\nwas used to the sea, could steer a ship, splice a rope, and all that,\nI made no doubt that from all I had heard I should be offered at least\nthe 275th lay  that is, the 275th part of the clear net proceeds of\nthe voyage, whatever that might eventually amount to. And though the\n275th lay was what they call a rather long lay, yet it was better than\nnothing; and if we had a lucky voyage, might pretty nearly pay for the\nclothing I would wear out on it, not to speak of my three years' beef\nand board, for which I would not have to pay one stiver.\n\nIt might be thought that this was a poor way to accumulate a princely\nfortune  and so it was, a very poor way indeed. But I am one of\nthose that never take on about princely fortunes, and am quite content\nif the world is ready to board and lodge me, while I am putting up at\nthis grim sign of the Thunder Cloud. Upon the whole, I thought that\nthe 275th lay would be about the fair thing, but would not have been\nsurprised had I been offered the 200th, considering I was of a\nbroad-shouldered make.\n\nBut one thing, nevertheless, that made me a little distrustful about\nreceiving a generous share of the profits was this: Ashore, I had\nheard something of both Captain Peleg and his unaccountable old crony\nBildad; how that they being the principal proprietors of the Pequod,\ntherefore the other and more inconsiderable and scattered owners, left\nnearly the whole management of the ship's affairs to these two. And I\ndid not know but what the stingy old Bildad might have a mighty deal\nto say about shipping hands, especially as I now found him on board\nthe Pequod, quite at home there in the cabin, and reading his Bible as\nif at his own fireside. Now while Peleg was vainly trying to mend a\npen with his jack-knife, old Bildad, to my no small surprise,\nconsidering that he was such an interested party in these proceedings;\nBildad never heeded us, but went on mumbling to himself out of his\nbook, \"LAY not up for yourselves treasures upon earth, where moth \n\"\n\n\"Well, Captain Bildad,\" interrupted Peleg, \"what d'ye say, what lay\nshall we give this young man?\"\n\n\"Thou knowest best,\" was the sepulchral reply, \"the seven hundred and\nseventy-seventh wouldn't be too much, would it?  'where moth and\nrust do corrupt, but LAY  '\"\n\nLAY, indeed, thought I, and such a lay! the seven hundred and\nseventy-seventh! Well, old Bildad, you are determined that I, for one,\nshall not lay up many lays here below, where moth and rust do\ncorrupt. It was an exceedingly long lay that, indeed; and though from\nthe magnitude of the figure it might at first deceive a landsman, yet\nthe slightest consideration will show that though seven hundred and\nseventy-seven is a pretty large number, yet, when you come to make a\nteenth of it, you will then see, I say, that the seven hundred and\nseventy-seventh part of a farthing is a good deal less than seven\nhundred and seventy-seven gold doubloons; and so I thought at the\ntime.\n\n\"Why, blast your eyes, Bildad,\" cried Peleg, \"thou dost not want to\nswindle this young man! he must have more than that.\"\n\n\"Seven hundred and seventy-seventh,\" again said Bildad, without\nlifting his eyes; and then went on mumbling  \"for where your\ntreasure is, there will your heart be also.\"\n\n\"I am going to put him down for the three hundredth,\" said Peleg, \"do\nye hear that, Bildad! The three hundredth lay, I say.\"\n\nBildad laid down his book, and turning solemnly towards him said,\n\"Captain Peleg, thou hast a generous heart; but thou must consider the\nduty thou owest to the other owners of this ship  widows and\norphans, many of them  and that if we too abundantly reward the\nlabors of this young man, we may be taking the bread from those widows\nand those orphans. The seven hundred and seventy-seventh lay, Captain\nPeleg.\"\n\n\"Thou Bildad!\" roared Peleg, starting up and clattering about the\ncabin. \"Blast ye, Captain Bildad, if I had followed thy advice in\nthese matters, I would afore now had a conscience to lug about that\nwould be heavy enough to founder the largest ship that ever sailed\nround Cape Horn.\"\n\n\"Captain Peleg,\" said Bildad steadily, \"thy conscience may be drawing\nten inches of water, or ten fathoms, I can't tell; but as thou art\nstill an impenitent man, Captain Peleg, I greatly fear lest thy\nconscience be but a leaky one; and will in the end sink thee\nfoundering down to the fiery pit, Captain Peleg.\"\n\n\"Fiery pit! fiery pit! ye insult me, man; past all natural bearing, ye\ninsult me. It's an all-fired outrage to tell any human creature that\nhe's bound to hell. Flukes and flames! Bildad, say that again to me,\nand start my soul-bolts, but I'll  I'll  yes, I'll swallow a\nlive goat with all his hair and horns on. Out of the cabin, ye\ncanting, drab-coloured son of a wooden gun  a straight wake with\nye!\"\n\nAs he thundered out this he made a rush at Bildad, but with a\nmarvellous oblique, sliding celerity, Bildad for that time eluded him.\n\nAlarmed at this terrible outburst between the two principal and\nresponsible owners of the ship, and feeling half a mind to give up all\nidea of sailing in a vessel so questionably owned and temporarily\ncommanded, I stepped aside from the door to give egress to Bildad,\nwho, I made no doubt, was all eagerness to vanish from before the\nawakened wrath of Peleg. But to my astonishment, he sat down again on\nthe transom very quietly, and seemed to have not the slightest\nintention of withdrawing. He seemed quite used to impenitent Peleg and\nhis ways. As for Peleg, after letting off his rage as he had, there\nseemed no more left in him, and he, too, sat down like a lamb, though\nhe twitched a little as if still nervously agitated. \"Whew!\" he\nwhistled at last  \"the squall's gone off to leeward, I\nthink. Bildad, thou used to be good at sharpening a lance, mend that\npen, will ye. My jack-knife here needs the grindstone. That's he;\nthank ye, Bildad. Now then, my young man, Ishmael's thy name, didn't\nye say? Well then, down ye go here, Ishmael, for the three hundredth\nlay.\"\n\n\"Captain Peleg,\" said I, \"I have a friend with me who wants to ship\ntoo  shall I bring him down to-morrow?\"\n\n\"To be sure,\" said Peleg. \"Fetch him along, and we'll look at him.\"\n\n\"What lay does he want?\" groaned Bildad, glancing up from the book in\nwhich he had again been burying himself.\n\n\"Oh! never thee mind about that, Bildad,\" said Peleg. \"Has he ever\nwhaled it any?\" turning to me.\n\n\"Killed more whales than I can count, Captain Peleg.\"\n\n\"Well, bring him along then.\"\n\nAnd, after signing the papers, off I went; nothing doubting but that I\nhad done a good morning's work, and that the Pequod was the identical\nship that Yojo had provided to carry Queequeg and me round the Cape.\n\nBut I had not proceeded far, when I began to bethink me that the\nCaptain with whom I was to sail yet remained unseen by me; though,\nindeed, in many cases, a whale-ship will be completely fitted out, and\nreceive all her crew on board, ere the captain makes himself visible\nby arriving to take command; for sometimes these voyages are so\nprolonged, and the shore intervals at home so exceedingly brief, that\nif the captain have a family, or any absorbing concernment of that\nsort, he does not trouble himself much about his ship in port, but\nleaves her to the owners till all is ready for sea. However, it is\nalways as well to have a look at him before irrevocably committing\nyourself into his hands. Turning back I accosted Captain Peleg,\ninquiring where Captain Ahab was to be found.\n\n\"And what dost thou want of Captain Ahab? It's all right enough; thou\nart shipped.\"\n\n\"Yes, but I should like to see him.\"\n\n\"But I don't think thou wilt be able to at present. I don't know\nexactly what's the matter with him; but he keeps close inside the\nhouse; a sort of sick, and yet he don't look so. In fact, he ain't\nsick; but no, he isn't well either. Any how, young man, he won't\nalways see me, so I don't suppose he will thee. He's a queer man,\nCaptain Ahab  so some think  but a good one. Oh, thou'lt like\nhim well enough; no fear, no fear. He's a grand, ungodly, god-like\nman, Captain Ahab; doesn't speak much; but, when he does speak, then\nyou may well listen. Mark ye, be forewarned; Ahab's above the common;\nAhab's been in colleges, as well as 'mong the cannibals; been used to\ndeeper wonders than the waves; fixed his fiery lance in mightier,\nstranger foes than whales. His lance! aye, the keenest and the surest\nthat out of all our isle! Oh! he ain't Captain Bildad; no, and he\nain't Captain Peleg; he's Ahab, boy; and Ahab of old, thou knowest,\nwas a crowned king!\"\n\n\"And a very vile one. When that wicked king was slain, the dogs, did\nthey not lick his blood?\"\n\n\"Come hither to me  hither, hither,\" said Peleg, with a\nsignificance in his eye that almost startled me. \"Look ye, lad; never\nsay that on board the Pequod. Never say it anywhere. Captain Ahab did\nnot name himself. 'Twas a foolish, ignorant whim of his crazy, widowed\nmother, who died when he was only a twelvemonth old. And yet the old\nsquaw Tistig, at Gayhead, said that the name would somehow prove\nprophetic. And, perhaps, other fools like her may tell thee the\nsame. I wish to warn thee. It's a lie. I know Captain Ahab well; I've\nsailed with him as mate years ago; I know what he is  a good man\n not a pious, good man, like Bildad, but a swearing good man \nsomething like me  only there's a good deal more of him. Aye, aye,\nI know that he was never very jolly; and I know that on the passage\nhome, he was a little out of his mind for a spell; but it was the\nsharp shooting pains in his bleeding stump that brought that about, as\nany one might see. I know, too, that ever since he lost his leg last\nvoyage by that accursed whale, he's been a kind of moody  desperate\nmoody, and savage sometimes; but that will all pass off. And once for\nall, let me tell thee and assure thee, young man, it's better to sail\nwith a moody good captain than a laughing bad one. So good-bye to thee\n and wrong not Captain Ahab, because he happens to have a wicked\nname. Besides, my boy, he has a wife  not three voyages wedded \na sweet, resigned girl. Think of that; by that sweet girl that old man\nhas a child: hold ye then there can be any utter, hopeless harm in\nAhab? No, no, my lad; stricken, blasted, if he be, Ahab has his\nhumanities!\"\n\nAs I walked away, I was full of thoughtfulness; what had been\nincidentally revealed to me of Captain Ahab, filled me with a certain\nwild vagueness of painfulness concerning him. And somehow, at the\ntime, I felt a sympathy and a sorrow for him, but for I don't know\nwhat, unless it was the cruel loss of his leg. And yet I also felt a\nstrange awe of him; but that sort of awe, which I cannot at all\ndescribe, was not exactly awe; I do not know what it was. But I felt\nit; and it did not disincline me towards him; though I felt impatience\nat what seemed like mystery in him, so imperfectly as he was known to\nme then. However, my thoughts were at length carried in other\ndirections, so that for the present dark Ahab slipped my mind.\n\nCHAPTER 17 The Ramadan.\n\nAs Queequeg's Ramadan, or Fasting and Humiliation, was to continue all\nday, I did not choose to disturb him till towards night-fall; for I\ncherish the greatest respect towards everybody's religious\nobligations, never mind how comical, and could not find it in my heart\nto undervalue even a congregation of ants worshipping a toad-stool; or\nthose other creatures in certain parts of our earth, who with a degree\nof footmanism quite unprecedented in other planets, bow down before\nthe torso of a deceased landed proprietor merely on account of the\ninordinate possessions yet owned and rented in his name.\n\nI say, we good Presbyterian Christians should be charitable in these\nthings, and not fancy ourselves so vastly superior to other mortals,\npagans and what not, because of their half-crazy conceits on these\nsubjects. There was Queequeg, now, certainly entertaining the most\nabsurd notions about Yojo and his Ramadan;  but what of that?\nQueequeg thought he knew what he was about, I suppose; he seemed to be\ncontent; and there let him rest. All our arguing with him would not\navail; let him be, I say: and Heaven have mercy on us all \nPresbyterians and Pagans alike  for we are all somehow dreadfully\ncracked about the head, and sadly need mending.\n\nTowards evening, when I felt assured that all his performances and\nrituals must be over, I went up to his room and knocked at the door;\nbut no answer. I tried to open it, but it was fastened\ninside. \"Queequeg,\" said I softly through the key-hole:  all\nsilent. \"I say, Queequeg! why don't you speak? It's I  Ishmael.\"\nBut all remained still as before. I began to grow alarmed. I had\nallowed him such abundant time; I thought he might have had an\napoplectic fit. I looked through the key-hole; but the door opening\ninto an odd corner of the room, the key-hole prospect was but a\ncrooked and sinister one. I could only see part of the foot-board of\nthe bed and a line of the wall, but nothing more. I was surprised to\nbehold resting against the wall the wooden shaft of Queequeg's\nharpoon, which the landlady the evening previous had taken from him,\nbefore our mounting to the chamber. That's strange, thought I; but at\nany rate, since the harpoon stands yonder, and he seldom or never goes\nabroad without it, therefore he must be inside here, and no possible\nmistake.\n\n\"Queequeg!  Queequeg!\"  all still. Something must have\nhappened. Apoplexy! I tried to burst open the door; but it stubbornly\nresisted. Running down stairs, I quickly stated my suspicions to the\nfirst person I met  the chamber-maid. \"La! la!\" she cried, \"I\nthought something must be the matter. I went to make the bed after\nbreakfast, and the door was locked; and not a mouse to be heard; and\nit's been just so silent ever since. But I thought, may be, you had\nboth gone off and locked your baggage in for safe keeping. La! la,\nma'am!  Mistress! murder! Mrs. Hussey! apoplexy!\"  and with\nthese cries, she ran towards the kitchen, I following.\n\nMrs. Hussey soon appeared, with a mustard-pot in one hand and a\nvinegar-cruet in the other, having just broken away from the\noccupation of attending to the castors, and scolding her little black\nboy meantime.\n\n\"Wood-house!\" cried I, \"which way to it? Run for God's sake, and fetch\nsomething to pry open the door  the axe!  the axe! he's had a\nstroke; depend upon it!\"  and so saying I was unmethodically\nrushing up stairs again empty-handed, when Mrs. Hussey interposed the\nmustard-pot and vinegar-cruet, and the entire castor of her\ncountenance.\n\n\"What's the matter with you, young man?\"\n\n\"Get the axe! For God's sake, run for the doctor, some one, while I\npry it open!\"\n\n\"Look here,\" said the landlady, quickly putting down the\nvinegar-cruet, so as to have one hand free; \"look here; are you\ntalking about prying open any of my doors?\"  and with that she\nseized my arm. \"What's the matter with you? What's the matter with\nyou, shipmate?\"\n\nIn as calm, but rapid a manner as possible, I gave her to understand\nthe whole case. Unconsciously clapping the vinegar-cruet to one side\nof her nose, she ruminated for an instant; then exclaimed  \"No! I\nhaven't seen it since I put it there.\" Running to a little closet\nunder the landing of the stairs, she glanced in, and returning, told\nme that Queequeg's harpoon was missing. \"He's killed himself,\" she\ncried. \"It's unfort'nate Stiggs done over again there goes another\ncounterpane  God pity his poor mother!  it will be the ruin of\nmy house. Has the poor lad a sister? Where's that girl?  there,\nBetty, go to Snarles the Painter, and tell him to paint me a sign,\nwith  \"no suicides permitted here, and no smoking in the parlor;\"\n might as well kill both birds at once. Kill? The Lord be merciful\nto his ghost! What's that noise there? You, young man, avast there!\"\n\nAnd running up after me, she caught me as I was again trying to force\nopen the door.\n\n\"I don't allow it; I won't have my premises spoiled. Go for the\nlocksmith, there's one about a mile from here. But avast!\" putting her\nhand in her side-pocket, \"here's a key that'll fit, I guess; let's\nsee.\" And with that, she turned it in the lock; but, alas! Queequeg's\nsupplemental bolt remained unwithdrawn within.\n\n\"Have to burst it open,\" said I, and was running down the entry a\nlittle, for a good start, when the landlady caught at me, again vowing\nI should not break down her premises; but I tore from her, and with a\nsudden bodily rush dashed myself full against the mark.\n\nWith a prodigious noise the door flew open, and the knob slamming\nagainst the wall, sent the plaster to the ceiling; and there, good\nheavens! there sat Queequeg, altogether cool and self-collected; right\nin the middle of the room; squatting on his hams, and holding Yojo on\ntop of his head. He looked neither one way nor the other way, but sat\nlike a carved image with scarce a sign of active life.\n\n\"Queequeg,\" said I, going up to him, \"Queequeg, what's the matter with\nyou?\"\n\n\"He hain't been a sittin' so all day, has he?\" said the landlady.\n\nBut all we said, not a word could we drag out of him; I almost felt\nlike pushing him over, so as to change his position, for it was almost\nintolerable, it seemed so painfully and unnaturally constrained;\nespecially, as in all probability he had been sitting so for upwards\nof eight or ten hours, going too without his regular meals.\n\n\"Mrs. Hussey,\" said I, \"he's alive at all events; so leave us, if you\nplease, and I will see to this strange affair myself.\"\n\nClosing the door upon the landlady, I endeavored to prevail upon\nQueequeg to take a chair; but in vain. There he sat; and all he could\ndo  for all my polite arts and blandishments  he would not move\na peg, nor say a single word, nor even look at me, nor notice my\npresence in the slightest way.\n\nI wonder, thought I, if this can possibly be a part of his Ramadan; do\nthey fast on their hams that way in his native island. It must be so;\nyes, it's part of his creed, I suppose; well, then, let him rest;\nhe'll get up sooner or later, no doubt. It can't last for ever, thank\nGod, and his Ramadan only comes once a year; and I don't believe it's\nvery punctual then.\n\nI went down to supper. After sitting a long time listening to the long\nstories of some sailors who had just come from a plum-pudding voyage,\nas they called it (that is, a short whaling-voyage in a schooner or\nbrig, confined to the north of the line, in the Atlantic Ocean only);\nafter listening to these plum-puddingers till nearly eleven o'clock, I\nwent up stairs to go to bed, feeling quite sure by this time Queequeg\nmust certainly have brought his Ramadan to a termination. But no;\nthere he was just where I had left him; he had not stirred an inch. I\nbegan to grow vexed with him; it seemed so downright senseless and\ninsane to be sitting there all day and half the night on his hams in a\ncold room, holding a piece of wood on his head.\n\n\"For heaven's sake, Queequeg, get up and shake yourself; get up and\nhave some supper. You'll starve; you'll kill yourself, Queequeg.\" But\nnot a word did he reply.\n\nDespairing of him, therefore, I determined to go to bed and to sleep;\nand no doubt, before a great while, he would follow me. But previous\nto turning in, I took my heavy bearskin jacket, and threw it over him,\nas it promised to be a very cold night; and he had nothing but his\nordinary round jacket on. For some time, do all I would, I could not\nget into the faintest doze. I had blown out the candle; and the mere\nthought of Queequeg  not four feet off  sitting there in that\nuneasy position, stark alone in the cold and dark; this made me really\nwretched. Think of it; sleeping all night in the same room with a wide\nawake pagan on his hams in this dreary, unaccountable Ramadan!\n\nBut somehow I dropped off at last, and knew nothing more till break of\nday; when, looking over the bedside, there squatted Queequeg, as if he\nhad been screwed down to the floor. But as soon as the first glimpse\nof sun entered the window, up he got, with stiff and grating joints,\nbut with a cheerful look; limped towards me where I lay; pressed his\nforehead again against mine; and said his Ramadan was over.\n\nNow, as I before hinted, I have no objection to any person's religion,\nbe it what it may, so long as that person does not kill or insult any\nother person, because that other person don't believe it also. But\nwhen a man's religion becomes really frantic; when it is a positive\ntorment to him; and, in fine, makes this earth of ours an\nuncomfortable inn to lodge in; then I think it high time to take that\nindividual aside and argue the point with him.\n\nAnd just so I now did with Queequeg. \"Queequeg,\" said I, \"get into bed\nnow, and lie and listen to me.\" I then went on, beginning with the\nrise and progress of the primitive religions, and coming down to the\nvarious religions of the present time, during which time I labored to\nshow Queequeg that all these Lents, Ramadans, and prolonged\nham-squattings in cold, cheerless rooms were stark nonsense; bad for\nthe health; useless for the soul; opposed, in short, to the obvious\nlaws of Hygiene and common sense. I told him, too, that he being in\nother things such an extremely sensible and sagacious savage, it\npained me, very badly pained me, to see him now so deplorably foolish\nabout this ridiculous Ramadan of his. Besides, argued I, fasting makes\nthe body cave in; hence the spirit caves in; and all thoughts born of\na fast must necessarily be half-starved. This is the reason why most\ndyspeptic religionists cherish such melancholy notions about their\nhereafters. In one word, Queequeg, said I, rather digressively; hell\nis an idea first born on an undigested apple-dumpling; and since then\nperpetuated through the hereditary dyspepsias nurtured by Ramadans.\n\nI then asked Queequeg whether he himself was ever troubled with\ndyspepsia; expressing the idea very plainly, so that he could take it\nin. He said no; only upon one memorable occasion. It was after a great\nfeast given by his father the king, on the gaining of a great battle\nwherein fifty of the enemy had been killed by about two o'clock in the\nafternoon, and all cooked and eaten that very evening.\n\n\"No more, Queequeg,\" said I, shuddering; \"that will do;\" for I knew\nthe inferences without his further hinting them. I had seen a sailor\nwho had visited that very island, and he told me that it was the\ncustom, when a great battle had been gained there, to barbecue all the\nslain in the yard or garden of the victor; and then, one by one, they\nwere placed in great wooden trenchers, and garnished round like a\npilau, with breadfruit and cocoanuts; and with some parsley in their\nmouths, were sent round with the victor's compliments to all his\nfriends, just as though these presents were so many Christmas turkeys.\n\nAfter all, I do not think that my remarks about religion made much\nimpression upon Queequeg. Because, in the first place, he somehow\nseemed dull of hearing on that important subject, unless considered\nfrom his own point of view; and, in the second place, he did not more\nthan one third understand me, couch my ideas simply as I would; and,\nfinally, he no doubt thought he knew a good deal more about the true\nreligion than I did. He looked at me with a sort of condescending\nconcern and compassion, as though he thought it a great pity that such\na sensible young man should be so hopelessly lost to evangelical pagan\npiety.\n\nAt last we rose and dressed; and Queequeg, taking a prodigiously\nhearty breakfast of chowders of all sorts, so that the landlady should\nnot make much profit by reason of his Ramadan, we sallied out to board\nthe Pequod, sauntering along, and picking our teeth with halibut\nbones.\n\nCHAPTER 18 His Mark.\n\nAs we were walking down the end of the wharf towards the ship,\nQueequeg carrying his harpoon, Captain Peleg in his gruff voice loudly\nhailed us from his wigwam, saying he had not suspected my friend was a\ncannibal, and furthermore announcing that he let no cannibals on board\nthat craft, unless they previously produced their papers.\n\n\"What do you mean by that, Captain Peleg?\" said I, now jumping on the\nbulwarks, and leaving my comrade standing on the wharf.\n\n\"I mean,\" he replied, \"he must show his papers.\"\n\n\"Yes,\" said Captain Bildad in his hollow voice, sticking his head from\nbehind Peleg's, out of the wigwam. \"He must show that he's\nconverted. Son of darkness,\" he added, turning to Queequeg, \"art thou\nat present in communion with any Christian church?\"\n\n\"Why,\" said I, \"he's a member of the first Congregational Church.\"\nHere be it said, that many tattooed savages sailing in Nantucket ships\nat last come to be converted into the churches.\n\n\"First Congregational Church,\" cried Bildad, \"what! that worships in\nDeacon Deuteronomy Coleman's meeting-house?\" and so saying, taking out\nhis spectacles, he rubbed them with his great yellow bandana\nhandkerchief, and putting them on very carefully, came out of the\nwigwam, and leaning stiffly over the bulwarks, took a good long look\nat Queequeg.\n\n\"How long hath he been a member?\" he then said, turning to me; \"not\nvery long, I rather guess, young man.\"\n\n\"No,\" said Peleg, \"and he hasn't been baptized right either, or it\nwould have washed some of that devil's blue off his face.\"\n\n\"Do tell, now,\" cried Bildad, \"is this Philistine a regular member of\nDeacon Deuteronomy's meeting? I never saw him going there, and I pass\nit every Lord's day.\"\n\n\"I don't know anything about Deacon Deuteronomy or his meeting,\" said\nI; \"all I know is, that Queequeg here is a born member of the First\nCongregational Church. He is a deacon himself, Queequeg is.\"\n\n\"Young man,\" said Bildad sternly, \"thou art skylarking with me \nexplain thyself, thou young Hittite. What church dost thee mean?\nanswer me.\"\n\nFinding myself thus hard pushed, I replied. \"I mean, sir, the same\nancient Catholic Church to which you and I, and Captain Peleg there,\nand Queequeg here, and all of us, and every mother's son and soul of\nus belong; the great and everlasting First Congregation of this whole\nworshipping world; we all belong to that; only some of us cherish some\nqueer crotchets no ways touching the grand belief; in that we all join\nhands.\"\n\n\"Splice, thou mean'st splice hands,\" cried Peleg, drawing\nnearer. \"Young man, you'd better ship for a missionary, instead of a\nfore-mast hand; I never heard a better sermon. Deacon Deuteronomy \nwhy Father Mapple himself couldn't beat it, and he's reckoned\nsomething. Come aboard, come aboard; never mind about the papers. I\nsay, tell Quohog there  what's that you call him? tell Quohog to\nstep along. By the great anchor, what a harpoon he's got there! looks\nlike good stuff that; and he handles it about right. I say, Quohog, or\nwhatever your name is, did you ever stand in the head of a whale-boat?\ndid you ever strike a fish?\"\n\nWithout saying a word, Queequeg, in his wild sort of way, jumped upon\nthe bulwarks, from thence into the bows of one of the whale-boats\nhanging to the side; and then bracing his left knee, and poising his\nharpoon, cried out in some such way as this: \n\n\"Cap'ain, you see him small drop tar on water dere? You see him? well,\nspose him one whale eye, well, den!\" and taking sharp aim at it, he\ndarted the iron right over old Bildad's broad brim, clean across the\nship's decks, and struck the glistening tar spot out of sight.\n\n\"Now,\" said Queequeg, quietly hauling in the line, \"spos-ee him\nwhale-e eye; why, dad whale dead.\"\n\n\"Quick, Bildad,\" said Peleg, his partner, who, aghast at the close\nvicinity of the flying harpoon, had retreated towards the cabin\ngangway. \"Quick, I say, you Bildad, and get the ship's papers. We must\nhave Hedgehog there, I mean Quohog, in one of our boats. Look ye,\nQuohog, we'll give ye the ninetieth lay, and that's more than ever was\ngiven a harpooneer yet out of Nantucket.\"\n\nSo down we went into the cabin, and to my great joy Queequeg was soon\nenrolled among the same ship's company to which I myself belonged.\n\nWhen all preliminaries were over and Peleg had got everything ready\nfor signing, he turned to me and said, \"I guess, Quohog there don't\nknow how to write, does he? I say, Quohog, blast ye! dost thou sign\nthy name or make thy mark?\n\nBut at this question, Queequeg, who had twice or thrice before taken\npart in similar ceremonies, looked no ways abashed; but taking the\noffered pen, copied upon the paper, in the proper place, an exact\ncounterpart of a queer round figure which was tattooed upon his arm;\nso that through Captain Peleg's obstinate mistake touching his\nappellative, it stood something like this: \n\nQuohog. his X mark.\n\nMeanwhile Captain Bildad sat earnestly and steadfastly eyeing\nQueequeg, and at last rising solemnly and fumbling in the huge pockets\nof his broad-skirted drab coat, took out a bundle of tracts, and\nselecting one entitled \"The Latter Day Coming; or No Time to Lose,\"\nplaced it in Queequeg's hands, and then grasping them and the book\nwith both his, looked earnestly into his eyes, and said, \"Son of\ndarkness, I must do my duty by thee; I am part owner of this ship, and\nfeel concerned for the souls of all its crew; if thou still clingest\nto thy Pagan ways, which I sadly fear, I beseech thee, remain not for\naye a Belial bondsman. Spurn the idol Bell, and the hideous dragon;\nturn from the wrath to come; mind thine eye, I say; oh! goodness\ngracious! steer clear of the fiery pit!\"\n\nSomething of the salt sea yet lingered in old Bildad's language,\nheterogeneously mixed with Scriptural and domestic phrases.\n\n\"Avast there, avast there, Bildad, avast now spoiling our harpooneer,\"\nPeleg. \"Pious harpooneers never make good voyagers  it takes the\nshark out of 'em; no harpooneer is worth a straw who aint pretty\nsharkish. There was young Nat Swaine, once the bravest boat-header out\nof all Nantucket and the Vineyard; he joined the meeting, and never\ncame to good. He got so frightened about his plaguy soul, that he\nshrinked and sheered away from whales, for fear of after-claps, in\ncase he got stove and went to Davy Jones.\"\n\n\"Peleg! Peleg!\" said Bildad, lifting his eyes and hands, \"thou\nthyself, as I myself, hast seen many a perilous time; thou knowest,\nPeleg, what it is to have the fear of death; how, then, can'st thou\nprate in this ungodly guise. Thou beliest thine own heart, Peleg. Tell\nme, when this same Pequod here had her three masts overboard in that\ntyphoon on Japan, that same voyage when thou went mate with Captain\nAhab, did'st thou not think of Death and the Judgment then?\"\n\n\"Hear him, hear him now,\" cried Peleg, marching across the cabin, and\nthrusting his hands far down into his pockets,  \"hear him, all of\nye. Think of that! When every moment we thought the ship would sink!\nDeath and the Judgment then? What? With all three masts making such an\neverlasting thundering against the side; and every sea breaking over\nus, fore and aft. Think of Death and the Judgment then? No! no time to\nthink about Death then. Life was what Captain Ahab and I was thinking\nof; and how to save all hands  how to rig jury-masts  how to get\ninto the nearest port; that was what I was thinking of.\"\n\nBildad said no more, but buttoning up his coat, stalked on deck, where\nwe followed him. There he stood, very quietly overlooking some\nsailmakers who were mending a top-sail in the waist. Now and then he\nstooped to pick up a patch, or save an end of tarred twine, which\notherwise might have been wasted.\n\nCHAPTER 19 The Prophet.\n\n\"Shipmates, have ye shipped in that ship?\"\n\nQueequeg and I had just left the Pequod, and were sauntering away from\nthe water, for the moment each occupied with his own thoughts, when\nthe above words were put to us by a stranger, who, pausing before us,\nlevelled his massive forefinger at the vessel in question. He was but\nshabbily apparelled in faded jacket and patched trowsers; a rag of a\nblack handkerchief investing his neck. A confluent small-pox had in\nall directions flowed over his face, and left it like the complicated\nribbed bed of a torrent, when the rushing waters have been dried up.\n\n\"Have ye shipped in her?\" he repeated.\n\n\"You mean the ship Pequod, I suppose,\" said I, trying to gain a little\nmore time for an uninterrupted look at him.\n\n\"Aye, the Pequod  that ship there,\" he said, drawing back his whole\narm, and then rapidly shoving it straight out from him, with the fixed\nbayonet of his pointed finger darted full at the object.\n\n\"Yes,\" said I, \"we have just signed the articles.\"\n\n\"Anything down there about your souls?\"\n\n\"About what?\"\n\n\"Oh, perhaps you hav'n't got any,\" he said quickly. \"No matter though,\nI know many chaps that hav'n't got any,  good luck to 'em; and they\nare all the better off for it. A soul's a sort of a fifth wheel to a\nwagon.\"\n\n\"What are you jabbering about, shipmate?\" said I.\n\n\"HE'S got enough, though, to make up for all deficiencies of that sort\nin other chaps,\" abruptly said the stranger, placing a nervous\nemphasis upon the word he.\n\n\"Queequeg,\" said I, \"let's go; this fellow has broken loose from\nsomewhere; he's talking about something and somebody we don't know.\"\n\n\"Stop!\" cried the stranger. \"Ye said true  ye hav'n't seen Old\nThunder yet, have ye?\"\n\n\"Who's Old Thunder?\" said I, again riveted with the insane earnestness\nof his manner.\n\n\"Captain Ahab.\"\n\n\"What! the captain of our ship, the Pequod?\"\n\n\"Aye, among some of us old sailor chaps, he goes by that name. Ye\nhav'n't seen him yet, have ye?\"\n\n\"No, we hav'n't. He's sick they say, but is getting better, and will\nbe all right again before long.\"\n\n\"All right again before long!\" laughed the stranger, with a solemnly\nderisive sort of laugh. \"Look ye; when Captain Ahab is all right, then\nthis left arm of mine will be all right; not before.\"\n\n\"What do you know about him?\"\n\n\"What did they tell you about him? Say that!\"\n\n\"They didn't tell much of anything about him; only I've heard that\nhe's a good whale-hunter, and a good captain to his crew.\"\n\n\"That's true, that's true  yes, both true enough. But you must jump\nwhen he gives an order. Step and growl; growl and go  that's the\nword with Captain Ahab. But nothing about that thing that happened to\nhim off Cape Horn, long ago, when he lay like dead for three days and\nnights; nothing about that deadly skrimmage with the Spaniard afore\nthe altar in Santa?  heard nothing about that, eh? Nothing about\nthe silver calabash he spat into? And nothing about his losing his leg\nlast voyage, according to the prophecy. Didn't ye hear a word about\nthem matters and something more, eh? No, I don't think ye did; how\ncould ye? Who knows it? Not all Nantucket, I guess. But hows'ever,\nmayhap, ye've heard tell about the leg, and how he lost it; aye, ye\nhave heard of that, I dare say. Oh yes, THAT every one knows a'most\n I mean they know he's only one leg; and that a parmacetti took the\nother off.\"\n\n\"My friend,\" said I, \"what all this gibberish of yours is about, I\ndon't know, and I don't much care; for it seems to me that you must be\na little damaged in the head. But if you are speaking of Captain Ahab,\nof that ship there, the Pequod, then let me tell you, that I know all\nabout the loss of his leg.\"\n\n\"ALL about it, eh  sure you do?  all?\"\n\n\"Pretty sure.\"\n\nWith finger pointed and eye levelled at the Pequod, the beggar-like\nstranger stood a moment, as if in a troubled reverie; then starting a\nlittle, turned and said:  \"Ye've shipped, have ye? Names down on\nthe papers? Well, well, what's signed, is signed; and what's to be,\nwill be; and then again, perhaps it won't be, after all. Anyhow, it's\nall fixed and arranged a'ready; and some sailors or other must go with\nhim, I suppose; as well these as any other men, God pity 'em! Morning\nto ye, shipmates, morning; the ineffable heavens bless ye; I'm sorry I\nstopped ye.\"\n\n\"Look here, friend,\" said I, \"if you have anything important to tell\nus, out with it; but if you are only trying to bamboozle us, you are\nmistaken in your game; that's all I have to say.\"\n\n\"And it's said very well, and I like to hear a chap talk up that way;\nyou are just the man for him  the likes of ye. Morning to ye,\nshipmates, morning! Oh! when ye get there, tell 'em I've concluded not\nto make one of 'em.\"\n\n\"Ah, my dear fellow, you can't fool us that way  you can't fool\nus. It is the easiest thing in the world for a man to look as if he\nhad a great secret in him.\"\n\n\"Morning to ye, shipmates, morning.\"\n\n\"Morning it is,\" said I. \"Come along, Queequeg, let's leave this crazy\nman. But stop, tell me your name, will you?\"\n\n\"Elijah.\"\n\nElijah! thought I, and we walked away, both commenting, after each\nother's fashion, upon this ragged old sailor; and agreed that he was\nnothing but a humbug, trying to be a bugbear. But we had not gone\nperhaps above a hundred yards, when chancing to turn a corner, and\nlooking back as I did so, who should be seen but Elijah following us,\nthough at a distance. Somehow, the sight of him struck me so, that I\nsaid nothing to Queequeg of his being behind, but passed on with my\ncomrade, anxious to see whether the stranger would turn the same\ncorner that we did. He did; and then it seemed to me that he was\ndogging us, but with what intent I could not for the life of me\nimagine. This circumstance, coupled with his ambiguous, half-hinting,\nhalf-revealing, shrouded sort of talk, now begat in me all kinds of\nvague wonderments and half-apprehensions, and all connected with the\nPequod; and Captain Ahab; and the leg he had lost; and the Cape Horn\nfit; and the silver calabash; and what Captain Peleg had said of him,\nwhen I left the ship the day previous; and the prediction of the squaw\nTistig; and the voyage we had bound ourselves to sail; and a hundred\nother shadowy things.\n\nI was resolved to satisfy myself whether this ragged Elijah was really\ndogging us or not, and with that intent crossed the way with Queequeg,\nand on that side of it retraced our steps. But Elijah passed on,\nwithout seeming to notice us. This relieved me; and once more, and\nfinally as it seemed to me, I pronounced him in my heart, a humbug.\n\nCHAPTER 20 All Astir.\n\nA day or two passed, and there was great activity aboard the\nPequod. Not only were the old sails being mended, but new sails were\ncoming on board, and bolts of canvas, and coils of rigging; in short,\neverything betokened that the ship's preparations were hurrying to a\nclose. Captain Peleg seldom or never went ashore, but sat in his\nwigwam keeping a sharp look-out upon the hands: Bildad did all the\npurchasing and providing at the stores; and the men employed in the\nhold and on the rigging were working till long after night-fall.\n\nOn the day following Queequeg's signing the articles, word was given\nat all the inns where the ship's company were stopping, that their\nchests must be on board before night, for there was no telling how\nsoon the vessel might be sailing. So Queequeg and I got down our\ntraps, resolving, however, to sleep ashore till the last. But it seems\nthey always give very long notice in these cases, and the ship did not\nsail for several days. But no wonder; there was a good deal to be\ndone, and there is no telling how many things to be thought of, before\nthe Pequod was fully equipped.\n\nEvery one knows what a multitude of things  beds, sauce-pans,\nknives and forks, shovels and tongs, napkins, nut-crackers, and what\nnot, are indispensable to the business of housekeeping. Just so with\nwhaling, which necessitates a three-years' housekeeping upon the wide\nocean, far from all grocers, costermongers, doctors, bakers, and\nbankers. And though this also holds true of merchant vessels, yet not\nby any means to the same extent as with whalemen. For besides the\ngreat length of the whaling voyage, the numerous articles peculiar to\nthe prosecution of the fishery, and the impossibility of replacing\nthem at the remote harbors usually frequented, it must be remembered,\nthat of all ships, whaling vessels are the most exposed to accidents\nof all kinds, and especially to the destruction and loss of the very\nthings upon which the success of the voyage most depends. Hence, the\nspare boats, spare spars, and spare lines and harpoons, and spare\neverythings, almost, but a spare Captain and duplicate ship.\n\nAt the period of our arrival at the Island, the heaviest storage of\nthe Pequod had been almost completed; comprising her beef, bread,\nwater, fuel, and iron hoops and staves. But, as before hinted, for\nsome time there was a continual fetching and carrying on board of\ndivers odds and ends of things, both large and small.\n\nChief among those who did this fetching and carrying was Captain\nBildad's sister, a lean old lady of a most determined and\nindefatigable spirit, but withal very kindhearted, who seemed resolved\nthat, if SHE could help it, nothing should be found wanting in the\nPequod, after once fairly getting to sea. At one time she would come\non board with a jar of pickles for the steward's pantry; another time\nwith a bunch of quills for the chief mate's desk, where he kept his\nlog; a third time with a roll of flannel for the small of some one's\nrheumatic back. Never did any woman better deserve her name, which was\nCharity  Aunt Charity, as everybody called her. And like a sister\nof charity did this charitable Aunt Charity bustle about hither and\nthither, ready to turn her hand and heart to anything that promised to\nyield safety, comfort, and consolation to all on board a ship in which\nher beloved brother Bildad was concerned, and in which she herself\nowned a score or two of well-saved dollars.\n\nBut it was startling to see this excellent hearted Quakeress coming on\nboard, as she did the last day, with a long oil-ladle in one hand, and\na still longer whaling lance in the other. Nor was Bildad himself nor\nCaptain Peleg at all backward. As for Bildad, he carried about with\nhim a long list of the articles needed, and at every fresh arrival,\ndown went his mark opposite that article upon the paper. Every once in\na while Peleg came hobbling out of his whalebone den, roaring at the\nmen down the hatchways, roaring up to the riggers at the mast-head,\nand then concluded by roaring back into his wigwam.\n\nDuring these days of preparation, Queequeg and I often visited the\ncraft, and as often I asked about Captain Ahab, and how he was, and\nwhen he was going to come on board his ship. To these questions they\nwould answer, that he was getting better and better, and was expected\naboard every day; meantime, the two captains, Peleg and Bildad, could\nattend to everything necessary to fit the vessel for the voyage. If I\nhad been downright honest with myself, I would have seen very plainly\nin my heart that I did but half fancy being committed this way to so\nlong a voyage, without once laying my eyes on the man who was to be\nthe absolute dictator of it, so soon as the ship sailed out upon the\nopen sea. But when a man suspects any wrong, it sometimes happens that\nif he be already involved in the matter, he insensibly strives to\ncover up his suspicions even from himself. And much this way it was\nwith me. I said nothing, and tried to think nothing.\n\nAt last it was given out that some time next day the ship would\ncertainly sail. So next morning, Queequeg and I took a very early\nstart.\n\nCHAPTER 21 Going Aboard.\n\nIt was nearly six o'clock, but only grey imperfect misty dawn, when we\ndrew nigh the wharf.\n\n\"There are some sailors running ahead there, if I see right,\" said I\nto Queequeg, \"it can't be shadows; she's off by sunrise, I guess; come\non!\"\n\n\"Avast!\" cried a voice, whose owner at the same time coming close\nbehind us, laid a hand upon both our shoulders, and then insinuating\nhimself between us, stood stooping forward a little, in the uncertain\ntwilight, strangely peering from Queequeg to me. It was Elijah.\n\n\"Going aboard?\"\n\n\"Hands off, will you,\" said I.\n\n\"Lookee here,\" said Queequeg, shaking himself, \"go 'way!\"\n\n\"Ain't going aboard, then?\"\n\n\"Yes, we are,\" said I, \"but what business is that of yours? Do you\nknow, Mr. Elijah, that I consider you a little impertinent?\"\n\n\"No, no, no; I wasn't aware of that,\" said Elijah, slowly and wonderingly looking from me to Queequeg, with the most unaccountable glances.\n\n\"Elijah,\" said I, \"you will oblige my friend and me by withdrawing. We are going to the Indian and Pacific Oceans, and would prefer not to be detained.\"\n\n\"Ye be, be ye? Coming back afore breakfast?\"\n\n\"He's cracked, Queequeg,\" said I, \"come on.\"\n\n\"Holloa!\" cried stationary Elijah, hailing us when we had removed a few paces.\n\n\"Never mind him,\" said I, \"Queequeg, come on.\"\n\nBut he stole up to us again, and suddenly clapping his hand on my shoulder, said  \"Did ye see anything looking like men going towards that ship a while ago?\"\n\nStruck by this plain matter-of-fact question, I answered, saying, \"Yes, I thought I did see four or five men; but it was too dim to be sure.\"\n\n\"Very dim, very dim,\" said Elijah. \"Morning to ye.\"\n\nOnce more we quitted him; but once more he came softly after us; and touching my shoulder again, said, \"See if you can find 'em now, will ye?\n\n\"Find who?\"\n\n\"Morning to ye! morning to ye!\" he rejoined, again moving off. \"Oh! I was going to warn ye against  but never mind, never mind  it's all one, all in the family too;  sharp frost this morning, ain't it? Good-bye to ye. Shan't see ye again very soon, I guess; unless it's before the Grand Jury.\" And with these cracked words he finally departed, leaving me, for the moment, in no small wonderment at his frantic impudence.\n\nAt last, stepping on board the Pequod, we found everything in profound quiet, not a soul moving. The cabin entrance was locked within; the hatches were all on, and lumbered with coils of rigging. Going forward to the forecastle, we found the slide of the scuttle open. Seeing a light, we went down, and found only an old rigger there, wrapped in a tattered pea-jacket. He was thrown at whole length upon two chests, his face downwards and inclosed in his folded arms. The profoundest slumber slept upon him.\n\n\"Those sailors we saw, Queequeg, where can they have gone to?\" said I, looking dubiously at the sleeper. But it seemed that, when on the wharf, Queequeg had not at all noticed what I now alluded to; hence I would have thought myself to have been optically deceived in that matter, were it not for Elijah's otherwise inexplicable question. But I beat the thing down; and again marking the sleeper, jocularly hinted to Queequeg that perhaps we had best sit up with the body; telling him to establish himself accordingly. He put his hand upon the sleeper's rear, as though feeling if it was soft enough; and then, without more ado, sat quietly down there.\n\n\"Gracious! Queequeg, don't sit there,\" said I.\n\n\"Oh! perry dood seat,\" said Queequeg, \"my country way; won't hurt him face.\"\n\n\"Face!\" said I, \"call that his face? very benevolent countenance then; but how hard he breathes, he's heaving himself; get off, Queequeg, you are heavy, it's grinding the face of the poor. Get off, Queequeg! Look, he'll twitch you off soon. I wonder he don't wake.\"\n\nQueequeg removed himself to just beyond the head of the sleeper, and lighted his tomahawk pipe. I sat at the feet. We kept the pipe passing over the sleeper, from one to the other. Meanwhile, upon questioning him in his broken fashion, Queequeg gave me to understand that, in his land, owing to the absence of settees and sofas of all sorts, the king, chiefs, and great people generally, were in the custom of fattening some of the lower orders for ottomans; and to furnish a house comfortably in that respect, you had only to buy up eight or ten lazy fellows, and lay them round in the piers and alcoves. Besides, it was very convenient on an excursion; much better than those garden-chairs which are convertible into walking-sticks; upon occasion, a chief calling his attendant, and desiring him to make a settee of himself under a spreading tree, perhaps in some damp marshy place.\n\nWhile narrating these things, every time Queequeg received the tomahawk from me, he flourished the hatchet-side of it over the sleeper's head.\n\n\"What's that for, Queequeg?\"\n\n\"Perry easy, kill-e; oh! perry easy!\n\nHe was going on with some wild reminiscences about his tomahawk-pipe, which, it seemed, had in its two uses both brained his foes and soothed his soul, when we were directly attracted to the sleeping rigger. The strong vapour now completely filling the contracted hole, it began to tell upon him. He breathed with a sort of muffledness; then seemed troubled in the nose; then revolved over once or twice; then sat up and rubbed his eyes.\n\n\"Holloa!\" he breathed at last, \"who be ye smokers?\"\n\n\"Shipped men,\" answered I, \"when does she sail?\"\n\n\"Aye, aye, ye are going in her, be ye? She sails to-day. The Captain came aboard last night.\"\n\n\"What Captain?  Ahab?\"\n\n\"Who but him indeed?\"\n\nI was going to ask him some further questions concerning Ahab, when we heard a noise on deck.\n\n\"Holloa! Starbuck's astir,\" said the rigger. \"He's a lively chief mate, that; good man, and a pious; but all alive now, I must turn to.\" And so saying he went on deck, and we followed.\n\nIt was now clear sunrise. Soon the crew came on board in twos and threes; the riggers bestirred themselves; the mates were actively engaged; and several of the shore people were busy in bringing various last things on board. Meanwhile Captain Ahab remained invisibly enshrined within his cabin.\n\nCHAPTER 22\nMerry Christmas.\n\nAt length, towards noon, upon the final dismissal of the ship's riggers, and after the Pequod had been hauled out from the wharf, and after the ever-thoughtful Charity had come off in a whale-boat, with her last gift  a night-cap for Stubb, the second mate, her brother-in-law, and a spare Bible for the steward  after all this, the two Captains, Peleg and Bildad, issued from the cabin, and turning to the chief mate, Peleg said:\n\n\"Now, Mr. Starbuck, are you sure everything is right? Captain Ahab is all ready  just spoke to him  nothing more to be got from shore, eh? Well, call all hands, then. Muster 'em aft here  blast 'em!\"\n\n\"No need of profane words, however great the hurry, Peleg,\" said Bildad, \"but away with thee, friend Starbuck, and do our bidding.\"\n\nHow now! Here upon the very point of starting for the voyage, Captain Peleg and Captain Bildad were going it with a high hand on the quarter-deck, just as if they were to be joint-commanders at sea, as well as to all appearances in port. And, as for Captain Ahab, no sign of him was yet to be seen; only, they said he was in the cabin. But then, the idea was, that his presence was by no means necessary in getting the ship under weigh, and steering her well out to sea. Indeed, as that was not at all his proper business, but the pilot's; and as he was not yet completely recovered  so they said  therefore, Captain Ahab stayed below. And all this seemed natural enough; especially as in the merchant service many captains never show themselves on deck for a considerable time after heaving up the anchor, but remain over the cabin table, having a farewell merry-making with their shore friends, before they quit the ship for good with the pilot.\n\nBut there was not much chance to think over the matter, for Captain Peleg was now all alive. He seemed to do most of the talking and commanding, and not Bildad.\n\n\"Aft here, ye sons of bachelors,\" he cried, as the sailors lingered at the main-mast. \"Mr. Starbuck, drive'em aft.\"\n\n\"Strike the tent there!\"  was the next order. As I hinted before, this whalebone marquee was never pitched except in port; and on board the Pequod, for thirty years, the order to strike the tent was well known to be the next thing to heaving up the anchor.\n\n\"Man the capstan! Blood and thunder!  jump!\"  was the next command, and the crew sprang for the handspikes.\n\nNow in getting under weigh, the station generally occupied by the pilot is the forward part of the ship. And here Bildad, who, with Peleg, be it known, in addition to his other officers, was one of the licensed pilots of the port  he being suspected to have got himself made a pilot in order to save the Nantucket pilot-fee to all the ships he was concerned in, for he never piloted any other craft  Bildad, I say, might now be seen actively engaged in looking over the bows for the approaching anchor, and at intervals singing what seemed a dismal stave of psalmody, to cheer the hands at the windlass, who roared forth some sort of a chorus about the girls in Booble Alley, with hearty good will. Nevertheless, not three days previous, Bildad had told them that no profane songs would be allowed on board the Pequod, particularly in getting under weigh; and Charity, his sister, had placed a small choice copy of Watts in each seaman's berth.\n\nMeantime, overseeing the other part of the ship, Captain Peleg ripped and swore astern in the most frightful manner. I almost thought he would sink the ship before the anchor could be got up; involuntarily I paused on my handspike, and told Queequeg to do the same, thinking of the perils we both ran, in starting on the voyage with such a devil for a pilot. I was comforting myself, however, with the thought that in pious Bildad might be found some salvation, spite of his seven hundred and seventy-seventh lay; when I felt a sudden sharp poke in my rear, and turning round, was horrified at the apparition of Captain Peleg in the act of withdrawing his leg from my immediate vicinity. That was my first kick.\n\n\"Is that the way they heave in the marchant service?\" he roared. \"Spring, thou sheep-head; spring, and break thy backbone! Why don't ye spring, I say, all of ye  spring! Quohog! spring, thou chap with the red whiskers; spring there, Scotch-cap; spring, thou green pants. Spring, I say, all of ye, and spring your eyes out!\" And so saying, he moved along the windlass, here and there using his leg very freely, while imperturbable Bildad kept leading off with his psalmody. Thinks I, Captain Peleg must have been drinking something to-day.\n\nAt last the anchor was up, the sails were set, and off we glided. It was a short, cold Christmas; and as the short northern day merged into night, we found ourselves almost broad upon the wintry ocean, whose freezing spray cased us in ice, as in polished armor. The long rows of teeth on the bulwarks glistened in the moonlight; and like the white ivory tusks of some huge elephant, vast curving icicles depended from the bows.\n\nLank Bildad, as pilot, headed the first watch, and ever and anon, as the old craft deep dived into the green seas, and sent the shivering frost all over her, and the winds howled, and the cordage rang, his steady notes were heard, \n\n\"Sweet fields beyond the swelling flood,\nStand dressed in living green.\nSo to the Jews old Canaan stood,\nWhile Jordan rolled between.\"\n\nNever did those sweet words sound more sweetly to me than then. They were full of hope and fruition. Spite of this frigid winter night in the boisterous Atlantic, spite of my wet feet and wetter jacket, there was yet, it then seemed to me, many a pleasant haven in store; and meads and glades so eternally vernal, that the grass shot up by the spring, untrodden, unwilted, remains at midsummer.\n\nAt last we gained such an offing, that the two pilots were needed no longer. The stout sail-boat that had accompanied us began ranging alongside.\n\nIt was curious and not unpleasing, how Peleg and Bildad were affected at this juncture, especially Captain Bildad. For loath to depart, yet; very loath to leave, for good, a ship bound on so long and perilous a voyage  beyond both stormy Capes; a ship in which some thousands of his hard earned dollars were invested; a ship, in which an old shipmate sailed as captain; a man almost as old as he, once more starting to encounter all the terrors of the pitiless jaw; loath to say good-bye to a thing so every way brimful of every interest to him,  poor old Bildad lingered long; paced the deck with anxious strides; ran down into the cabin to speak another farewell word there; again came on deck, and looked to windward; looked towards the wide and endless waters, only bounded by the far-off unseen Eastern Continents; looked towards the land; looked aloft; looked right and left; looked everywhere and nowhere; and at last, mechanically coiling a rope upon its pin, convulsively grasped stout Peleg by the hand, and holding up a lantern, for a moment stood gazing heroically in his face, as much as to say, \"Nevertheless, friend Peleg, I can stand it; yes, I can.\"\n\nAs for Peleg himself, he took it more like a philosopher; but for all his philosophy, there was a tear twinkling in his eye, when the lantern came too near. And he, too, did not a little run from cabin to deck  now a word below, and now a word with Starbuck, the chief mate.\n\nBut, at last, he turned to his comrade, with a final sort of look about him,  \"Captain Bildad  come, old shipmate, we must go. Back the main-yard there! Boat ahoy! Stand by to come close alongside, now! Careful, careful!  come, Bildad, boy  say your last. Luck to ye, Starbuck  luck to ye, Mr. Stubb  luck to ye, Mr. Flask  good-bye and good luck to ye all  and this day three years I'll have a hot supper smoking for ye in old Nantucket. Hurrah and away!\"\n\n\"God bless ye, and have ye in His holy keeping, men,\" murmured old Bildad, almost incoherently. \"I hope ye'll have fine weather now, so that Captain Ahab may soon be moving among ye  a pleasant sun is all he needs, and ye'll have plenty of them in the tropic voyage ye go. Be careful in the hunt, ye mates. Don't stave the boats needlessly, ye harpooneers; good white cedar plank is raised full three per cent. within the year. Don't forget your prayers, either. Mr. Starbuck, mind that cooper don't waste the spare staves. Oh! the sail-needles are in the green locker! Don't whale it too much a' Lord's days, men; but don't miss a fair chance either, that's rejecting Heaven's good gifts. Have an eye to the molasses tierce, Mr. Stubb; it was a little leaky, I thought. If ye touch at the islands, Mr. Flask, beware of fornication. Good-bye, good-bye! Don't keep that cheese too long down in the hold, Mr. Starbuck; it'll spoil. Be careful with the butter  twenty cents the pound it was, and mind ye, if  \"\n\n\"Come, come, Captain Bildad; stop palavering,  away!\" and with that, Peleg hurried him over the side, and both dropt into the boat.\n\nShip and boat diverged; the cold, damp night breeze blew between; a screaming gull flew overhead; the two hulls wildly rolled; we gave three heavy-hearted cheers, and blindly plunged like fate into the lone Atlantic.\n\nCHAPTER 23\nThe Lee Shore.\n\nSome chapters back, one Bulkington was spoken of, a tall, newlanded mariner, encountered in New Bedford at the inn.\n\nWhen on that shivering winter's night, the Pequod thrust her vindictive bows into the cold malicious waves, who should I see standing at her helm but Bulkington! I looked with sympathetic awe and fearfulness upon the man, who in mid-winter just landed from a four years' dangerous voyage, could so unrestingly push off again for still another tempestuous term. The land seemed scorching to his feet. Wonderfullest things are ever the unmentionable; deep memories yield no epitaphs; this six-inch chapter is the stoneless grave of Bulkington. Let me only say that it fared with him as with the storm-tossed ship, that miserably drives along the leeward land. The port would fain give succor; the port is pitiful; in the port is safety, comfort, hearthstone, supper, warm blankets, friends, all that's kind to our mortalities. But in that gale, the port, the land, is that ship's direst jeopardy; she must fly all hospitality; one touch of land, though it but graze the keel, would make her shudder through and through. With all her might she crowds all sail off shore; in so doing, fights 'gainst the very winds that fain would blow her homeward; seeks all the lashed sea's landlessness again; for refuge's sake forlornly rushing into peril; her only friend her bitterest foe!\n\nKnow ye now, Bulkington? Glimpses do ye seem to see of that mortally intolerable truth; that all deep, earnest thinking is but the intrepid effort of the soul to keep the open independence of her sea; while the wildest winds of heaven and earth conspire to cast her on the treacherous, slavish shore?\n\nBut as in landlessness alone resides highest truth, shoreless, indefinite as God  so, better is it to perish in that howling infinite, than be ingloriously dashed upon the lee, even if that were safety! For worm-like, then, oh! who would craven crawl to land! Terrors of the terrible! is all this agony so vain? Take heart, take heart, O Bulkington! Bear thee grimly, demigod! Up from the spray of thy ocean-perishing  straight up, leaps thy apotheosis!\n\nCHAPTER 24\nThe Advocate.\n\nAs Queequeg and I are now fairly embarked in this business of whaling; and as this business of whaling has somehow come to be regarded among landsmen as a rather unpoetical and disreputable pursuit; therefore, I am all anxiety to convince ye, ye landsmen, of the injustice hereby done to us hunters of whales.\n\nIn the first place, it may be deemed almost superfluous to establish the fact, that among people at large, the business of whaling is not accounted on a level with what are called the liberal professions. If a stranger were introduced into any miscellaneous metropolitan society, it would but slightly advance the general opinion of his merits, were he presented to the company as a harpooneer, say; and if in emulation of the naval officers he should append the initials S.W.F. (Sperm Whale Fishery) to his visiting card, such a procedure would be deemed pre-eminently presuming and ridiculous.\n\nDoubtless one leading reason why the world declines honouring us whalemen, is this: they think that, at best, our vocation amounts to a butchering sort of business; and that when actively engaged therein, we are surrounded by all manner of defilements. Butchers we are, that is true. But butchers, also, and butchers of the bloodiest badge have been all Martial Commanders whom the world invariably delights to honour. And as for the matter of the alleged uncleanliness of our business, ye shall soon be initiated into certain facts hitherto pretty generally unknown, and which, upon the whole, will triumphantly plant the sperm whale-ship at least among the cleanliest things of this tidy earth. But even granting the charge in question to be true; what disordered slippery decks of a whale-ship are comparable to the unspeakable carrion of those battle-fields from which so many soldiers return to drink in all ladies' plaudits? And if the idea of peril so much enhances the popular conceit of the soldier's profession; let me assure ye that many a veteran who has freely marched up to a battery, would quickly recoil at the apparition of the sperm whale's vast tail, fanning into eddies the air over his head. For what are the comprehensible terrors of man compared with the interlinked terrors and wonders of God!\n\nBut, though the world scouts at us whale hunters, yet does it unwittingly pay us the profoundest homage; yea, an all-abounding adoration! for almost all the tapers, lamps, and candles that burn round the globe, burn, as before so many shrines, to our glory!\n\nBut look at this matter in other lights; weigh it in all sorts of scales; see what we whalemen are, and have been.\n\nWhy did the Dutch in De Witt's time have admirals of their whaling fleets? Why did Louis XVI. of France, at his own personal expense, fit out whaling ships from Dunkirk, and politely invite to that town some score or two of families from our own island of Nantucket? Why did Britain between the years 1750 and 1788 pay to her whalemen in bounties upwards of 1,000,000? And lastly, how comes it that we whalemen of America now outnumber all the rest of the banded whalemen in the world; sail a navy of upwards of seven hundred vessels; manned by eighteen thousand men; yearly consuming 4,000,000 of dollars; the ships worth, at the time of sailing, $20,000,000! and every year importing into our harbors a well reaped harvest of $7,000,000. How comes all this, if there be not something puissant in whaling?\n\nBut this is not the half; look again.\n\nI freely assert, that the cosmopolite philosopher cannot, for his life, point out one single peaceful influence, which within the last sixty years has operated more potentially upon the whole broad world, taken in one aggregate, than the high and mighty business of whaling. One way and another, it has begotten events so remarkable in themselves, and so continuously momentous in their sequential issues, that whaling may well be regarded as that Egyptian mother, who bore offspring themselves pregnant from her womb. It would be a hopeless, endless task to catalogue all these things. Let a handful suffice. For many years past the whale-ship has been the pioneer in ferreting out the remotest and least known parts of the earth. She has explored seas and archipelagoes which had no chart, where no Cook or Vancouver had ever sailed. If American and European men-of-war now peacefully ride in once savage harbors, let them fire salutes to the honour and glory of the whale-ship, which originally showed them the way, and first interpreted between them and the savages. They may celebrate as they will the heroes of Exploring Expeditions, your Cooks, your Krusensterns; but I say that scores of anonymous Captains have sailed out of Nantucket, that were as great, and greater than your Cook and your Krusenstern. For in their succourless empty-handedness, they, in the heathenish sharked waters, and by the beaches of unrecorded, javelin islands, battled with virgin wonders and terrors that Cook with all his marines and muskets would not willingly have dared. All that is made such a flourish of in the old South Sea Voyages, those things were but the life-time commonplaces of our heroic Nantucketers. Often, adventures which Vancouver dedicates three chapters to, these men accounted unworthy of being set down in the ship's common log. Ah, the world! Oh, the world!\n\nUntil the whale fishery rounded Cape Horn, no commerce but colonial, scarcely any intercourse but colonial, was carried on between Europe and the long line of the opulent Spanish provinces on the Pacific coast. It was the whaleman who first broke through the jealous policy of the Spanish crown, touching those colonies; and, if space permitted, it might be distinctly shown how from those whalemen at last eventuated the liberation of Peru, Chili, and Bolivia from the yoke of Old Spain, and the establishment of the eternal democracy in those parts.\n\nThat great America on the other side of the sphere, Australia, was given to the enlightened world by the whaleman. After its first blunder-born discovery by a Dutchman, all other ships long shunned those shores as pestiferously barbarous; but the whale-ship touched there. The whale-ship is the true mother of that now mighty colony. Moreover, in the infancy of the first Australian settlement, the emigrants were several times saved from starvation by the benevolent biscuit of the whale-ship luckily dropping an anchor in their waters. The uncounted isles of all Polynesia confess the same truth, and do commercial homage to the whale-ship, that cleared the way for the missionary and the merchant, and in many cases carried the primitive missionaries to their first destinations. If that double-bolted land, Japan, is ever to become hospitable, it is the whale-ship alone to whom the credit will be due; for already she is on the threshold.\n\nBut if, in the face of all this, you still declare that whaling has no aesthetically noble associations connected with it, then am I ready to shiver fifty lances with you there, and unhorse you with a split helmet every time.\n\nThe whale has no famous author, and whaling no famous chronicler, you will say.\n\nThe whale no famous author, and whaling no famous chronicler? Who wrote the first account of our Leviathan? Who but mighty Job! And who composed the first narrative of a whaling-voyage? Who, but no less a prince than Alfred the Great, who, with his own royal pen, took down the words from Other, the Norwegian whale-hunter of those times! And who pronounced our glowing eulogy in Parliament? Who, but Edmund Burke!\n\nTrue enough, but then whalemen themselves are poor devils; they have no good blood in their veins.\n\nNo good blood in their veins? They have something better than royal blood there. The grandmother of Benjamin Franklin was Mary Morrel; afterwards, by marriage, Mary Folger, one of the old settlers of Nantucket, and the ancestress to a long line of Folgers and harpooneers  all kith and kin to noble Benjamin  this day darting the barbed iron from one side of the world to the other.\n\nGood again; but then all confess that somehow whaling is not respectable.\n\nWhaling not respectable? Whaling is imperial! By old English statutory law, the whale is declared \"a royal fish.\"\n\nOh, that's only nominal! The whale himself has never figured in any grand imposing way.\n\nThe whale never figured in any grand imposing way? In one of the mighty triumphs given to a Roman general upon his entering the world's capital, the bones of a whale, brought all the way from the Syrian coast, were the most conspicuous object in the cymballed procession.\n\nGrant it, since you cite it; but, say what you will, there is no real dignity in whaling.\n\nNo dignity in whaling? The dignity of our calling the very heavens attest. Cetus is a constellation in the South! No more! Drive down your hat in presence of the Czar, and take it off to Queequeg! No more! I know a man that, in his lifetime, has taken three hundred and fifty whales. I account that man more honourable than that great captain of antiquity who boasted of taking as many walled towns.\n\nAnd, as for me, if, by any possibility, there be any as yet undiscovered prime thing in me; if I shall ever deserve any real repute in that small but high hushed world which I might not be unreasonably ambitious of; if hereafter I shall do anything that, upon the whole, a man might rather have done than to have left undone; if, at my death, my executors, or more properly my creditors, find any precious MSS. in my desk, then here I prospectively ascribe all the honour and the glory to whaling; for a whale-ship was my Yale College and my Harvard.\n\n See subsequent chapters for something more on this head.\n\nCHAPTER 25\nPostscript.\n\nIn behalf of the dignity of whaling, I would fain advance naught but substantiated facts. But after embattling his facts, an advocate who should wholly suppress a not unreasonable surmise, which might tell eloquently upon his cause  such an advocate, would he not be blameworthy?\n\nIt is well known that at the coronation of kings and queens, even modern ones, a certain curious process of seasoning them for their functions is gone through. There is a saltcellar of state, so called, and there may be a castor of state. How they use the salt, precisely  who knows? Certain I am, however, that a king's head is solemnly oiled at his coronation, even as a head of salad. Can it be, though, that they anoint it with a view of making its interior run well, as they anoint machinery? Much might be ruminated here, concerning the essential dignity of this regal process, because in common life we esteem but meanly and contemptibly a fellow who anoints his hair, and palpably smells of that anointing. In truth, a mature man who uses hair-oil, unless medicinally, that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality.\n\nBut the only thing to be considered here, is this  what kind of oil is used at coronations? Certainly it cannot be olive oil, nor macassar oil, nor castor oil, nor bear's oil, nor train oil, nor cod-liver oil. What then can it possibly be, but sperm oil in its unmanufactured, unpolluted state, the sweetest of all oils?\n\nThink of that, ye loyal Britons! we whalemen supply your kings and queens with coronation stuff!\n\nCHAPTER 26\nKnights and Squires.\n\nThe chief mate of the Pequod was Starbuck, a native of Nantucket, and a Quaker by descent. He was a long, earnest man, and though born on an icy coast, seemed well adapted to endure hot latitudes, his flesh being hard as twice-baked biscuit. Transported to the Indies, his live blood would not spoil like bottled ale. He must have been born in some time of general drought and famine, or upon one of those fast days for which his state is famous. Only some thirty arid summers had he seen; those summers had dried up all his physical superfluousness. But this, his thinness, so to speak, seemed no more the token of wasting anxieties and cares, than it seemed the indication of any bodily blight. It was merely the condensation of the man. He was by no means ill-looking; quite the contrary. His pure tight skin was an excellent fit; and closely wrapped up in it, and embalmed with inner health and strength, like a revivified Egyptian, this Starbuck seemed prepared to endure for long ages to come, and to endure always, as now; for be it Polar snow or torrid sun, like a patent chronometer, his interior vitality was warranted to do well in all climates. Looking into his eyes, you seemed to see there the yet lingering images of those thousand-fold perils he had calmly confronted through life. A staid, steadfast man, whose life for the most part was a telling pantomime of action, and not a tame chapter of sounds. Yet, for all his hardy sobriety and fortitude, there were certain qualities in him which at times affected, and in some cases seemed well nigh to overbalance all the rest. Uncommonly conscientious for a seaman, and endued with a deep natural reverence, the wild watery loneliness of his life did therefore strongly incline him to superstition; but to that sort of superstition, which in some organizations seems rather to spring, somehow, from intelligence than from ignorance. Outward portents and inward presentiments were his. And if at times these things bent the welded iron of his soul, much more did his far-away domestic memories of his young Cape wife and child, tend to bend him still more from the original ruggedness of his nature, and open him still further to those latent influences which, in some honest-hearted men, restrain the gush of dare-devil daring, so often evinced by others in the more perilous vicissitudes of the fishery. \"I will have no man in my boat,\" said Starbuck, \"who is not afraid of a whale.\" By this, he seemed to mean, not only that the most reliable and useful courage was that which arises from the fair estimation of the encountered peril, but that an utterly fearless man is a far more dangerous comrade than a coward.\n\n\"Aye, aye,\" said Stubb, the second mate, \"Starbuck, there, is as careful a man as you'll find anywhere in this fishery.\" But we shall ere long see what that word \"careful\" precisely means when used by a man like Stubb, or almost any other whale hunter.\n\nStarbuck was no crusader after perils; in him courage was not a sentiment; but a thing simply useful to him, and always at hand upon all mortally practical occasions. Besides, he thought, perhaps, that in this business of whaling, courage was one of the great staple outfits of the ship, like her beef and her bread, and not to be foolishly wasted. Wherefore he had no fancy for lowering for whales after sun-down; nor for persisting in fighting a fish that too much persisted in fighting him. For, thought Starbuck, I am here in this critical ocean to kill whales for my living, and not to be killed by them for theirs; and that hundreds of men had been so killed Starbuck well knew. What doom was his own father's? Where, in the bottomless deeps, could he find the torn limbs of his brother?\n\nWith memories like these in him, and, moreover, given to a certain superstitiousness, as has been said; the courage of this Starbuck which could, nevertheless, still flourish, must indeed have been extreme. But it was not in reasonable nature that a man so organized, and with such terrible experiences and remembrances as he had; it was not in nature that these things should fail in latently engendering an element in him, which, under suitable circumstances, would break out from its confinement, and burn all his courage up. And brave as he might be, it was that sort of bravery chiefly, visible in some intrepid men, which, while generally abiding firm in the conflict with seas, or winds, or whales, or any of the ordinary irrational horrors of the world, yet cannot withstand those more terrific, because more spiritual terrors, which sometimes menace you from the concentrating brow of an enraged and mighty man.\n\nBut were the coming narrative to reveal in any instance, the complete abasement of poor Starbuck's fortitude, scarce might I have the heart to write it; for it is a thing most sorrowful, nay shocking, to expose the fall of valour in the soul. Men may seem detestable as joint stock-companies and nations; knaves, fools, and murderers there may be; men may have mean and meagre faces; but man, in the ideal, is so noble and so sparkling, such a grand and glowing creature, that over any ignominious blemish in him all his fellows should run to throw their costliest robes. That immaculate manliness we feel within ourselves, so far within us, that it remains intact though all the outer character seem gone; bleeds with keenest anguish at the undraped spectacle of a valor-ruined man. Nor can piety itself, at such a shameful sight, completely stifle her upbraidings against the permitting stars. But this august dignity I treat of, is not the dignity of kings and robes, but that abounding dignity which has no robed investiture. Thou shalt see it shining in the arm that wields a pick or drives a spike; that democratic dignity which, on all hands, radiates without end from God; Himself! The great God absolute! The centre and circumference of all democracy! His omnipresence, our divine equality!\n\nIf, then, to meanest mariners, and renegades and castaways, I shall hereafter ascribe high qualities, though dark; weave round them tragic graces; if even the most mournful, perchance the most abased, among them all, shall at times lift himself to the exalted mounts; if I shall touch that workman's arm with some ethereal light; if I shall spread a rainbow over his disastrous set of sun; then against all mortal critics bear me out in it, thou Just Spirit of Equality, which hast spread one royal mantle of humanity over all my kind! Bear me out in it, thou great democratic God! who didst not refuse to the swart convict, Bunyan, the pale, poetic pearl; Thou who didst clothe with doubly hammered leaves of finest gold, the stumped and paupered arm of old Cervantes; Thou who didst pick up Andrew Jackson from the pebbles; who didst hurl him upon a war-horse; who didst thunder him higher than a throne! Thou who, in all Thy mighty, earthly marchings, ever cullest Thy selectest champions from the kingly commons; bear me out in it, O God!\n\nCHAPTER 27\nKnights and Squires.\n\nStubb was the second mate. He was a native of Cape Cod; and hence, according to local usage, was called a Cape-Cod-man. A happy-go-lucky; neither craven nor valiant; taking perils as they came with an indifferent air; and while engaged in the most imminent crisis of the chase, toiling away, calm and collected as a journeyman joiner engaged for the year. Good-humored, easy, and careless, he presided over his whale-boat as if the most deadly encounter were but a dinner, and his crew all invited guests. He was as particular about the comfortable arrangement of his part of the boat, as an old stage-driver is about the snugness of his box. When close to the whale, in the very death-lock of the fight, he handled his unpitying lance coolly and off-handedly, as a whistling tinker his hammer. He would hum over his old rigadig tunes while flank and flank with the most exasperated monster. Long usage had, for this Stubb, converted the jaws of death into an easy chair. What he thought of death itself, there is no telling. Whether he ever thought of it at all, might be a question; but, if he ever did chance to cast his mind that way after a comfortable dinner, no doubt, like a good sailor, he took it to be a sort of call of the watch to tumble aloft, and bestir themselves there, about something which he would find out when he obeyed the order, and not sooner.\n\nWhat, perhaps, with other things, made Stubb such an easy-going, unfearing man, so cheerily trudging off with the burden of life in a world full of grave pedlars, all bowed to the ground with their packs; what helped to bring about that almost impious good-humor of his; that thing must have been his pipe. For, like his nose, his short, black little pipe was one of the regular features of his face. You would almost as soon have expected him to turn out of his bunk without his nose as without his pipe. He kept a whole row of pipes there ready loaded, stuck in a rack, within easy reach of his hand; and, whenever he turned in, he smoked them all out in succession, lighting one from the other to the end of the chapter; then loading them again to be in readiness anew. For, when Stubb dressed, instead of first putting his legs into his trowsers, he put his pipe into his mouth.\n\nI say this continual smoking must have been one cause, at least, of his peculiar disposition; for every one knows that this earthly air, whether ashore or afloat, is terribly infected with the nameless miseries of the numberless mortals who have died exhaling it; and as in time of the cholera, some people go about with a camphorated handkerchief to their mouths; so, likewise, against all mortal tribulations, Stubb's tobacco smoke might have operated as a sort of disinfecting agent.\n\nThe third mate was Flask, a native of Tisbury, in Martha's Vineyard. A short, stout, ruddy young fellow, very pugnacious concerning whales, who somehow seemed to think that the great leviathans had personally and hereditarily affronted him; and therefore it was a sort of point of honour with him, to destroy them whenever encountered. So utterly lost was he to all sense of reverence for the many marvels of their majestic bulk and mystic ways; and so dead to anything like an apprehension of any possible danger from encountering them; that in his poor opinion, the wondrous whale was but a species of magnified mouse, or at least water-rat, requiring only a little circumvention and some small application of time and trouble in order to kill and boil. This ignorant, unconscious fearlessness of his made him a little waggish in the matter of whales; he followed these fish for the fun of it; and a three years' voyage round Cape Horn was only a jolly joke that lasted that length of time. As a carpenter's nails are divided into wrought nails and cut nails; so mankind may be similarly divided. Little Flask was one of the wrought ones; made to clinch tight and last long. They called him King-Post on board of the Pequod; because, in form, he could be well likened to the short, square timber known by that name in Arctic whalers; and which by the means of many radiating side timbers inserted into it, serves to brace the ship against the icy concussions of those battering seas.\n\nNow these three mates  Starbuck, Stubb, and Flask, were momentous men. They it was who by universal prescription commanded three of the Pequod's boats as headsmen. In that grand order of battle in which Captain Ahab would probably marshal his forces to descend on the whales, these three headsmen were as captains of companies. Or, being armed with their long keen whaling spears, they were as a picked trio of lancers; even as the harpooneers were flingers of javelins.\n\nAnd since in this famous fishery, each mate or headsman, like a Gothic Knight of old, is always accompanied by his boat-steerer or harpooneer, who in certain conjunctures provides him with a fresh lance, when the former one has been badly twisted, or elbowed in the assault; and moreover, as there generally subsists between the two, a close intimacy and friendliness; it is therefore but meet, that in this place we set down who the Pequod's harpooneers were, and to what headsman each of them belonged.\n\nFirst of all was Queequeg, whom Starbuck, the chief mate, had selected for his squire. But Queequeg is already known.\n\nNext was Tashtego, an unmixed Indian from Gay Head, the most westerly promontory of Martha's Vineyard, where there still exists the last remnant of a village of red men, which has long supplied the neighboring island of Nantucket with many of her most daring harpooneers. In the fishery, they usually go by the generic name of Gay-Headers. Tashtego's long, lean, sable hair, his high cheek bones, and black rounding eyes  for an Indian, Oriental in their largeness, but Antarctic in their glittering expression  all this sufficiently proclaimed him an inheritor of the unvitiated blood of those proud warrior hunters, who, in quest of the great New England moose, had scoured, bow in hand, the aboriginal forests of the main. But no longer snuffing in the trail of the wild beasts of the woodland, Tashtego now hunted in the wake of the great whales of the sea; the unerring harpoon of the son fitly replacing the infallible arrow of the sires. To look at the tawny brawn of his lithe snaky limbs, you would almost have credited the superstitions of some of the earlier Puritans, and half-believed this wild Indian to be a son of the Prince of the Powers of the Air. Tashtego was Stubb the second mate's squire.\n\nThird among the harpooneers was Daggoo, a gigantic, coal-black negro-savage, with a lion-like tread  an Ahasuerus to behold. Suspended from his ears were two golden hoops, so large that the sailors called them ring-bolts, and would talk of securing the top-sail halyards to them. In his youth Daggoo had voluntarily shipped on board of a whaler, lying in a lonely bay on his native coast. And never having been anywhere in the world but in Africa, Nantucket, and the pagan harbors most frequented by whalemen; and having now led for many years the bold life of the fishery in the ships of owners uncommonly heedful of what manner of men they shipped; Daggoo retained all his barbaric virtues, and erect as a giraffe, moved about the decks in all the pomp of six feet five in his socks. There was a corporeal humility in looking up at him; and a white man standing before him seemed a white flag come to beg truce of a fortress. Curious to tell, this imperial negro, Ahasuerus Daggoo, was the Squire of little Flask, who looked like a chess-man beside him. As for the residue of the Pequod's company, be it said, that at the present day not one in two of the many thousand men before the mast employed in the American whale fishery, are Americans born, though pretty nearly all the officers are. Herein it is the same with the American whale fishery as with the American army and military and merchant navies, and the engineering forces employed in the construction of the American Canals and Railroads. The same, I say, because in all these cases the native American liberally provides the brains, the rest of the world as generously supplying the muscles. No small number of these whaling seamen belong to the Azores, where the outward bound Nantucket whalers frequently touch to augment their crews from the hardy peasants of those rocky shores. In like manner, the Greenland whalers sailing out of Hull or London, put in at the Shetland Islands, to receive the full complement of their crew. Upon the passage homewards, they drop them there again. How it is, there is no telling, but Islanders seem to make the best whalemen. They were nearly all Islanders in the Pequod, Isolatoes too, I call such, not acknowledging the common continent of men, but each Isolato living on a separate continent of his own. Yet now, federated along one keel, what a set these Isolatoes were! An Anacharsis Clootz deputation from all the isles of the sea, and all the ends of the earth, accompanying Old Ahab in the Pequod to lay the world's grievances before that bar from which not very many of them ever come back. Black Little Pip  he never did  oh, no! he went before. Poor Alabama boy! On the grim Pequod's forecastle, ye shall ere long see him, beating his tambourine; prelusive of the eternal time, when sent for, to the great quarter-deck on high, he was bid strike in with angels, and beat his tambourine in glory; called a coward here, hailed a hero there!\n\nCHAPTER 28\nAhab.\n\nFor several days after leaving Nantucket, nothing above hatches was seen of Captain Ahab. The mates regularly relieved each other at the watches, and for aught that could be seen to the contrary, they seemed to be the only commanders of the ship; only they sometimes issued from the cabin with orders so sudden and peremptory, that after all it was plain they but commanded vicariously. Yes, their supreme lord and dictator was there, though hitherto unseen by any eyes not permitted to penetrate into the now sacred retreat of the cabin.\n\nEvery time I ascended to the deck from my watches below, I instantly gazed aft to mark if any strange face were visible; for my first vague disquietude touching the unknown captain, now in the seclusion of the sea, became almost a perturbation. This was strangely heightened at times by the ragged Elijah's diabolical incoherences uninvitedly recurring to me, with a subtle energy I could not have before conceived of. But poorly could I withstand them, much as in other moods I was almost ready to smile at the solemn whimsicalities of that outlandish prophet of the wharves. But whatever it was of apprehensiveness or uneasiness  to call it so  which I felt, yet whenever I came to look about me in the ship, it seemed against all warrantry to cherish such emotions. For though the harpooneers, with the great body of the crew, were a far more barbaric, heathenish, and motley set than any of the tame merchant-ship companies which my previous experiences had made me acquainted with, still I ascribed this  and rightly ascribed it  to the fierce uniqueness of the very nature of that wild Scandinavian vocation in which I had so abandonedly embarked. But it was especially the aspect of the three chief officers of the ship, the mates, which was most forcibly calculated to allay these colourless misgivings, and induce confidence and cheerfulness in every presentment of the voyage. Three better, more likely sea-officers and men, each in his own different way, could not readily be found, and they were every one of them Americans; a Nantucketer, a Vineyarder, a Cape man. Now, it being Christmas when the ship shot from out her harbor, for a space we had biting Polar weather, though all the time running away from it to the southward; and by every degree and minute of latitude which we sailed, gradually leaving that merciless winter, and all its intolerable weather behind us. It was one of those less lowering, but still grey and gloomy enough mornings of the transition, when with a fair wind the ship was rushing through the water with a vindictive sort of leaping and melancholy rapidity, that as I mounted to the deck at the call of the forenoon watch, so soon as I levelled my glance towards the taffrail, foreboding shivers ran over me. Reality outran apprehension; Captain Ahab stood upon his quarter-deck.\n\nThere seemed no sign of common bodily illness about him, nor of the recovery from any. He looked like a man cut away from the stake, when the fire has overrunningly wasted all the limbs without consuming them, or taking away one particle from their compacted aged robustness. His whole high, broad form, seemed made of solid bronze, and shaped in an unalterable mould, like Cellini's cast Perseus. Threading its way out from among his grey hairs, and continuing right down one side of his tawny scorched face and neck, till it disappeared in his clothing, you saw a slender rod-like mark, lividly whitish. It resembled that perpendicular seam sometimes made in the straight, lofty trunk of a great tree, when the upper lightning tearingly darts down it, and without wrenching a single twig, peels and grooves out the bark from top to bottom, ere running off into the soil, leaving the tree still greenly alive, but branded. Whether that mark was born with him, or whether it was the scar left by some desperate wound, no one could certainly say. By some tacit consent, throughout the voyage little or no allusion was made to it, especially by the mates. But once Tashtego's senior, an old Gay-Head Indian among the crew, superstitiously asserted that not till he was full forty years old did Ahab become that way branded, and then it came upon him, not in the fury of any mortal fray, but in an elemental strife at sea. Yet, this wild hint seemed inferentially negatived, by what a grey Manxman insinuated, an old sepulchral man, who, having never before sailed out of Nantucket, had never ere this laid eye upon wild Ahab. Nevertheless, the old sea-traditions, the immemorial credulities, popularly invested this old Manxman with preternatural powers of discernment. So that no white sailor seriously contradicted him when he said that if ever Captain Ahab should be tranquilly laid out  which might hardly come to pass, so he muttered  then, whoever should do that last office for the dead, would find a birth-mark on him from crown to sole.\n\nSo powerfully did the whole grim aspect of Ahab affect me, and the livid brand which streaked it, that for the first few moments I hardly noted that not a little of this overbearing grimness was owing to the barbaric white leg upon which he partly stood. It had previously come to me that this ivory leg had at sea been fashioned from the polished bone of the sperm whale's jaw. \"Aye, he was dismasted off Japan,\" said the old Gay-Head Indian once; \"but like his dismasted craft, he shipped another mast without coming home for it. He has a quiver of 'em.\"\n\nI was struck with the singular posture he maintained. Upon each side of the Pequod's quarter deck, and pretty close to the mizzen shrouds, there was an auger hole, bored about half an inch or so, into the plank. His bone leg steadied in that hole; one arm elevated, and holding by a shroud; Captain Ahab stood erect, looking straight out beyond the ship's ever-pitching prow. There was an infinity of firmest fortitude, a determinate, unsurrenderable wilfulness, in the fixed and fearless, forward dedication of that glance. Not a word he spoke; nor did his officers say aught to him; though by all their minutest gestures and expressions, they plainly showed the uneasy, if not painful, consciousness of being under a troubled master-eye. And not only that, but moody stricken Ahab stood before them with a crucifixion in his face; in all the nameless regal overbearing dignity of some mighty woe.\n\nEre long, from his first visit in the air, he withdrew into his cabin. But after that morning, he was every day visible to the crew; either standing in his pivot-hole, or seated upon an ivory stool he had; or heavily walking the deck. As the sky grew less gloomy; indeed, began to grow a little genial, he became still less and less a recluse; as if, when the ship had sailed from home, nothing but the dead wintry bleakness of the sea had then kept him so secluded. And, by and by, it came to pass, that he was almost continually in the air; but, as yet, for all that he said, or perceptibly did, on the at last sunny deck, he seemed as unnecessary there as another mast. But the Pequod was only making a passage now; not regularly cruising; nearly all whaling preparatives needing supervision the mates were fully competent to, so that there was little or nothing, out of himself, to employ or excite Ahab, now; and thus chase away, for that one interval, the clouds that layer upon layer were piled upon his brow, as ever all clouds choose the loftiest peaks to pile themselves upon.\n\nNevertheless, ere long, the warm, warbling persuasiveness of the pleasant, holiday weather we came to, seemed gradually to charm him from his mood. For, as when the red-cheeked, dancing girls, April and May, trip home to the wintry, misanthropic woods; even the barest, ruggedest, most thunder-cloven old oak will at least send forth some few green sprouts, to welcome such glad-hearted visitants; so Ahab did, in the end, a little respond to the playful allurings of that girlish air. More than once did he put forth the faint blossom of a look, which, in any other man, would have soon flowered out in a smile.\n\nCHAPTER 29\nEnter Ahab; to Him, Stubb.\n\nSome days elapsed, and ice and icebergs all astern, the Pequod now went rolling through the bright Quito spring, which, at sea, almost perpetually reigns on the threshold of the eternal August of the Tropic. The warmly cool, clear, ringing, perfumed, overflowing, redundant days, were as crystal goblets of Persian sherbet, heaped up  flaked up, with rose-water snow. The starred and stately nights seemed haughty dames in jewelled velvets, nursing at home in lonely pride, the memory of their absent conquering Earls, the golden helmeted suns! For sleeping man, 'twas hard to choose between such winsome days and such seducing nights. But all the witcheries of that unwaning weather did not merely lend new spells and potencies to the outward world. Inward they turned upon the soul, especially when the still mild hours of eve came on; then, memory shot her crystals as the clear ice most forms of noiseless twilights. And all these subtle agencies, more and more they wrought on Ahab's texture.\n\nOld age is always wakeful; as if, the longer linked with life, the less man has to do with aught that looks like death. Among sea-commanders, the old greybeards will oftenest leave their berths to visit the night-cloaked deck. It was so with Ahab; only that now, of late, he seemed so much to live in the open air, that truly speaking, his visits were more to the cabin, than from the cabin to the planks. \"It feels like going down into one's tomb,\"  he would mutter to himself  \"for an old captain like me to be descending this narrow scuttle, to go to my grave-dug berth.\"\n\nSo, almost every twenty-four hours, when the watches of the night were set, and the band on deck sentinelled the slumbers of the band below; and when if a rope was to be hauled upon the forecastle, the sailors flung it not rudely down, as by day, but with some cautiousness dropt it to its place for fear of disturbing their slumbering shipmates; when this sort of steady quietude would begin to prevail, habitually, the silent steersman would watch the cabin-scuttle; and ere long the old man would emerge, gripping at the iron banister, to help his crippled way. Some considering touch of humanity was in him; for at times like these, he usually abstained from patrolling the quarter-deck; because to his wearied mates, seeking repose within six inches of his ivory heel, such would have been the reverberating crack and din of that bony step, that their dreams would have been on the crunching teeth of sharks. But once, the mood was on him too deep for common regardings; and as with heavy, lumber-like pace he was measuring the ship from taffrail to mainmast, Stubb, the old second mate, came up from below, with a certain unassured, deprecating humorousness, hinted that if Captain Ahab was pleased to walk the planks, then, no one could say nay; but there might be some way of muffling the noise; hinting something indistinctly and hesitatingly about a globe of tow, and the insertion into it, of the ivory heel. Ah! Stubb, thou didst not know Ahab then.\n\n\"Am I a cannon-ball, Stubb,\" said Ahab, \"that thou wouldst wad me that fashion? But go thy ways; I had forgot. Below to thy nightly grave; where such as ye sleep between shrouds, to use ye to the filling one at last.  Down, dog, and kennel!\"\n\nStarting at the unforseen concluding exclamation of the so suddenly scornful old man, Stubb was speechless a moment; then said excitedly, \"I am not used to be spoken to that way, sir; I do but less than half like it, sir.\"\n\n\"Avast! gritted Ahab between his set teeth, and violently moving away, as if to avoid some passionate temptation.\n\n\"No, sir; not yet,\" said Stubb, emboldened, \"I will not tamely be called a dog, sir.\"\n\n\"Then be called ten times a donkey, and a mule, and an ass, and begone, or I'll clear the world of thee!\"\n\nAs he said this, Ahab advanced upon him with such overbearing terrors in his aspect, that Stubb involuntarily retreated.\n\n\"I was never served so before without giving a hard blow for it,\" muttered Stubb, as he found himself descending the cabin-scuttle. \"It's very queer. Stop, Stubb; somehow, now, I don't well know whether to go back and strike him, or  what's that?  down here on my knees and pray for him? Yes, that was the thought coming up in me; but it would be the first time I ever did pray. It's queer; very queer; and he's queer too; aye, take him fore and aft, he's about the queerest old man Stubb ever sailed with. How he flashed at me!  his eyes like powder-pans! is he mad? Anyway there's something on his mind, as sure as there must be something on a deck when it cracks. He aint in his bed now, either, more than three hours out of the twenty-four; and he don't sleep then. Didn't that Dough-Boy, the steward, tell me that of a morning he always finds the old man's hammock clothes all rumpled and tumbled, and the sheets down at the foot, and the coverlid almost tied into knots, and the pillow a sort of frightful hot, as though a baked brick had been on it? A hot old man! I guess he's got what some folks ashore call a conscience; it's a kind of Tic-Dolly-row they say  worse nor a toothache. Well, well; I don't know what it is, but the Lord keep me from catching it. He's full of riddles; I wonder what he goes into the after hold for, every night, as Dough-Boy tells me he suspects; what's that for, I should like to know? Who's made appointments with him in the hold? Ain't that queer, now? But there's no telling, it's the old game  Here goes for a snooze. Damn me, it's worth a fellow's while to be born into the world, if only to fall right asleep. And now that I think of it, that's about the first thing babies do, and that's a sort of queer, too. Damn me, but all things are queer, come to think of 'em. But that's against my principles. Think not, is my eleventh commandment; and sleep when you can, is my twelfth  So here goes again. But how's that? didn't he call me a dog? blazes! he called me ten times a donkey, and piled a lot of jackasses on top of that! He might as well have kicked me, and done with it. Maybe he did kick me, and I didn't observe it, I was so taken all aback with his brow, somehow. It flashed like a bleached bone. What the devil's the matter with me? I don't stand right on my legs. Coming afoul of that old man has a sort of turned me wrong side out. By the Lord, I must have been dreaming, though  How? how? how?  but the only way's to stash it; so here goes to hammock again; and in the morning, I'll see how this plaguey juggling thinks over by daylight.\"\n\nCHAPTER 30\nThe Pipe.\n\nWhen Stubb had departed, Ahab stood for a while leaning over the bulwarks; and then, as had been usual with him of late, calling a sailor of the watch, he sent him below for his ivory stool, and also his pipe. Lighting the pipe at the binnacle lamp and planting the stool on the weather side of the deck, he sat and smoked.\n\nIn old Norse times, the thrones of the sea-loving Danish kings were fabricated, saith tradition, of the tusks of the narwhale. How could one look at Ahab then, seated on that tripod of bones, without bethinking him of the royalty it symbolized? For a Khan of the plank, and a king of the sea, and a great lord of Leviathans was Ahab.\n\nSome moments passed, during which the thick vapour came from his mouth in quick and constant puffs, which blew back again into his face. \"How now,\" he soliloquized at last, withdrawing the tube, \"this smoking no longer soothes. Oh, my pipe! hard must it go with me if thy charm be gone! Here have I been unconsciously toiling, not pleasuring  aye, and ignorantly smoking to windward all the while; to windward, and with such nervous whiffs, as if, like the dying whale, my final jets were the strongest and fullest of trouble. What business have I with this pipe? This thing that is meant for sereneness, to send up mild white vapours among mild white hairs, not among torn iron-grey locks like mine. I'll smoke no more  \"\n\nHe tossed the still lighted pipe into the sea. The fire hissed in the waves; the same instant the ship shot by the bubble the sinking pipe made. With slouched hat, Ahab lurchingly paced the planks.\n\nCHAPTER 31\nQueen Mab.\n\nNext morning Stubb accosted Flask.\n\n\"Such a queer dream, King-Post, I never had. You know the old man's ivory leg, well I dreamed he kicked me with it; and when I tried to kick back, upon my soul, my little man, I kicked my leg right off! And then, presto! Ahab seemed a pyramid, and I, like a blazing fool, kept kicking at it. But what was still more curious, Flask  you know how curious all dreams are  through all this rage that I was in, I somehow seemed to be thinking to myself, that after all, it was not much of an insult, that kick from Ahab. 'Why,' thinks I, 'what's the row? It's not a real leg, only a false leg.' And there's a mighty difference between a living thump and a dead thump. That's what makes a blow from the hand, Flask, fifty times more savage to bear than a blow from a cane. The living member  that makes the living insult, my little man. And thinks I to myself all the while, mind, while I was stubbing my silly toes against that cursed pyramid  so confoundedly contradictory was it all, all the while, I say, I was thinking to myself, 'what's his leg now, but a cane  a whalebone cane. Yes,' thinks I, 'it was only a playful cudgelling  in fact, only a whaleboning that he gave me  not a base kick. Besides,' thinks I, 'look at it once; why, the end of it  the foot part  what a small sort of end it is; whereas, if a broad footed farmer kicked me, there's a devilish broad insult. But this insult is whittled down to a point only.' But now comes the greatest joke of the dream, Flask. While I was battering away at the pyramid, a sort of badger-haired old merman, with a hump on his back, takes me by the shoulders, and slews me round. 'What are you 'bout?' says he. Slid! man, but I was frightened. Such a phiz! But, somehow, next moment I was over the fright. 'What am I about?' says I at last. 'And what business is that of yours, I should like to know, Mr. Humpback? Do you want a kick?' By the lord, Flask, I had no sooner said that, than he turned round his stern to me, bent over, and dragging up a lot of seaweed he had for a clout  what do you think, I saw?  why thunder alive, man, his stern was stuck full of marlinspikes, with the points out. Says I, on second thoughts, 'I guess I won't kick you, old fellow.' 'Wise Stubb,' said he, 'wise Stubb;' and kept muttering it all the time, a sort of eating of his own gums like a chimney hag. Seeing he wasn't going to stop saying over his 'wise Stubb, wise Stubb,' I thought I might as well fall to kicking the pyramid again. But I had only just lifted my foot for it, when he roared out, 'Stop that kicking!' 'Halloa,' says I, 'what's the matter now, old fellow?' 'Look ye here,' says he; 'let's argue the insult. Captain Ahab kicked ye, didn't he?' 'Yes, he did,' says I  'right here it was.' 'Very good,' says he  'he used his ivory leg, didn't he?' 'Yes, he did,' says I. 'Well then,' says he, 'wise Stubb, what have you to complain of? Didn't he kick with right good will? it wasn't a common pitch pine leg he kicked with, was it? No, you were kicked by a great man, and with a beautiful ivory leg, Stubb. It's an honour; I consider it an honour. Listen, wise Stubb. In old England the greatest lords think it great glory to be slapped by a queen, and made garter-knights of; but, be your boast, Stubb, that ye were kicked by old Ahab, and made a wise man of. Remember what I say; be kicked by him; account his kicks honours; and on no account kick back; for you can't help yourself, wise Stubb. Don't you see that pyramid?' With that, he all of a sudden seemed somehow, in some queer fashion, to swim off into the air. I snored; rolled over; and there I was in my hammock! Now, what do you think of that dream, Flask?\"\n\n\"I don't know; it seems a sort of foolish to me, tho.'\"\n\n\"May be; may be. But it's made a wise man of me, Flask. D'ye see Ahab standing there, sideways looking over the stern? Well, the best thing you can do, Flask, is to let the old man alone; never speak to him, whatever he says. Halloa! What's that he shouts? Hark!\"\n\n\"Mast-head, there! Look sharp, all of ye! There are whales hereabouts!\n\nIf ye see a white one, split your lungs for him!\n\n\"What do you think of that now, Flask? ain't there a small drop of something queer about that, eh? A white whale  did ye mark that, man? Look ye  there's something special in the wind. Stand by for it, Flask. Ahab has that that's bloody on his mind. But, mum; he comes this way.\"\n\nCHAPTER 32\nCetology.\n\nAlready we are boldly launched upon the deep; but soon we shall be lost in its unshored, harbourless immensities. Ere that come to pass; ere the Pequod's weedy hull rolls side by side with the barnacled hulls of the leviathan; at the outset it is but well to attend to a matter almost indispensable to a thorough appreciative understanding of the more special leviathanic revelations and allusions of all sorts which are to follow.\n\nIt is some systematized exhibition of the whale in his broad genera, that I would now fain put before you. Yet is it no easy task. The classification of the constituents of a chaos, nothing less is here essayed. Listen to what the best and latest authorities have laid down.\n\n\"No branch of Zoology is so much involved as that which is entitled\nCetology,\" says Captain Scoresby, A.D. 1820.\n\n\"It is not my intention, were it in my power, to enter into the\ninquiry as to the true method of dividing the cetacea into groups and\nfamilies. * * * Utter confusion exists among the historians of this\nanimal\" (sperm whale), says Surgeon Beale, A.D. 1839.\n\n\"Unfitness to pursue our research in the unfathomable waters.\"\n\"Impenetrable veil covering our knowledge of the cetacea.\" \"A field\nstrewn with thorns.\" \"All these incomplete indications but serve to\ntorture us naturalists.\"\n\nThus speak of the whale, the great Cuvier, and John Hunter, and\nLesson, those lights of zoology and anatomy. Nevertheless, though of\nreal knowledge there be little, yet of books there are a plenty; and\nso in some small degree, with cetology, or the science of whales. Many\nare the men, small and great, old and new, landsmen and seamen, who\nhave at large or in little, written of the whale. Run over a few: \nThe Authors of the Bible; Aristotle; Pliny; Aldrovandi; Sir Thomas\nBrowne; Gesner; Ray; Linnaeus; Rondeletius; Willoughby; Green; Artedi;\nSibbald; Brisson; Marten; Lacepede; Bonneterre; Desmarest; Baron\nCuvier; Frederick Cuvier; John Hunter; Owen; Scoresby; Beale; Bennett;\nJ. Ross Browne; the Author of Miriam Coffin; Olmstead; and the\nRev. T. Cheever. But to what ultimate generalizing purpose all these\nhave written, the above cited extracts will show.\n\nOf the names in this list of whale authors, only those following Owen\never saw living whales; and but one of them was a real professional\nharpooneer and whaleman. I mean Captain Scoresby. On the separate\nsubject of the Greenland or right-whale, he is the best existing\nauthority. But Scoresby knew nothing and says nothing of the great\nsperm whale, compared with which the Greenland whale is almost\nunworthy mentioning. And here be it said, that the Greenland whale is\nan usurper upon the throne of the seas. He is not even by any means\nthe largest of the whales. Yet, owing to the long priority of his\nclaims, and the profound ignorance which, till some seventy years\nback, invested the then fabulous or utterly unknown sperm-whale, and\nwhich ignorance to this present day still reigns in all but some few\nscientific retreats and whale-ports; this usurpation has been every\nway complete. Reference to nearly all the leviathanic allusions in the\ngreat poets of past days, will satisfy you that the Greenland whale,\nwithout one rival, was to them the monarch of the seas. But the time\nhas at last come for a new proclamation. This is Charing Cross; hear\nye! good people all,  the Greenland whale is deposed,  the great\nsperm whale now reigneth!\n\nThere are only two books in being which at all pretend to put the\nliving sperm whale before you, and at the same time, in the remotest\ndegree succeed in the attempt. Those books are Beale's and Bennett's;\nboth in their time surgeons to English South-Sea whale-ships, and both\nexact and reliable men. The original matter touching the sperm whale\nto be found in their volumes is necessarily small; but so far as it\ngoes, it is of excellent quality, though mostly confined to scientific\ndescription. As yet, however, the sperm whale, scientific or poetic,\nlives not complete in any literature. Far above all other hunted\nwhales, his is an unwritten life.\n\nNow the various species of whales need some sort of popular\ncomprehensive classification, if only an easy outline one for the\npresent, hereafter to be filled in all its departments by subsequent\nlaborers. As no better man advances to take this matter in hand, I\nhereupon offer my own poor endeavors. I promise nothing complete;\nbecause any human thing supposed to be complete, must for that very\nreason infallibly be faulty. I shall not pretend to a minute\nanatomical description of the various species, or  in this place at\nleast  to much of any description. My object here is simply to\nproject the draught of a systematization of cetology. I am the\narchitect, not the builder.\n\nBut it is a ponderous task; no ordinary letter-sorter in the\nPost-Office is equal to it. To grope down into the bottom of the sea\nafter them; to have one's hands among the unspeakable foundations,\nribs, and very pelvis of the world; this is a fearful thing. What am I\nthat I should essay to hook the nose of this leviathan! The awful\ntauntings in Job might well appal me. \"Will he the (leviathan) make a\ncovenant with thee? Behold the hope of him is vain! But I have swam\nthrough libraries and sailed through oceans; I have had to do with\nwhales with these visible hands; I am in earnest; and I will\ntry. There are some preliminaries to settle.\n\nFirst: The uncertain, unsettled condition of this science of Cetology\nis in the very vestibule attested by the fact, that in some quarters\nit still remains a moot point whether a whale be a fish. In his System\nof Nature, A.D. 1776, Linnaeus declares, \"I hereby separate the whales\nfrom the fish.\" But of my own knowledge, I know that down to the year\n1850, sharks and shad, alewives and herring, against Linnaeus's\nexpress edict, were still found dividing the possession of the same\nseas with the Leviathan.\n\nThe grounds upon which Linnaeus would fain have banished the whales\nfrom the waters, he states as follows: \"On account of their warm\nbilocular heart, their lungs, their movable eyelids, their hollow\nears, penem intrantem feminam mammis lactantem,\" and finally, \"ex lege\nnaturae jure meritoque.\" I submitted all this to my friends Simeon\nMacey and Charley Coffin, of Nantucket, both messmates of mine in a\ncertain voyage, and they united in the opinion that the reasons set\nforth were altogether insufficient. Charley profanely hinted they were\nhumbug.\n\nBe it known that, waiving all argument, I take the good old fashioned\nground that the whale is a fish, and call upon holy Jonah to back\nme. This fundamental thing settled, the next point is, in what\ninternal respect does the whale differ from other fish. Above,\nLinnaeus has given you those items. But in brief, they are these:\nlungs and warm blood; whereas, all other fish are lungless and cold\nblooded.\n\nNext: how shall we define the whale, by his obvious externals, so as\nconspicuously to label him for all time to come? To be short, then, a\nwhale is a spouting fish with a horizontal tail. There you have\nhim. However contracted, that definition is the result of expanded\nmeditation. A walrus spouts much like a whale, but the walrus is not a\nfish, because he is amphibious. But the last term of the definition is\nstill more cogent, as coupled with the first. Almost any one must have\nnoticed that all the fish familiar to landsmen have not a flat, but a\nvertical, or up-and-down tail. Whereas, among spouting fish the tail,\nthough it may be similarly shaped, invariably assumes a horizontal\nposition.\n\nBy the above definition of what a whale is, I do by no means exclude\nfrom the leviathanic brotherhood any sea creature hitherto identified\nwith the whale by the best informed Nantucketers; nor, on the other\nhand, link with it any fish hitherto authoritatively regarded as\nalien. Hence, all the smaller, spouting, and horizontal tailed fish\nmust be included in this ground-plan of Cetology. Now, then, come the\ngrand divisions of the entire whale host.\n\nFirst: According to magnitude I divide the whales into three primary\nBOOKS (subdivisible into CHAPTERS), and these shall comprehend them\nall, both small and large.\n\nI. The FOLIO WHALE; II. the OCTAVO WHALE; III. the DUODECIMO WHALE.\n\nAs the type of the FOLIO I present the Sperm Whale; of the OCTAVO, the\nGrampus; of the DUODECIMO, the Porpoise.\n\nFOLIOS. Among these I here include the following chapters:  I. The\nSperm Whale; II. the Right Whale; III. the Fin-Back Whale; IV. the\nHump-Backed Whale; V. the Razor-Back Whale; VI. the Sulphur-Bottom\nWhale.\n\nBOOK I. (Folio), CHAPTER I. (Sperm Whale).  This whale, among the\nEnglish of old vaguely known as the Trumpa whale, and the Physeter\nwhale, and the Anvil Headed whale, is the present Cachalot of the\nFrench, and the Pottsfich of the Germans, and the Macrocephalus of the\nLong Words. He is, without doubt, the largest inhabitant of the globe;\nthe most formidable of all whales to encounter; the most majestic in\naspect; and lastly, by far the most valuable in commerce; he being the\nonly creature from which that valuable substance, spermaceti, is\nobtained. All his peculiarities will, in many other places, be\nenlarged upon. It is chiefly with his name that I now have to\ndo. Philologically considered, it is absurd. Some centuries ago, when\nthe Sperm whale was almost wholly unknown in his own proper\nindividuality, and when his oil was only accidentally obtained from\nthe stranded fish; in those days spermaceti, it would seem, was\npopularly supposed to be derived from a creature identical with the\none then known in England as the Greenland or Right Whale. It was the\nidea also, that this same spermaceti was that quickening humor of the\nGreenland Whale which the first syllable of the word literally\nexpresses. In those times, also, spermaceti was exceedingly scarce,\nnot being used for light, but only as an ointment and medicament. It\nwas only to be had from the druggists as you nowadays buy an ounce of\nrhubarb. When, as I opine, in the course of time, the true nature of\nspermaceti became known, its original name was still retained by the\ndealers; no doubt to enhance its value by a notion so strangely\nsignificant of its scarcity. And so the appellation must at last have\ncome to be bestowed upon the whale from which this spermaceti was\nreally derived.\n\nBOOK I. (Folio), CHAPTER II. (Right Whale).  In one respect this is\nthe most venerable of the leviathans, being the one first regularly\nhunted by man. It yields the article commonly known as whalebone or\nbaleen; and the oil specially known as \"whale oil,\" an inferior\narticle in commerce. Among the fishermen, he is indiscriminately\ndesignated by all the following titles: The Whale; the Greenland\nWhale; the Black Whale; the Great Whale; the True Whale; the Right\nWhale. There is a deal of obscurity concerning the identity of the\nspecies thus multitudinously baptised. What then is the whale, which I\ninclude in the second species of my Folios? It is the Great Mysticetus\nof the English naturalists; the Greenland Whale of the English\nwhalemen; the Baliene Ordinaire of the French whalemen; the Growlands\nWalfish of the Swedes. It is the whale which for more than two\ncenturies past has been hunted by the Dutch and English in the Arctic\nseas; it is the whale which the American fishermen have long pursued\nin the Indian ocean, on the Brazil Banks, on the Nor' West Coast, and\nvarious other parts of the world, designated by them Right Whale\nCruising Grounds.\n\nSome pretend to see a difference between the Greenland whale of the\nEnglish and the right whale of the Americans. But they precisely agree\nin all their grand features; nor has there yet been presented a single\ndeterminate fact upon which to ground a radical distinction. It is by\nendless subdivisions based upon the most inconclusive differences,\nthat some departments of natural history become so repellingly\nintricate. The right whale will be elsewhere treated of at some\nlength, with reference to elucidating the sperm whale.\n\nBOOK I. (Folio), CHAPTER III. (Fin-Back).  Under this head I reckon\na monster which, by the various names of Fin-Back, Tall-Spout, and\nLong-John, has been seen almost in every sea and is commonly the whale\nwhose distant jet is so often descried by passengers crossing the\nAtlantic, in the New York packet-tracks. In the length he attains, and\nin his baleen, the Fin-back resembles the right whale, but is of a\nless portly girth, and a lighter colour, approaching to olive. His\ngreat lips present a cable-like aspect, formed by the intertwisting,\nslanting folds of large wrinkles. His grand distinguishing feature,\nthe fin, from which he derives his name, is often a conspicuous\nobject. This fin is some three or four feet long, growing vertically\nfrom the hinder part of the back, of an angular shape, and with a very\nsharp pointed end. Even if not the slightest other part of the\ncreature be visible, this isolated fin will, at times, be seen plainly\nprojecting from the surface. When the sea is moderately calm, and\nslightly marked with spherical ripples, and this gnomon-like fin\nstands up and casts shadows upon the wrinkled surface, it may well be\nsupposed that the watery circle surrounding it somewhat resembles a\ndial, with its style and wavy hour-lines graved on it. On that\nAhaz-dial the shadow often goes back. The Fin-Back is not\ngregarious. He seems a whale-hater, as some men are man-haters. Very\nshy; always going solitary; unexpectedly rising to the surface in the\nremotest and most sullen waters; his straight and single lofty jet\nrising like a tall misanthropic spear upon a barren plain; gifted with\nsuch wondrous power and velocity in swimming, as to defy all present\npursuit from man; this leviathan seems the banished and unconquerable\nCain of his race, bearing for his mark that style upon his back. From\nhaving the baleen in his mouth, the Fin-Back is sometimes included\nwith the right whale, among a theoretic species denominated Whalebone\nwhales, that is, whales with baleen. Of these so called Whalebone\nwhales, there would seem to be several varieties, most of which,\nhowever, are little known. Broad-nosed whales and beaked whales;\npike-headed whales; bunched whales; under-jawed whales and rostrated\nwhales, are the fishermen's names for a few sorts.\n\nIn connection with this appellative of \"Whalebone whales,\" it is of\ngreat importance to mention, that however such a nomenclature may be\nconvenient in facilitating allusions to some kind of whales, yet it is\nin vain to attempt a clear classification of the Leviathan, founded\nupon either his baleen, or hump, or fin, or teeth; notwithstanding\nthat those marked parts or features very obviously seem better adapted\nto afford the basis for a regular system of Cetology than any other\ndetached bodily distinctions, which the whale, in his kinds,\npresents. How then? The baleen, hump, back-fin, and teeth; these are\nthings whose peculiarities are indiscriminately dispersed among all\nsorts of whales, without any regard to what may be the nature of their\nstructure in other and more essential particulars. Thus, the sperm\nwhale and the humpbacked whale, each has a hump; but there the\nsimilitude ceases. Then, this same humpbacked whale and the Greenland\nwhale, each of these has baleen; but there again the similitude\nceases. And it is just the same with the other parts above\nmentioned. In various sorts of whales, they form such irregular\ncombinations; or, in the case of any one of them detached, such an\nirregular isolation; as utterly to defy all general methodization\nformed upon such a basis. On this rock every one of the\nwhale-naturalists has split.\n\nBut it may possibly be conceived that, in the internal parts of the\nwhale, in his anatomy  there, at least, we shall be able to hit the\nright classification. Nay; what thing, for example, is there in the\nGreenland whale's anatomy more striking than his baleen? Yet we have\nseen that by his baleen it is impossible correctly to classify the\nGreenland whale. And if you descend into the bowels of the various\nleviathans, why there you will not find distinctions a fiftieth part\nas available to the systematizer as those external ones already\nenumerated. What then remains? nothing but to take hold of the whales\nbodily, in their entire liberal volume, and boldly sort them that\nway. And this is the Bibliographical system here adopted; and it is\nthe only one that can possibly succeed, for it alone is\npracticable. To proceed.\n\nBOOK I. (Folio) CHAPTER IV. (Hump-Back).  This whale is often seen\non the northern American coast. He has been frequently captured there,\nand towed into harbor. He has a great pack on him like a peddler; or\nyou might call him the Elephant and Castle whale. At any rate, the\npopular name for him does not sufficiently distinguish him, since the\nsperm whale also has a hump though a smaller one. His oil is not very\nvaluable. He has baleen. He is the most gamesome and light-hearted of\nall the whales, making more gay foam and white water generally than\nany other of them.\n\nBOOK I. (Folio), CHAPTER V. (Razor-Back).  Of this whale little is\nknown but his name. I have seen him at a distance off Cape Horn. Of a\nretiring nature, he eludes both hunters and philosophers. Though no\ncoward, he has never yet shown any part of him but his back, which\nrises in a long sharp ridge. Let him go. I know little more of him,\nnor does anybody else.\n\nBOOK I. (Folio), CHAPTER VI. (Sulphur-Bottom).  Another retiring\ngentleman, with a brimstone belly, doubtless got by scraping along the\nTartarian tiles in some of his profounder divings. He is seldom seen;\nat least I have never seen him except in the remoter southern seas,\nand then always at too great a distance to study his countenance. He\nis never chased; he would run away with rope-walks of line. Prodigies\nare told of him. Adieu, Sulphur Bottom! I can say nothing more that is\ntrue of ye, nor can the oldest Nantucketer.\n\nThus ends BOOK I. (Folio), and now begins BOOK II. (Octavo).\n\nOCTAVOES.  These embrace the whales of middling magnitude, among\nwhich present may be numbered:  I., the Grampus; II., the Black\nFish; III., the Narwhale; IV., the Thrasher; V., the Killer.\n\nBOOK II. (Octavo), CHAPTER I. (Grampus).  Though this fish, whose\nloud sonorous breathing, or rather blowing, has furnished a proverb to\nlandsmen, is so well known a denizen of the deep, yet is he not\npopularly classed among whales. But possessing all the grand\ndistinctive features of the leviathan, most naturalists have\nrecognised him for one. He is of moderate octavo size, varying from\nfifteen to twenty-five feet in length, and of corresponding dimensions\nround the waist. He swims in herds; he is never regularly hunted,\nthough his oil is considerable in quantity, and pretty good for\nlight. By some fishermen his approach is regarded as premonitory of\nthe advance of the great sperm whale.\n\nBOOK II. (Octavo), CHAPTER II. (Black Fish).  I give the popular\nfishermen's names for all these fish, for generally they are the\nbest. Where any name happens to be vague or inexpressive, I shall say\nso, and suggest another. I do so now, touching the Black Fish,\nso-called, because blackness is the rule among almost all whales. So,\ncall him the Hyena Whale, if you please. His voracity is well known,\nand from the circumstance that the inner angles of his lips are curved\nupwards, he carries an everlasting Mephistophelean grin on his\nface. This whale averages some sixteen or eighteen feet in length. He\nis found in almost all latitudes. He has a peculiar way of showing his\ndorsal hooked fin in swimming, which looks something like a Roman\nnose. When not more profitably employed, the sperm whale hunters\nsometimes capture the Hyena whale, to keep up the supply of cheap oil\nfor domestic employment  as some frugal housekeepers, in the\nabsence of company, and quite alone by themselves, burn unsavory\ntallow instead of odorous wax. Though their blubber is very thin, some\nof these whales will yield you upwards of thirty gallons of oil.\n\nBOOK II. (Octavo), CHAPTER III. (Narwhale), that is, Nostril\nWhale.  Another instance of a curiously named whale, so named I\nsuppose from his peculiar horn being originally mistaken for a peaked\nnose. The creature is some sixteen feet in length, while its horn\naverages five feet, though some exceed ten, and even attain to fifteen\nfeet. Strictly speaking, this horn is but a lengthened tusk, growing\nout from the jaw in a line a little depressed from the horizontal. But\nit is only found on the sinister side, which has an ill effect, giving\nits owner something analogous to the aspect of a clumsy left-handed\nman. What precise purpose this ivory horn or lance answers, it would\nbe hard to say. It does not seem to be used like the blade of the\nsword-fish and bill-fish; though some sailors tell me that the\nNarwhale employs it for a rake in turning over the bottom of the sea\nfor food. Charley Coffin said it was used for an ice-piercer; for the\nNarwhale, rising to the surface of the Polar Sea, and finding it\nsheeted with ice, thrusts his horn up, and so breaks through. But you\ncannot prove either of these surmises to be correct. My own opinion\nis, that however this one-sided horn may really be used by the\nNarwhale  however that may be  it would certainly be very\nconvenient to him for a folder in reading pamphlets. The Narwhale I\nhave heard called the Tusked whale, the Horned whale, and the Unicorn\nwhale. He is certainly a curious example of the Unicornism to be found\nin almost every kingdom of animated nature. From certain cloistered\nold authors I have gathered that this same sea-unicorn's horn was in\nancient days regarded as the great antidote against poison, and as\nsuch, preparations of it brought immense prices. It was also distilled\nto a volatile salts for fainting ladies, the same way that the horns\nof the male deer are manufactured into hartshorn. Originally it was in\nitself accounted an object of great curiosity. Black Letter tells me\nthat Sir Martin Frobisher on his return from that voyage, when Queen\nBess did gallantly wave her jewelled hand to him from a window of\nGreenwich Palace, as his bold ship sailed down the Thames; \"when Sir\nMartin returned from that voyage,\" saith Black Letter, \"on bended\nknees he presented to her highness a prodigious long horn of the\nNarwhale, which for a long period after hung in the castle at\nWindsor.\" An Irish author avers that the Earl of Leicester, on bended\nknees, did likewise present to her highness another horn, pertaining\nto a land beast of the unicorn nature.\n\nThe Narwhale has a very picturesque, leopard-like look, being of a\nmilk-white ground colour, dotted with round and oblong spots of\nblack. His oil is very superior, clear and fine; but there is little\nof it, and he is seldom hunted. He is mostly found in the circumpolar\nseas.\n\nBOOK II. (Octavo), CHAPTER IV. (Killer).  Of this whale little is\nprecisely known to the Nantucketer, and nothing at all to the\nprofessed naturalist. From what I have seen of him at a distance, I\nshould say that he was about the bigness of a grampus. He is very\nsavage  a sort of Feegee fish. He sometimes takes the great Folio\nwhales by the lip, and hangs there like a leech, till the mighty brute\nis worried to death. The Killer is never hunted. I never heard what\nsort of oil he has. Exception might be taken to the name bestowed upon\nthis whale, on the ground of its indistinctness. For we are all\nkillers, on land and on sea; Bonapartes and Sharks included.\n\nBOOK II. (Octavo), CHAPTER V. (Thrasher).  This gentleman is famous\nfor his tail, which he uses for a ferule in thrashing his foes. He\nmounts the Folio whale's back, and as he swims, he works his passage\nby flogging him; as some schoolmasters get along in the world by a\nsimilar process. Still less is known of the Thrasher than of the\nKiller. Both are outlaws, even in the lawless seas.\n\nThus ends BOOK II. (Octavo), and begins BOOK III. (Duodecimo).\n\nDUODECIMOES.  These include the smaller whales. I. The Huzza\nPorpoise. II. The Algerine Porpoise. III. The Mealy-mouthed Porpoise.\n\nTo those who have not chanced specially to study the subject, it may\npossibly seem strange, that fishes not commonly exceeding four or five\nfeet should be marshalled among WHALES  a word, which, in the\npopular sense, always conveys an idea of hugeness. But the creatures\nset down above as Duodecimoes are infallibly whales, by the terms of\nmy definition of what a whale is  i.e. a spouting fish, with a\nhorizontal tail.\n\nBOOK III. (Duodecimo), CHAPTER 1. (Huzza Porpoise).  This is the\ncommon porpoise found almost all over the globe. The name is of my own\nbestowal; for there are more than one sort of porpoises, and something\nmust be done to distinguish them. I call him thus, because he always\nswims in hilarious shoals, which upon the broad sea keep tossing\nthemselves to heaven like caps in a Fourth-of-July crowd. Their\nappearance is generally hailed with delight by the mariner. Full of\nfine spirits, they invariably come from the breezy billows to\nwindward. They are the lads that always live before the wind. They are\naccounted a lucky omen. If you yourself can withstand three cheers at\nbeholding these vivacious fish, then heaven help ye; the spirit of\ngodly gamesomeness is not in ye. A well-fed, plump Huzza Porpoise will\nyield you one good gallon of good oil. But the fine and delicate fluid\nextracted from his jaws is exceedingly valuable. It is in request\namong jewellers and watchmakers. Sailors put it on their\nhones. Porpoise meat is good eating, you know. It may never have\noccurred to you that a porpoise spouts. Indeed, his spout is so small\nthat it is not very readily discernible. But the next time you have a\nchance, watch him; and you will then see the great Sperm whale himself\nin miniature.\n\nBOOK III. (Duodecimo), CHAPTER II. (Algerine Porpoise).  A\npirate. Very savage. He is only found, I think, in the Pacific. He is\nsomewhat larger than the Huzza Porpoise, but much of the same general\nmake. Provoke him, and he will buckle to a shark. I have lowered for\nhim many times, but never yet saw him captured.\n\nBOOK III. (Duodecimo), CHAPTER III. (Mealy-Mouthed Porpoise).  The\nlargest kind of Porpoise; and only found in the Pacific, so far as it\nis known. The only English name, by which he has hitherto been\ndesignated, is that of the fishers  Right-Whale Porpoise, from the\ncircumstance that he is chiefly found in the vicinity of that\nFolio. In shape, he differs in some degree from the Huzza Porpoise,\nbeing of a less rotund and jolly girth; indeed, he is of quite a neat\nand gentleman-like figure. He has no fins on his back (most other\nporpoises have), he has a lovely tail, and sentimental Indian eyes of\na hazel hue. But his mealy-mouth spoils all. Though his entire back\ndown to his side fins is of a deep sable, yet a boundary line,\ndistinct as the mark in a ship's hull, called the \"bright waist,\" that\nline streaks him from stem to stern, with two separate colours, black\nabove and white below. The white comprises part of his head, and the\nwhole of his mouth, which makes him look as if he had just escaped\nfrom a felonious visit to a meal-bag. A most mean and mealy aspect!\nHis oil is much like that of the common porpoise.\n\nBeyond the DUODECIMO, this system does not proceed, inasmuch as the\nPorpoise is the smallest of the whales. Above, you have all the\nLeviathans of note. But there are a rabble of uncertain, fugitive,\nhalf-fabulous whales, which, as an American whaleman, I know by\nreputation, but not personally. I shall enumerate them by their\nfore-castle appellations; for possibly such a list may be valuable to\nfuture investigators, who may complete what I have here but begun. If\nany of the following whales, shall hereafter be caught and marked,\nthen he can readily be incorporated into this System, according to his\nFolio, Octavo, or Duodecimo magnitude:  The Bottle-Nose Whale; the\nJunk Whale; the Pudding-Headed Whale; the Cape Whale; the Leading\nWhale; the Cannon Whale; the Scragg Whale; the Coppered Whale; the\nElephant Whale; the Iceberg Whale; the Quog Whale; the Blue Whale;\netc. From Icelandic, Dutch, and old English authorities, there might\nbe quoted other lists of uncertain whales, blessed with all manner of\nuncouth names. But I omit them as altogether obsolete; and can hardly\nhelp suspecting them for mere sounds, full of Leviathanism, but\nsignifying nothing.\n\nFinally: It was stated at the outset, that this system would not be\nhere, and at once, perfected. You cannot but plainly see that I have\nkept my word. But I now leave my cetological System standing thus\nunfinished, even as the great Cathedral of Cologne was left, with the\ncrane still standing upon the top of the uncompleted tower. For small\nerections may be finished by their first architects; grand ones, true\nones, ever leave the copestone to posterity. God keep me from ever\ncompleting anything. This whole book is but a draught  nay, but the\ndraught of a draught. Oh, Time, Strength, Cash, and Patience!\n\n I am aware that down to the present time, the fish styled Lamatins\nand Dugongs (Pig-fish and Sow-fish of the Coffins of Nantucket) are\nincluded by many naturalists among the whales. But as these pig-fish\nare a noisy, contemptible set, mostly lurking in the mouths of rivers,\nand feeding on wet hay, and especially as they do not spout, I deny\ntheir credentials as whales; and have presented them with their\npassports to quit the Kingdom of Cetology.\n\n Why this book of whales is not denominated the Quarto is very\nplain. Because, while the whales of this order, though smaller than\nthose of the former order, nevertheless retain a proportionate\nlikeness to them in figure, yet the bookbinder's Quarto volume in its\ndimensioned form does not preserve the shape of the Folio volume, but\nthe Octavo volume does.\n\nCHAPTER 33 The Specksynder.\n\nConcerning the officers of the whale-craft, this seems as good a place\nas any to set down a little domestic peculiarity on ship-board,\narising from the existence of the harpooneer class of officers, a\nclass unknown of course in any other marine than the whale-fleet.\n\nThe large importance attached to the harpooneer's vocation is evinced\nby the fact, that originally in the old Dutch Fishery, two centuries\nand more ago, the command of a whale ship was not wholly lodged in the\nperson now called the captain, but was divided between him and an\nofficer called the Specksynder. Literally this word means Fat-Cutter;\nusage, however, in time made it equivalent to Chief Harpooneer. In\nthose days, the captain's authority was restricted to the navigation\nand general management of the vessel; while over the whale-hunting\ndepartment and all its concerns, the Specksynder or Chief Harpooneer\nreigned supreme. In the British Greenland Fishery, under the corrupted\ntitle of Specksioneer, this old Dutch official is still retained, but\nhis former dignity is sadly abridged. At present he ranks simply as\nsenior Harpooneer; and as such, is but one of the captain's more\ninferior subalterns. Nevertheless, as upon the good conduct of the\nharpooneers the success of a whaling voyage largely depends, and since\nin the American Fishery he is not only an important officer in the\nboat, but under certain circumstances (night watches on a whaling\nground) the command of the ship's deck is also his; therefore the\ngrand political maxim of the sea demands, that he should nominally\nlive apart from the men before the mast, and be in some way\ndistinguished as their professional superior; though always, by them,\nfamiliarly regarded as their social equal.\n\nNow, the grand distinction drawn between officer and man at sea, is\nthis  the first lives aft, the last forward. Hence, in whale-ships\nand merchantmen alike, the mates have their quarters with the captain;\nand so, too, in most of the American whalers the harpooneers are\nlodged in the after part of the ship. That is to say, they take their\nmeals in the captain's cabin, and sleep in a place indirectly\ncommunicating with it.\n\nThough the long period of a Southern whaling voyage (by far the\nlongest of all voyages now or ever made by man), the peculiar perils\nof it, and the community of interest prevailing among a company, all\nof whom, high or low, depend for their profits, not upon fixed wages,\nbut upon their common luck, together with their common vigilance,\nintrepidity, and hard work; though all these things do in some cases\ntend to beget a less rigorous discipline than in merchantmen\ngenerally; yet, never mind how much like an old Mesopotamian family\nthese whalemen may, in some primitive instances, live together; for\nall that, the punctilious externals, at least, of the quarter-deck are\nseldom materially relaxed, and in no instance done away. Indeed, many\nare the Nantucket ships in which you will see the skipper parading his\nquarter-deck with an elated grandeur not surpassed in any military\nnavy; nay, extorting almost as much outward homage as if he wore the\nimperial purple, and not the shabbiest of pilot-cloth.\n\nAnd though of all men the moody captain of the Pequod was the least\ngiven to that sort of shallowest assumption; and though the only\nhomage he ever exacted, was implicit, instantaneous obedience; though\nhe required no man to remove the shoes from his feet ere stepping upon\nthe quarter-deck; and though there were times when, owing to peculiar\ncircumstances connected with events hereafter to be detailed, he\naddressed them in unusual terms, whether of condescension or in\nterrorem, or otherwise; yet even Captain Ahab was by no means\nunobservant of the paramount forms and usages of the sea.\n\nNor, perhaps, will it fail to be eventually perceived, that behind\nthose forms and usages, as it were, he sometimes masked himself;\nincidentally making use of them for other and more private ends than\nthey were legitimately intended to subserve. That certain sultanism of\nhis brain, which had otherwise in a good degree remained unmanifested;\nthrough those forms that same sultanism became incarnate in an\nirresistible dictatorship. For be a man's intellectual superiority\nwhat it will, it can never assume the practical, available supremacy\nover other men, without the aid of some sort of external arts and\nentrenchments, always, in themselves, more or less paltry and\nbase. This it is, that for ever keeps God's true princes of the Empire\nfrom the world's hustings; and leaves the highest honours that this\nair can give, to those men who become famous more through their\ninfinite inferiority to the choice hidden handful of the Divine Inert,\nthan through their undoubted superiority over the dead level of the\nmass. Such large virtue lurks in these small things when extreme\npolitical superstitions invest them, that in some royal instances even\nto idiot imbecility they have imparted potency. But when, as in the\ncase of Nicholas the Czar, the ringed crown of geographical empire\nencircles an imperial brain; then, the plebeian herds crouch abased\nbefore the tremendous centralization. Nor, will the tragic dramatist\nwho would depict mortal indomitableness in its fullest sweep and\ndirect swing, ever forget a hint, incidentally so important in his\nart, as the one now alluded to.\n\nBut Ahab, my Captain, still moves before me in all his Nantucket\ngrimness and shagginess; and in this episode touching Emperors and\nKings, I must not conceal that I have only to do with a poor old\nwhale-hunter like him; and, therefore, all outward majestical\ntrappings and housings are denied me. Oh, Ahab! what shall be grand in\nthee, it must needs be plucked at from the skies, and dived for in the\ndeep, and featured in the unbodied air!\n\nCHAPTER 34 The Cabin-Table.\n\nIt is noon; and Dough-Boy, the steward, thrusting his pale\nloaf-of-bread face from the cabin-scuttle, announces dinner to his\nlord and master; who, sitting in the lee quarter-boat, has just been\ntaking an observation of the sun; and is now mutely reckoning the\nlatitude on the smooth, medallion-shaped tablet, reserved for that\ndaily purpose on the upper part of his ivory leg. From his complete\ninattention to the tidings, you would think that moody Ahab had not\nheard his menial. But presently, catching hold of the mizen shrouds,\nhe swings himself to the deck, and in an even, unexhilarated voice,\nsaying, \"Dinner, Mr. Starbuck,\" disappears into the cabin.\n\nWhen the last echo of his sultan's step has died away, and Starbuck,\nthe first Emir, has every reason to suppose that he is seated, then\nStarbuck rouses from his quietude, takes a few turns along the planks,\nand, after a grave peep into the binnacle, says, with some touch of\npleasantness, \"Dinner, Mr. Stubb,\" and descends the scuttle. The\nsecond Emir lounges about the rigging awhile, and then slightly\nshaking the main brace, to see whether it will be all right with that\nimportant rope, he likewise takes up the old burden, and with a rapid\n\"Dinner, Mr. Flask,\" follows after his predecessors.\n\nBut the third Emir, now seeing himself all alone on the quarter-deck,\nseems to feel relieved from some curious restraint; for, tipping all\nsorts of knowing winks in all sorts of directions, and kicking off his\nshoes, he strikes into a sharp but noiseless squall of a hornpipe\nright over the Grand Turk's head; and then, by a dexterous sleight,\npitching his cap up into the mizentop for a shelf, he goes down\nrollicking so far at least as he remains visible from the deck,\nreversing all other processions, by bringing up the rear with\nmusic. But ere stepping into the cabin doorway below, he pauses, ships\na new face altogether, and, then, independent, hilarious little Flask\nenters King Ahab's presence, in the character of Abjectus, or the\nSlave.\n\nIt is not the least among the strange things bred by the intense\nartificialness of sea-usages, that while in the open air of the deck\nsome officers will, upon provocation, bear themselves boldly and\ndefyingly enough towards their commander; yet, ten to one, let those\nvery officers the next moment go down to their customary dinner in\nthat same commander's cabin, and straightway their inoffensive, not to\nsay deprecatory and humble air towards him, as he sits at the head of\nthe table; this is marvellous, sometimes most comical. Wherefore this\ndifference? A problem? Perhaps not. To have been Belshazzar, King of\nBabylon; and to have been Belshazzar, not haughtily but courteously,\ntherein certainly must have been some touch of mundane grandeur. But\nhe who in the rightly regal and intelligent spirit presides over his\nown private dinner-table of invited guests, that man's unchallenged\npower and dominion of individual influence for the time; that man's\nroyalty of state transcends Belshazzar's, for Belshazzar was not the\ngreatest. Who has but once dined his friends, has tasted what it is to\nbe Caesar. It is a witchery of social czarship which there is no\nwithstanding. Now, if to this consideration you superadd the official\nsupremacy of a ship-master, then, by inference, you will derive the\ncause of that peculiarity of sea-life just mentioned.\n\nOver his ivory-inlaid table, Ahab presided like a mute, maned sea-lion\non the white coral beach, surrounded by his warlike but still\ndeferential cubs. In his own proper turn, each officer waited to be\nserved. They were as little children before Ahab; and yet, in Ahab,\nthere seemed not to lurk the smallest social arrogance. With one mind,\ntheir intent eyes all fastened upon the old man's knife, as he carved\nthe chief dish before him. I do not suppose that for the world they\nwould have profaned that moment with the slightest observation, even\nupon so neutral a topic as the weather. No! And when reaching out his\nknife and fork, between which the slice of beef was locked, Ahab\nthereby motioned Starbuck's plate towards him, the mate received his\nmeat as though receiving alms; and cut it tenderly; and a little\nstarted if, perchance, the knife grazed against the plate; and chewed\nit noiselessly; and swallowed it, not without circumspection. For,\nlike the Coronation banquet at Frankfort, where the German Emperor\nprofoundly dines with the seven Imperial Electors, so these cabin\nmeals were somehow solemn meals, eaten in awful silence; and yet at\ntable old Ahab forbade not conversation; only he himself was\ndumb. What a relief it was to choking Stubb, when a rat made a sudden\nracket in the hold below. And poor little Flask, he was the youngest\nson, and little boy of this weary family party. His were the shinbones\nof the saline beef; his would have been the drumsticks. For Flask to\nhave presumed to help himself, this must have seemed to him tantamount\nto larceny in the first degree. Had he helped himself at that table,\ndoubtless, never more would he have been able to hold his head up in\nthis honest world; nevertheless, strange to say, Ahab never forbade\nhim. And had Flask helped himself, the chances were Ahab had never so\nmuch as noticed it. Least of all, did Flask presume to help himself to\nbutter. Whether he thought the owners of the ship denied it to him, on\naccount of its clotting his clear, sunny complexion; or whether he\ndeemed that, on so long a voyage in such marketless waters, butter was\nat a premium, and therefore was not for him, a subaltern; however it\nwas, Flask, alas! was a butterless man!\n\nAnother thing. Flask was the last person down at the dinner, and Flask\nis the first man up. Consider! For hereby Flask's dinner was badly\njammed in point of time. Starbuck and Stubb both had the start of him;\nand yet they also have the privilege of lounging in the rear. If Stubb\neven, who is but a peg higher than Flask, happens to have but a small\nappetite, and soon shows symptoms of concluding his repast, then Flask\nmust bestir himself, he will not get more than three mouthfuls that\nday; for it is against holy usage for Stubb to precede Flask to the\ndeck. Therefore it was that Flask once admitted in private, that ever\nsince he had arisen to the dignity of an officer, from that moment he\nhad never known what it was to be otherwise than hungry, more or\nless. For what he ate did not so much relieve his hunger, as keep it\nimmortal in him. Peace and satisfaction, thought Flask, have for ever\ndeparted from my stomach. I am an officer; but, how I wish I could\nfish a bit of old-fashioned beef in the forecastle, as I used to when\nI was before the mast. There's the fruits of promotion now; there's\nthe vanity of glory: there's the insanity of life! Besides, if it were\nso that any mere sailor of the Pequod had a grudge against Flask in\nFlask's official capacity, all that sailor had to do, in order to\nobtain ample vengeance, was to go aft at dinner-time, and get a peep\nat Flask through the cabin sky-light, sitting silly and dumfoundered\nbefore awful Ahab.\n\nNow, Ahab and his three mates formed what may be called the first\ntable in the Pequod's cabin. After their departure, taking place in\ninverted order to their arrival, the canvas cloth was cleared, or\nrather was restored to some hurried order by the pallid steward. And\nthen the three harpooneers were bidden to the feast, they being its\nresiduary legatees. They made a sort of temporary servants' hall of\nthe high and mighty cabin.\n\nIn strange contrast to the hardly tolerable constraint and nameless\ninvisible domineerings of the captain's table, was the entire\ncare-free license and ease, the almost frantic democracy of those\ninferior fellows the harpooneers. While their masters, the mates,\nseemed afraid of the sound of the hinges of their own jaws, the\nharpooneers chewed their food with such a relish that there was a\nreport to it. They dined like lords; they filled their bellies like\nIndian ships all day loading with spices. Such portentous appetites\nhad Queequeg and Tashtego, that to fill out the vacancies made by the\nprevious repast, often the pale Dough-Boy was fain to bring on a great\nbaron of salt-junk, seemingly quarried out of the solid ox. And if he\nwere not lively about it, if he did not go with a nimble\nhop-skip-and-jump, then Tashtego had an ungentlemanly way of\naccelerating him by darting a fork at his back, harpoon-wise. And once\nDaggoo, seized with a sudden humor, assisted Dough-Boy's memory by\nsnatching him up bodily, and thrusting his head into a great empty\nwooden trencher, while Tashtego, knife in hand, began laying out the\ncircle preliminary to scalping him. He was naturally a very nervous,\nshuddering sort of little fellow, this bread-faced steward; the\nprogeny of a bankrupt baker and a hospital nurse. And what with the\nstanding spectacle of the black terrific Ahab, and the periodical\ntumultuous visitations of these three savages, Dough-Boy's whole life\nwas one continual lip-quiver. Commonly, after seeing the harpooneers\nfurnished with all things they demanded, he would escape from their\nclutches into his little pantry adjoining, and fearfully peep out at\nthem through the blinds of its door, till all was over.\n\nIt was a sight to see Queequeg seated over against Tashtego, opposing\nhis filed teeth to the Indian's: crosswise to them, Daggoo seated on\nthe floor, for a bench would have brought his hearse-plumed head to\nthe low carlines; at every motion of his colossal limbs, making the\nlow cabin framework to shake, as when an African elephant goes\npassenger in a ship. But for all this, the great negro was wonderfully\nabstemious, not to say dainty. It seemed hardly possible that by such\ncomparatively small mouthfuls he could keep up the vitality diffused\nthrough so broad, baronial, and superb a person. But, doubtless, this\nnoble savage fed strong and drank deep of the abounding element of\nair; and through his dilated nostrils snuffed in the sublime life of\nthe worlds. Not by beef or by bread, are giants made or nourished. But\nQueequeg, he had a mortal, barbaric smack of the lip in eating  an\nugly sound enough  so much so, that the trembling Dough-Boy almost\nlooked to see whether any marks of teeth lurked in his own lean\narms. And when he would hear Tashtego singing out for him to produce\nhimself, that his bones might be picked, the simple-witted steward all\nbut shattered the crockery hanging round him in the pantry, by his\nsudden fits of the palsy. Nor did the whetstone which the harpooneers\ncarried in their pockets, for their lances and other weapons; and with\nwhich whetstones, at dinner, they would ostentatiously sharpen their\nknives; that grating sound did not at all tend to tranquillize poor\nDough-Boy. How could he forget that in his Island days, Queequeg, for\none, must certainly have been guilty of some murderous, convivial\nindiscretions. Alas! Dough-Boy! hard fares the white waiter who waits\nupon cannibals. Not a napkin should he carry on his arm, but a\nbuckler. In good time, though, to his great delight, the three\nsalt-sea warriors would rise and depart; to his credulous,\nfable-mongering ears, all their martial bones jingling in them at\nevery step, like Moorish scimetars in scabbards.\n\nBut, though these barbarians dined in the cabin, and nominally lived\nthere; still, being anything but sedentary in their habits, they were\nscarcely ever in it except at mealtimes, and just before\nsleeping-time, when they passed through it to their own peculiar\nquarters.\n\nIn this one matter, Ahab seemed no exception to most American whale\ncaptains, who, as a set, rather incline to the opinion that by rights\nthe ship's cabin belongs to them; and that it is by courtesy alone\nthat anybody else is, at any time, permitted there. So that, in real\ntruth, the mates and harpooneers of the Pequod might more properly be\nsaid to have lived out of the cabin than in it. For when they did\nenter it, it was something as a street-door enters a house; turning\ninwards for a moment, only to be turned out the next; and, as a\npermanent thing, residing in the open air. Nor did they lose much\nhereby; in the cabin was no companionship; socially, Ahab was\ninaccessible. Though nominally included in the census of Christendom,\nhe was still an alien to it. He lived in the world, as the last of the\nGrisly Bears lived in settled Missouri. And as when Spring and Summer\nhad departed, that wild Logan of the woods, burying himself in the\nhollow of a tree, lived out the winter there, sucking his own paws;\nso, in his inclement, howling old age, Ahab's soul, shut up in the\ncaved trunk of his body, there fed upon the sullen paws of its gloom!\n\nCHAPTER 35 The Mast-Head.\n\nIt was during the more pleasant weather, that in due rotation with the\nother seamen my first mast-head came round.\n\nIn most American whalemen the mast-heads are manned almost\nsimultaneously with the vessel's leaving her port; even though she may\nhave fifteen thousand miles, and more, to sail ere reaching her proper\ncruising ground. And if, after a three, four, or five years' voyage\nshe is drawing nigh home with anything empty in her  say, an empty\nvial even  then, her mast-heads are kept manned to the last; and\nnot till her skysail-poles sail in among the spires of the port, does\nshe altogether relinquish the hope of capturing one whale more.\n\nNow, as the business of standing mast-heads, ashore or afloat, is a\nvery ancient and interesting one, let us in some measure expatiate\nhere. I take it, that the earliest standers of mast-heads were the old\nEgyptians; because, in all my researches, I find none prior to\nthem. For though their progenitors, the builders of Babel, must\ndoubtless, by their tower, have intended to rear the loftiest\nmast-head in all Asia, or Africa either; yet (ere the final truck was\nput to it) as that great stone mast of theirs may be said to have gone\nby the board, in the dread gale of God's wrath; therefore, we cannot\ngive these Babel builders priority over the Egyptians. And that the\nEgyptians were a nation of mast-head standers, is an assertion based\nupon the general belief among archaeologists, that the first pyramids\nwere founded for astronomical purposes: a theory singularly supported\nby the peculiar stair-like formation of all four sides of those\nedifices; whereby, with prodigious long upliftings of their legs,\nthose old astronomers were wont to mount to the apex, and sing out for\nnew stars; even as the look-outs of a modern ship sing out for a sail,\nor a whale just bearing in sight. In Saint Stylites, the famous\nChristian hermit of old times, who built him a lofty stone pillar in\nthe desert and spent the whole latter portion of his life on its\nsummit, hoisting his food from the ground with a tackle; in him we\nhave a remarkable instance of a dauntless stander-of-mast-heads; who\nwas not to be driven from his place by fogs or frosts, rain, hail, or\nsleet; but valiantly facing everything out to the last, literally died\nat his post. Of modern standers-of-mast-heads we have but a lifeless\nset; mere stone, iron, and bronze men; who, though well capable of\nfacing out a stiff gale, are still entirely incompetent to the\nbusiness of singing out upon discovering any strange sight. There is\nNapoleon; who, upon the top of the column of Vendome, stands with arms\nfolded, some one hundred and fifty feet in the air; careless, now, who\nrules the decks below; whether Louis Philippe, Louis Blanc, or Louis\nthe Devil. Great Washington, too, stands high aloft on his towering\nmain-mast in Baltimore, and like one of Hercules' pillars, his column\nmarks that point of human grandeur beyond which few mortals will\ngo. Admiral Nelson, also, on a capstan of gun-metal, stands his\nmast-head in Trafalgar Square; and ever when most obscured by that\nLondon smoke, token is yet given that a hidden hero is there; for\nwhere there is smoke, must be fire. But neither great Washington, nor\nNapoleon, nor Nelson, will answer a single hail from below, however\nmadly invoked to befriend by their counsels the distracted decks upon\nwhich they gaze; however it may be surmised, that their spirits\npenetrate through the thick haze of the future, and descry what shoals\nand what rocks must be shunned.\n\nIt may seem unwarrantable to couple in any respect the mast-head\nstanders of the land with those of the sea; but that in truth it is\nnot so, is plainly evinced by an item for which Obed Macy, the sole\nhistorian of Nantucket, stands accountable. The worthy Obed tells us,\nthat in the early times of the whale fishery, ere ships were regularly\nlaunched in pursuit of the game, the people of that island erected\nlofty spars along the sea-coast, to which the look-outs ascended by\nmeans of nailed cleats, something as fowls go upstairs in a\nhen-house. A few years ago this same plan was adopted by the Bay\nwhalemen of New Zealand, who, upon descrying the game, gave notice to\nthe ready-manned boats nigh the beach. But this custom has now become\nobsolete; turn we then to the one proper mast-head, that of a\nwhale-ship at sea. The three mast-heads are kept manned from sun-rise\nto sun-set; the seamen taking their regular turns (as at the helm),\nand relieving each other every two hours. In the serene weather of the\ntropics it is exceedingly pleasant the mast-head; nay, to a dreamy\nmeditative man it is delightful. There you stand, a hundred feet above\nthe silent decks, striding along the deep, as if the masts were\ngigantic stilts, while beneath you and between your legs, as it were,\nswim the hugest monsters of the sea, even as ships once sailed between\nthe boots of the famous Colossus at old Rhodes. There you stand, lost\nin the infinite series of the sea, with nothing ruffled but the\nwaves. The tranced ship indolently rolls; the drowsy trade winds blow;\neverything resolves you into languor. For the most part, in this\ntropic whaling life, a sublime uneventfulness invests you; you hear no\nnews; read no gazettes; extras with startling accounts of commonplaces\nnever delude you into unnecessary excitements; you hear of no domestic\nafflictions; bankrupt securities; fall of stocks; are never troubled\nwith the thought of what you shall have for dinner  for all your\nmeals for three years and more are snugly stowed in casks, and your\nbill of fare is immutable.\n\nIn one of those southern whalesmen, on a long three or four years'\nvoyage, as often happens, the sum of the various hours you spend at\nthe mast-head would amount to several entire months. And it is much to\nbe deplored that the place to which you devote so considerable a\nportion of the whole term of your natural life, should be so sadly\ndestitute of anything approaching to a cosy inhabitiveness, or adapted\nto breed a comfortable localness of feeling, such as pertains to a\nbed, a hammock, a hearse, a sentry box, a pulpit, a coach, or any\nother of those small and snug contrivances in which men temporarily\nisolate themselves. Your most usual point of perch is the head of the\nt' gallant-mast, where you stand upon two thin parallel sticks (almost\npeculiar to whalemen) called the t' gallant cross-trees. Here, tossed\nabout by the sea, the beginner feels about as cosy as he would\nstanding on a bull's horns. To be sure, in cold weather you may carry\nyour house aloft with you, in the shape of a watch-coat; but properly\nspeaking the thickest watch-coat is no more of a house than the unclad\nbody; for as the soul is glued inside of its fleshy tabernacle, and\ncannot freely move about in it, nor even move out of it, without\nrunning great risk of perishing (like an ignorant pilgrim crossing the\nsnowy Alps in winter); so a watch-coat is not so much of a house as it\nis a mere envelope, or additional skin encasing you. You cannot put a\nshelf or chest of drawers in your body, and no more can you make a\nconvenient closet of your watch-coat.\n\nConcerning all this, it is much to be deplored that the mast-heads of\na southern whale ship are unprovided with those enviable little tents\nor pulpits, called crow's-nests, in which the look-outs of a Greenland\nwhaler are protected from the inclement weather of the frozen seas. In\nthe fireside narrative of Captain Sleet, entitled \"A Voyage among the\nIcebergs, in quest of the Greenland Whale, and incidentally for the\nre-discovery of the Lost Icelandic Colonies of Old Greenland;\" in this\nadmirable volume, all standers of mast-heads are furnished with a\ncharmingly circumstantial account of the then recently invented\ncrow's-nest of the Glacier, which was the name of Captain Sleet's good\ncraft. He called it the Sleet's crow's-nest, in honour of himself; he\nbeing the original inventor and patentee, and free from all ridiculous\nfalse delicacy, and holding that if we call our own children after our\nown names (we fathers being the original inventors and patentees), so\nlikewise should we denominate after ourselves any other apparatus we\nmay beget. In shape, the Sleet's crow's-nest is something like a large\ntierce or pipe; it is open above, however, where it is furnished with\na movable side-screen to keep to windward of your head in a hard\ngale. Being fixed on the summit of the mast, you ascend into it\nthrough a little trap-hatch in the bottom. On the after side, or side\nnext the stern of the ship, is a comfortable seat, with a locker\nunderneath for umbrellas, comforters, and coats. In front is a leather\nrack, in which to keep your speaking trumpet, pipe, telescope, and\nother nautical conveniences. When Captain Sleet in person stood his\nmast-head in this crow's-nest of his, he tells us that he always had a\nrifle with him (also fixed in the rack), together with a powder flask\nand shot, for the purpose of popping off the stray narwhales, or\nvagrant sea unicorns infesting those waters; for you cannot\nsuccessfully shoot at them from the deck owing to the resistance of\nthe water, but to shoot down upon them is a very different thing. Now,\nit was plainly a labor of love for Captain Sleet to describe, as he\ndoes, all the little detailed conveniences of his crow's-nest; but\nthough he so enlarges upon many of these, and though he treats us to a\nvery scientific account of his experiments in this crow's-nest, with a\nsmall compass he kept there for the purpose of counteracting the\nerrors resulting from what is called the \"local attraction\" of all\nbinnacle magnets; an error ascribable to the horizontal vicinity of\nthe iron in the ship's planks, and in the Glacier's case, perhaps, to\nthere having been so many broken-down blacksmiths among her crew; I\nsay, that though the Captain is very discreet and scientific here,\nyet, for all his learned \"binnacle deviations,\" \"azimuth compass\nobservations,\" and \"approximate errors,\" he knows very well, Captain\nSleet, that he was not so much immersed in those profound magnetic\nmeditations, as to fail being attracted occasionally towards that well\nreplenished little case-bottle, so nicely tucked in on one side of his\ncrow's nest, within easy reach of his hand. Though, upon the whole, I\ngreatly admire and even love the brave, the honest, and learned\nCaptain; yet I take it very ill of him that he should so utterly\nignore that case-bottle, seeing what a faithful friend and comforter\nit must have been, while with mittened fingers and hooded head he was\nstudying the mathematics aloft there in that bird's nest within three\nor four perches of the pole.\n\nBut if we Southern whale-fishers are not so snugly housed aloft as\nCaptain Sleet and his Greenlandmen were; yet that disadvantage is\ngreatly counter-balanced by the widely contrasting serenity of those\nseductive seas in which we South fishers mostly float. For one, I used\nto lounge up the rigging very leisurely, resting in the top to have a\nchat with Queequeg, or any one else off duty whom I might find there;\nthen ascending a little way further, and throwing a lazy leg over the\ntop-sail yard, take a preliminary view of the watery pastures, and so\nat last mount to my ultimate destination.\n\nLet me make a clean breast of it here, and frankly admit that I kept\nbut sorry guard. With the problem of the universe revolving in me, how\ncould I  being left completely to myself at such a\nthought-engendering altitude  how could I but lightly hold my\nobligations to observe all whale-ships' standing orders, \"Keep your\nweather eye open, and sing out every time.\"\n\nAnd let me in this place movingly admonish you, ye ship-owners of\nNantucket! Beware of enlisting in your vigilant fisheries any lad with\nlean brow and hollow eye; given to unseasonable meditativeness; and\nwho offers to ship with the Phaedon instead of Bowditch in his\nhead. Beware of such an one, I say; your whales must be seen before\nthey can be killed; and this sunken-eyed young Platonist will tow you\nten wakes round the world, and never make you one pint of sperm the\nricher. Nor are these monitions at all unneeded. For nowadays, the\nwhale-fishery furnishes an asylum for many romantic, melancholy, and\nabsent-minded young men, disgusted with the carking cares of earth,\nand seeking sentiment in tar and blubber. Childe Harold not\nunfrequently perches himself upon the mast-head of some luckless\ndisappointed whale-ship, and in moody phrase ejaculates: \n\n\"Roll on, thou deep and dark blue ocean, roll!  Ten thousand\nblubber-hunters sweep over thee in vain.\"\n\nVery often do the captains of such ships take those absent-minded\nyoung philosophers to task, upbraiding them with not feeling\nsufficient \"interest\" in the voyage; half-hinting that they are so\nhopelessly lost to all honourable ambition, as that in their secret\nsouls they would rather not see whales than otherwise. But all in\nvain; those young Platonists have a notion that their vision is\nimperfect; they are short-sighted; what use, then, to strain the\nvisual nerve? They have left their opera-glasses at home.\n\n\"Why, thou monkey,\" said a harpooneer to one of these lads, \"we've\nbeen cruising now hard upon three years, and thou hast not raised a\nwhale yet. Whales are scarce as hen's teeth whenever thou art up\nhere.\" Perhaps they were; or perhaps there might have been shoals of\nthem in the far horizon; but lulled into such an opium-like\nlistlessness of vacant, unconscious reverie is this absent-minded\nyouth by the blending cadence of waves with thoughts, that at last he\nloses his identity; takes the mystic ocean at his feet for the visible\nimage of that deep, blue, bottomless soul, pervading mankind and\nnature; and every strange, half-seen, gliding, beautiful thing that\neludes him; every dimly-discovered, uprising fin of some undiscernible\nform, seems to him the embodiment of those elusive thoughts that only\npeople the soul by continually flitting through it. In this enchanted\nmood, thy spirit ebbs away to whence it came; becomes diffused through\ntime and space; like Crammer's sprinkled Pantheistic ashes, forming at\nlast a part of every shore the round globe over.\n\nThere is no life in thee, now, except that rocking life imparted by a\ngently rolling ship; by her, borrowed from the sea; by the sea, from\nthe inscrutable tides of God. But while this sleep, this dream is on\nye, move your foot or hand an inch; slip your hold at all; and your\nidentity comes back in horror. Over Descartian vortices you hover. And\nperhaps, at mid-day, in the fairest weather, with one half-throttled\nshriek you drop through that transparent air into the summer sea, no\nmore to rise for ever. Heed it well, ye Pantheists!\n\nCHAPTER 36 The Quarter-Deck.\n\n(ENTER AHAB: THEN, ALL)\n\nIt was not a great while after the affair of the pipe, that one\nmorning shortly after breakfast, Ahab, as was his wont, ascended the\ncabin-gangway to the deck. There most sea-captains usually walk at\nthat hour, as country gentlemen, after the same meal, take a few turns\nin the garden.\n\nSoon his steady, ivory stride was heard, as to and fro he paced his\nold rounds, upon planks so familiar to his tread, that they were all\nover dented, like geological stones, with the peculiar mark of his\nwalk. Did you fixedly gaze, too, upon that ribbed and dented brow;\nthere also, you would see still stranger foot-prints  the\nfoot-prints of his one unsleeping, ever-pacing thought.\n\nBut on the occasion in question, those dents looked deeper, even as\nhis nervous step that morning left a deeper mark. And, so full of his\nthought was Ahab, that at every uniform turn that he made, now at the\nmain-mast and now at the binnacle, you could almost see that thought\nturn in him as he turned, and pace in him as he paced; so completely\npossessing him, indeed, that it all but seemed the inward mould of\nevery outer movement.\n\n\"D'ye mark him, Flask?\" whispered Stubb; \"the chick that's in him\npecks the shell. 'Twill soon be out.\"\n\nThe hours wore on;  Ahab now shut up within his cabin; anon, pacing\nthe deck, with the same intense bigotry of purpose in his aspect.\n\nIt drew near the close of day. Suddenly he came to a halt by the\nbulwarks, and inserting his bone leg into the auger-hole there, and\nwith one hand grasping a shroud, he ordered Starbuck to send everybody\naft.\n\n\"Sir!\" said the mate, astonished at an order seldom or never given on\nship-board except in some extraordinary case.\n\n\"Send everybody aft,\" repeated Ahab. \"Mast-heads, there! come down!\"\n\nWhen the entire ship's company were assembled, and with curious and\nnot wholly unapprehensive faces, were eyeing him, for he looked not\nunlike the weather horizon when a storm is coming up, Ahab, after\nrapidly glancing over the bulwarks, and then darting his eyes among\nthe crew, started from his standpoint; and as though not a soul were\nnigh him resumed his heavy turns upon the deck. With bent head and\nhalf-slouched hat he continued to pace, unmindful of the wondering\nwhispering among the men; till Stubb cautiously whispered to Flask,\nthat Ahab must have summoned them there for the purpose of witnessing\na pedestrian feat. But this did not last long. Vehemently pausing, he\ncried: \n\n\"What do ye do when ye see a whale, men?\"\n\n\"Sing out for him!\" was the impulsive rejoinder from a score of\nclubbed voices.\n\n\"Good!\" cried Ahab, with a wild approval in his tones; observing the\nhearty animation into which his unexpected question had so\nmagnetically thrown them.\n\n\"And what do ye next, men?\"\n\n\"Lower away, and after him!\"\n\n\"And what tune is it ye pull to, men?\"\n\n\"A dead whale or a stove boat!\"\n\nMore and more strangely and fiercely glad and approving, grew the\ncountenance of the old man at every shout; while the mariners began to\ngaze curiously at each other, as if marvelling how it was that they\nthemselves became so excited at such seemingly purposeless questions.\n\nBut, they were all eagerness again, as Ahab, now half-revolving in his\npivot-hole, with one hand reaching high up a shroud, and tightly,\nalmost convulsively grasping it, addressed them thus: \n\n\"All ye mast-headers have before now heard me give orders about a\nwhite whale. Look ye! d'ye see this Spanish ounce of gold?\" \nholding up a broad bright coin to the sun  \"it is a sixteen dollar\npiece, men. D'ye see it? Mr. Starbuck, hand me yon top-maul.\"\n\nWhile the mate was getting the hammer, Ahab, without speaking, was\nslowly rubbing the gold piece against the skirts of his jacket, as if\nto heighten its lustre, and without using any words was meanwhile\nlowly humming to himself, producing a sound so strangely muffled and\ninarticulate that it seemed the mechanical humming of the wheels of\nhis vitality in him.\n\nReceiving the top-maul from Starbuck, he advanced towards the\nmain-mast with the hammer uplifted in one hand, exhibiting the gold\nwith the other, and with a high raised voice exclaiming: \"Whosoever of\nye raises me a white-headed whale with a wrinkled brow and a crooked\njaw; whosoever of ye raises me that white-headed whale, with three\nholes punctured in his starboard fluke  look ye, whosoever of ye\nraises me that same white whale, he shall have this gold ounce, my\nboys!\"\n\n\"Huzza! huzza!\" cried the seamen, as with swinging tarpaulins they\nhailed the act of nailing the gold to the mast.\n\n\"It's a white whale, I say,\" resumed Ahab, as he threw down the\ntopmaul: \"a white whale. Skin your eyes for him, men; look sharp for\nwhite water; if ye see but a bubble, sing out.\"\n\nAll this while Tashtego, Daggoo, and Queequeg had looked on with even\nmore intense interest and surprise than the rest, and at the mention\nof the wrinkled brow and crooked jaw they had started as if each was\nseparately touched by some specific recollection.\n\n\"Captain Ahab,\" said Tashtego, \"that white whale must be the same that\nsome call Moby Dick.\"\n\n\"Moby Dick?\" shouted Ahab. \"Do ye know the white whale then, Tash?\"\n\n\"Does he fan-tail a little curious, sir, before he goes down?\" said\nthe Gay-Header deliberately.\n\n\"And has he a curious spout, too,\" said Daggoo, \"very bushy, even for\na parmacetty, and mighty quick, Captain Ahab?\"\n\n\"And he have one, two, three  oh! good many iron in him hide, too,\nCaptain,\" cried Queequeg disjointedly, \"all twiske-tee be-twisk, like\nhim  him  \" faltering hard for a word, and screwing his hand\nround and round as though uncorking a bottle  \"like him  him \n\"\n\n\"Corkscrew!\" cried Ahab, \"aye, Queequeg, the harpoons lie all twisted\nand wrenched in him; aye, Daggoo, his spout is a big one, like a whole\nshock of wheat, and white as a pile of our Nantucket wool after the\ngreat annual sheep- shearing; aye, Tashtego, and he fan-tails like a\nsplit jib in a squall. Death and devils! men, it is Moby Dick ye have\nseen  Moby Dick  Moby Dick!\"\n\n\"Captain Ahab,\" said Starbuck, who, with Stubb and Flask, had thus far\nbeen eyeing his superior with increasing surprise, but at last seemed\nstruck with a thought which somewhat explained all the\nwonder. \"Captain Ahab, I have heard of Moby Dick  but it was not\nMoby Dick that took off thy leg?\"\n\n\"Who told thee that?\" cried Ahab; then pausing, \"Aye, Starbuck; aye,\nmy hearties all round; it was Moby Dick that dismasted me; Moby Dick\nthat brought me to this dead stump I stand on now. Aye, aye,\" he\nshouted with a terrific, loud, animal sob, like that of a\nheart-stricken moose; \"Aye, aye! it was that accursed white whale that\nrazeed me; made a poor pegging lubber of me for ever and a day!\" Then\ntossing both arms, with measureless imprecations he shouted out: \"Aye,\naye! and I'll chase him round Good Hope, and round the Horn, and round\nthe Norway Maelstrom, and round perdition's flames before I give him\nup. And this is what ye have shipped for, men! to chase that white\nwhale on both sides of land, and over all sides of earth, till he\nspouts black blood and rolls fin out. What say ye, men, will ye splice\nhands on it, now? I think ye do look brave.\"\n\n\"Aye, aye!\" shouted the harpooneers and seamen, running closer to the\nexcited old man: \"A sharp eye for the white whale; a sharp lance for\nMoby Dick!\"\n\n\"God bless ye,\" he seemed to half sob and half shout. \"God bless ye,\nmen. Steward! go draw the great measure of grog. But what's this long\nface about, Mr. Starbuck; wilt thou not chase the white whale? art not\ngame for Moby Dick?\"\n\n\"I am game for his crooked jaw, and for the jaws of Death too, Captain\nAhab, if it fairly comes in the way of the business we follow; but I\ncame here to hunt whales, not my commander's vengeance. How many\nbarrels will thy vengeance yield thee even if thou gettest it, Captain\nAhab? it will not fetch thee much in our Nantucket market.\"\n\n\"Nantucket market! Hoot! But come closer, Starbuck; thou requirest a\nlittle lower layer. If money's to be the measurer, man, and the\naccountants have computed their great counting-house the globe, by\ngirdling it with guineas, one to every three parts of an inch; then,\nlet me tell thee, that my vengeance will fetch a great premium here!\"\n\n\"He smites his chest,\" whispered Stubb, \"what's that for? methinks it\nrings most vast, but hollow.\"\n\n\"Vengeance on a dumb brute!\" cried Starbuck, \"that simply smote thee\nfrom blindest instinct! Madness! To be enraged with a dumb thing,\nCaptain Ahab, seems blasphemous.\"\n\n\"Hark ye yet again  the little lower layer. All visible objects,\nman, are but as pasteboard masks. But in each event  in the living\nact, the undoubted deed  there, some unknown but still reasoning\nthing puts forth the mouldings of its features from behind the\nunreasoning mask. If man will strike, strike through the mask! How can\nthe prisoner reach outside except by thrusting through the wall? To\nme, the white whale is that wall, shoved near to me. Sometimes I think\nthere's naught beyond. But 'tis enough. He tasks me; he heaps me; I\nsee in him outrageous strength, with an inscrutable malice sinewing\nit. That inscrutable thing is chiefly what I hate; and be the white\nwhale agent, or be the white whale principal, I will wreak that hate\nupon him. Talk not to me of blasphemy, man; I'd strike the sun if it\ninsulted me. For could the sun do that, then could I do the other;\nsince there is ever a sort of fair play herein, jealousy presiding\nover all creations. But not my master, man, is even that fair\nplay. Who's over me? Truth hath no confines. Take off thine eye! more\nintolerable than fiends' glarings is a doltish stare! So, so; thou\nreddenest and palest; my heat has melted thee to anger-glow. But look\nye, Starbuck, what is said in heat, that thing unsays itself. There\nare men from whom warm words are small indignity. I meant not to\nincense thee. Let it go. Look! see yonder Turkish cheeks of spotted\ntawn  living, breathing pictures painted by the sun. The Pagan\nleopards  the unrecking and unworshipping things, that live; and\nseek, and give no reasons for the torrid life they feel! The crew,\nman, the crew! Are they not one and all with Ahab, in this matter of\nthe whale? See Stubb! he laughs! See yonder Chilian! he snorts to\nthink of it. Stand up amid the general hurricane, thy one tost sapling\ncannot, Starbuck! And what is it? Reckon it. 'Tis but to help strike a\nfin; no wondrous feat for Starbuck. What is it more? From this one\npoor hunt, then, the best lance out of all Nantucket, surely he will\nnot hang back, when every foremast-hand has clutched a whetstone? Ah!\nconstrainings seize thee; I see! the billow lifts thee! Speak, but\nspeak!  Aye, aye! thy silence, then, that voices thee. (Aside)\nSomething shot from my dilated nostrils, he has inhaled it in his\nlungs. Starbuck now is mine; cannot oppose me now, without rebellion.\"\n\n\"God keep me!  keep us all!\" murmured Starbuck, lowly.\n\nBut in his joy at the enchanted, tacit acquiescence of the mate, Ahab\ndid not hear his foreboding invocation; nor yet the low laugh from the\nhold; nor yet the presaging vibrations of the winds in the cordage;\nnor yet the hollow flap of the sails against the masts, as for a\nmoment their hearts sank in. For again Starbuck's downcast eyes\nlighted up with the stubbornness of life; the subterranean laugh died\naway; the winds blew on; the sails filled out; the ship heaved and\nrolled as before. Ah, ye admonitions and warnings! why stay ye not\nwhen ye come? But rather are ye predictions than warnings, ye shadows!\nYet not so much predictions from without, as verifications of the\nforegoing things within. For with little external to constrain us, the\ninnermost necessities in our being, these still drive us on.\n\n\"The measure! the measure!\" cried Ahab.\n\nReceiving the brimming pewter, and turning to the harpooneers, he\nordered them to produce their weapons. Then ranging them before him\nnear the capstan, with their harpoons in their hands, while his three\nmates stood at his side with their lances, and the rest of the ship's\ncompany formed a circle round the group; he stood for an instant\nsearchingly eyeing every man of his crew. But those wild eyes met his,\nas the bloodshot eyes of the prairie wolves meet the eye of their\nleader, ere he rushes on at their head in the trail of the bison; but,\nalas! only to fall into the hidden snare of the Indian.\n\n\"Drink and pass!\" he cried, handing the heavy charged flagon to the\nnearest seaman. \"The crew alone now drink. Round with it, round! Short\ndraughts  long swallows, men; 'tis hot as Satan's hoof. So, so; it\ngoes round excellently. It spiralizes in ye; forks out at the\nserpent-snapping eye. Well done; almost drained. That way it went,\nthis way it comes. Hand it me  here's a hollow! Men, ye seem the\nyears; so brimming life is gulped and gone. Steward, refill!\n\n\"Attend now, my braves. I have mustered ye all round this capstan; and\nye mates, flank me with your lances; and ye harpooneers, stand there\nwith your irons; and ye, stout mariners, ring me in, that I may in\nsome sort revive a noble custom of my fisherman fathers before me. O\nmen, you will yet see that  Ha! boy, come back? bad pennies come\nnot sooner. Hand it me. Why, now, this pewter had run brimming again,\nwere't not thou St. Vitus' imp  away, thou ague!\n\n\"Advance, ye mates! Cross your lances full before me. Well done! Let\nme touch the axis.\" So saying, with extended arm, he grasped the three\nlevel, radiating lances at their crossed centre; while so doing,\nsuddenly and nervously twitched them; meanwhile, glancing intently\nfrom Starbuck to Stubb; from Stubb to Flask. It seemed as though, by\nsome nameless, interior volition, he would fain have shocked into them\nthe same fiery emotion accumulated within the Leyden jar of his own\nmagnetic life. The three mates quailed before his strong, sustained,\nand mystic aspect. Stubb and Flask looked sideways from him; the\nhonest eye of Starbuck fell downright.\n\n\"In vain!\" cried Ahab; \"but, maybe, 'tis well. For did ye three but\nonce take the full-forced shock, then mine own electric thing, that\nhad perhaps expired from out me. Perchance, too, it would have dropped\nye dead. Perchance ye need it not. Down lances! And now, ye mates, I\ndo appoint ye three cupbearers to my three pagan kinsmen there  yon\nthree most honourable gentlemen and noblemen, my valiant\nharpooneers. Disdain the task? What, when the great Pope washes the\nfeet of beggars, using his tiara for ewer? Oh, my sweet cardinals!\nyour own condescension, that shall bend ye to it. I do not order ye;\nye will it. Cut your seizings and draw the poles, ye harpooneers!\"\n\nSilently obeying the order, the three harpooneers now stood with the\ndetached iron part of their harpoons, some three feet long, held,\nbarbs up, before him.\n\n\"Stab me not with that keen steel! Cant them; cant them over! know ye\nnot the goblet end? Turn up the socket! So, so; now, ye cup-bearers,\nadvance. The irons! take them; hold them while I fill!\" Forthwith,\nslowly going from one officer to the other, he brimmed the harpoon\nsockets with the fiery waters from the pewter.\n\n\"Now, three to three, ye stand. Commend the murderous chalices! Bestow\nthem, ye who are now made parties to this indissoluble league. Ha!\nStarbuck! but the deed is done! Yon ratifying sun now waits to sit\nupon it. Drink, ye harpooneers! drink and swear, ye men that man the\ndeathful whaleboat's bow  Death to Moby Dick! God hunt us all, if\nwe do not hunt Moby Dick to his death!\" The long, barbed steel goblets\nwere lifted; and to cries and maledictions against the white whale,\nthe spirits were simultaneously quaffed down with a hiss. Starbuck\npaled, and turned, and shivered. Once more, and finally, the\nreplenished pewter went the rounds among the frantic crew; when,\nwaving his free hand to them, they all dispersed; and Ahab retired\nwithin his cabin.\n\nCHAPTER 37 Sunset.\n\nThe cabin; by the stern windows; Ahab sitting alone, and gazing out.\n\nI leave a white and turbid wake; pale waters, paler cheeks, where'er I\nsail. The envious billows sidelong swell to whelm my track; let them;\nbut first I pass.\n\nYonder, by ever-brimming goblet's rim, the warm waves blush like\nwine. The gold brow plumbs the blue. The diver sun  slow dived from\nnoon  goes down; my soul mounts up! she wearies with her endless\nhill. Is, then, the crown too heavy that I wear? this Iron Crown of\nLombardy. Yet is it bright with many a gem; I the wearer, see not its\nfar flashings; but darkly feel that I wear that, that dazzlingly\nconfounds. 'Tis iron  that I know  not gold. 'Tis split, too \nthat I feel; the jagged edge galls me so, my brain seems to beat\nagainst the solid metal; aye, steel skull, mine; the sort that needs\nno helmet in the most brain-battering fight!\n\nDry heat upon my brow? Oh! time was, when as the sunrise nobly spurred\nme, so the sunset soothed. No more. This lovely light, it lights not\nme; all loveliness is anguish to me, since I can ne'er enjoy. Gifted\nwith the high perception, I lack the low, enjoying power; damned, most\nsubtly and most malignantly! damned in the midst of Paradise! Good\nnight  good night! (waving his hand, he moves from the window.)\n\n'Twas not so hard a task. I thought to find one stubborn, at the\nleast; but my one cogged circle fits into all their various wheels,\nand they revolve. Or, if you will, like so many ant-hills of powder,\nthey all stand before me; and I their match. Oh, hard! that to fire\nothers, the match itself must needs be wasting! What I've dared, I've\nwilled; and what I've willed, I'll do! They think me mad  Starbuck\ndoes; but I'm demoniac, I am madness maddened! That wild madness\nthat's only calm to comprehend itself! The prophecy was that I should\nbe dismembered; and  Aye! I lost this leg. I now prophesy that I\nwill dismember my dismemberer. Now, then, be the prophet and the\nfulfiller one. That's more than ye, ye great gods, ever were. I laugh\nand hoot at ye, ye cricket-players, ye pugilists, ye deaf Burkes and\nblinded Bendigoes! I will not say as schoolboys do to bullies  Take\nsome one of your own size; don't pommel me! No, ye've knocked me down,\nand I am up again; but YE have run and hidden. Come forth from behind\nyour cotton bags! I have no long gun to reach ye. Come, Ahab's\ncompliments to ye; come and see if ye can swerve me. Swerve me? ye\ncannot swerve me, else ye swerve yourselves! man has ye there. Swerve\nme? The path to my fixed purpose is laid with iron rails, whereon my\nsoul is grooved to run. Over unsounded gorges, through the rifled\nhearts of mountains, under torrents' beds, unerringly I rush! Naught's\nan obstacle, naught's an angle to the iron way!\n\nCHAPTER 38 Dusk.\n\nBy the Mainmast; Starbuck leaning against it.\n\nMy soul is more than matched; she's overmanned; and by a madman!\nInsufferable sting, that sanity should ground arms on such a field!\nBut he drilled deep down, and blasted all my reason out of me! I think\nI see his impious end; but feel that I must help him to it. Will I,\nnill I, the ineffable thing has tied me to him; tows me with a cable I\nhave no knife to cut. Horrible old man! Who's over him, he cries; \naye, he would be a democrat to all above; look, how he lords it over\nall below! Oh! I plainly see my miserable office,  to obey,\nrebelling; and worse yet, to hate with touch of pity! For in his eyes\nI read some lurid woe would shrivel me up, had I it. Yet is there\nhope. Time and tide flow wide. The hated whale has the round watery\nworld to swim in, as the small gold-fish has its glassy globe. His\nheaven-insulting purpose, God may wedge aside. I would up heart, were\nit not like lead. But my whole clock's run down; my heart the\nall-controlling weight, I have no key to lift again.\n\n[A burst of revelry from the forecastle.]\n\nOh, God! to sail with such a heathen crew that have small touch of\nhuman mothers in them! Whelped somewhere by the sharkish sea. The\nwhite whale is their demigorgon. Hark! the infernal orgies! that\nrevelry is forward! mark the unfaltering silence aft! Methinks it\npictures life. Foremost through the sparkling sea shoots on the gay,\nembattled, bantering bow, but only to drag dark Ahab after it, where\nhe broods within his sternward cabin, builded over the dead water of\nthe wake, and further on, hunted by its wolfish gurglings. The long\nhowl thrills me through! Peace! ye revellers, and set the watch! Oh,\nlife! 'tis in an hour like this, with soul beat down and held to\nknowledge,  as wild, untutored things are forced to feed  Oh,\nlife! 'tis now that I do feel the latent horror in thee! but 'tis not\nme! that horror's out of me! and with the soft feeling of the human in\nme, yet will I try to fight ye, ye grim, phantom futures! Stand by me,\nhold me, bind me, O ye blessed influences!\n\nCHAPTER 39 First Night Watch.\n\nFore-Top.\n\n(Stubb solus, and mending a brace.)\n\nHa! ha! ha! ha! hem! clear my throat!  I've been thinking over it\never since, and that ha, ha's the final consequence. Why so? Because a\nlaugh's the wisest, easiest answer to all that's queer; and come what\nwill, one comfort's always left  that unfailing comfort is, it's\nall predestinated. I heard not all his talk with Starbuck; but to my\npoor eye Starbuck then looked something as I the other evening\nfelt. Be sure the old Mogul has fixed him, too. I twigged it, knew it;\nhad had the gift, might readily have prophesied it  for when I\nclapped my eye upon his skull I saw it. Well, Stubb, WISE Stubb \nthat's my title  well, Stubb, what of it, Stubb? Here's a\ncarcase. I know not all that may be coming, but be it what it will,\nI'll go to it laughing. Such a waggish leering as lurks in all your\nhorribles! I feel funny. Fa, la! lirra, skirra! What's my juicy little\npear at home doing now? Crying its eyes out?  Giving a party to the\nlast arrived harpooneers, I dare say, gay as a frigate's pennant, and\nso am I  fa, la! lirra, skirra! Oh \n\nWe'll drink to-night with hearts as light, To love, as gay and\nfleeting As bubbles that swim, on the beaker's brim, And break on the\nlips while meeting.\n\nA brave stave that  who calls? Mr. Starbuck? Aye, aye, sir \n(Aside) he's my superior, he has his too, if I'm not mistaken. \nAye, aye, sir, just through with this job  coming.\n\nCHAPTER 40 Midnight, Forecastle.\n\nHARPOONEERS AND SAILORS.\n\n(Foresail rises and discovers the watch standing, lounging, leaning,\nand lying in various attitudes, all singing in chorus.)\n\nFarewell and adieu to you, Spanish ladies! Farewell and adieu to you,\nladies of Spain! Our captain's commanded. \n\n1ST NANTUCKET SAILOR.\n\nOh, boys, don't be sentimental; it's bad for the digestion! Take a\ntonic, follow me!\n\n(Sings, and all follow)\n\nOur captain stood upon the deck, A spy-glass in his hand, A viewing of\nthose gallant whales That blew at every strand. Oh, your tubs in your\nboats, my boys, And by your braces stand, And we'll have one of those\nfine whales, Hand, boys, over hand! So, be cheery, my lads! may your\nhearts never fail! While the bold harpooner is striking the whale!\n\nMATE'S VOICE FROM THE QUARTER-DECK.\n\nEight bells there, forward!\n\n2ND NANTUCKET SAILOR.\n\nAvast the chorus! Eight bells there! d'ye hear, bell-boy? Strike the\nbell eight, thou Pip! thou blackling! and let me call the watch. I've\nthe sort of mouth for that  the hogshead mouth. So, so, (thrusts\nhis head down the scuttle,) Star-bo-l-e-e-n-s, a-h-o-y! Eight bells\nthere below! Tumble up!\n\nDUTCH SAILOR.\n\nGrand snoozing to-night, maty; fat night for that. I mark this in our\nold Mogul's wine; it's quite as deadening to some as filliping to\nothers. We sing; they sleep  aye, lie down there, like ground-tier\nbutts. At 'em again! There, take this copper-pump, and hail 'em\nthrough it. Tell 'em to avast dreaming of their lasses. Tell 'em it's\nthe resurrection; they must kiss their last, and come to\njudgment. That's the way  that's it; thy throat ain't spoiled with\neating Amsterdam butter.\n\nFRENCH SAILOR.\n\nHist, boys! let's have a jig or two before we ride to anchor in\nBlanket Bay. What say ye? There comes the other watch. Stand by all\nlegs! Pip! little Pip! hurrah with your tambourine!\n\nPIP.  (Sulky and sleepy)\n\nDon't know where it is.\n\nFRENCH SAILOR.\n\nBeat thy belly, then, and wag thy ears. Jig it, men, I say; merry's\nthe word; hurrah! Damn me, won't you dance? Form, now, Indian-file,\nand gallop into the double-shuffle? Throw yourselves! Legs! legs!\n\nICELAND SAILOR.\n\nI don't like your floor, maty; it's too springy to my taste. I'm used\nto ice-floors. I'm sorry to throw cold water on the subject; but\nexcuse me.\n\nMALTESE SAILOR.\n\nMe too; where's your girls? Who but a fool would take his left hand by\nhis right, and say to himself, how d'ye do? Partners! I must have\npartners!\n\nSICILIAN SAILOR.\n\nAye; girls and a green!  then I'll hop with ye; yea, turn\ngrasshopper!\n\nLONG-ISLAND SAILOR.\n\nWell, well, ye sulkies, there's plenty more of us. Hoe corn when you\nmay, say I. All legs go to harvest soon. Ah! here comes the music; now\nfor it!\n\nAZORE SAILOR.  (Ascending, and pitching the tambourine up the\nscuttle.)\n\nHere you are, Pip; and there's the windlass-bitts; up you mount! Now,\nboys! (The half of them dance to the tambourine; some go below; some\nsleep or lie among the coils of rigging. Oaths a-plenty.)\n\nAZORE SAILOR.  (Dancing)\n\nGo it, Pip! Bang it, bell-boy! Rig it, dig it, stig it, quig it,\nbell-boy! Make fire-flies; break the jinglers!\n\nPIP.\n\nJinglers, you say?  there goes another, dropped off; I pound it so.\n\nCHINA SAILOR.\n\nRattle thy teeth, then, and pound away; make a pagoda of thyself.\n\nFRENCH SAILOR.\n\nMerry-mad! Hold up thy hoop, Pip, till I jump through it! Split jibs!\ntear yourselves!\n\nTASHTEGO.  (Quietly smoking)\n\nThat's a white man; he calls that fun: humph! I save my sweat.\n\nOLD MANX SAILOR.\n\nI wonder whether those jolly lads bethink them of what they are\ndancing over. I'll dance over your grave, I will  that's the\nbitterest threat of your night-women, that beat head-winds round\ncorners. O Christ! to think of the green navies and the green-skulled\ncrews! Well, well; belike the whole world's a ball, as you scholars\nhave it; and so 'tis right to make one ballroom of it. Dance on, lads,\nyou're young; I was once.\n\n3D NANTUCKET SAILOR.\n\nSpell oh!  whew! this is worse than pulling after whales in a calm\n give us a whiff, Tash.\n\n(They cease dancing, and gather in clusters. Meantime the sky darkens\n the wind rises.)\n\nLASCAR SAILOR.\n\nBy Brahma! boys, it'll be douse sail soon. The sky-born, high-tide\nGanges turned to wind! Thou showest thy black brow, Seeva!\n\nMALTESE SAILOR.  (Reclining and shaking his cap.)\n\nIt's the waves  the snow's caps turn to jig it now. They'll shake\ntheir tassels soon. Now would all the waves were women, then I'd go\ndrown, and chassee with them evermore! There's naught so sweet on\nearth  heaven may not match it!  as those swift glances of warm,\nwild bosoms in the dance, when the over-arboring arms hide such ripe,\nbursting grapes.\n\nSICILIAN SAILOR.  (Reclining.)\n\nTell me not of it! Hark ye, lad  fleet interlacings of the limbs\n lithe swayings  coyings  flutterings! lip! heart! hip! all\ngraze: unceasing touch and go! not taste, observe ye, else come\nsatiety. Eh, Pagan? (Nudging.)\n\nTAHITAN SAILOR.  (Reclining on a mat.)\n\nHail, holy nakedness of our dancing girls!  the Heeva-Heeva! Ah!\nlow veiled, high palmed Tahiti! I still rest me on thy mat, but the\nsoft soil has slid! I saw thee woven in the wood, my mat! green the\nfirst day I brought ye thence; now worn and wilted quite. Ah me! \nnot thou nor I can bear the change! How then, if so be transplanted to\nyon sky? Hear I the roaring streams from Pirohitee's peak of spears,\nwhen they leap down the crags and drown the villages?  The blast!\nthe blast! Up, spine, and meet it! (Leaps to his feet.)\n\nPORTUGUESE SAILOR.\n\nHow the sea rolls swashing 'gainst the side! Stand by for reefing,\nhearties! the winds are just crossing swords, pell-mell they'll go\nlunging presently.\n\nDANISH SAILOR.\n\nCrack, crack, old ship! so long as thou crackest, thou holdest! Well\ndone! The mate there holds ye to it stiffly. He's no more afraid than\nthe isle fort at Cattegat, put there to fight the Baltic with\nstorm-lashed guns, on which the sea-salt cakes!\n\n4TH NANTUCKET SAILOR.\n\nHe has his orders, mind ye that. I heard old Ahab tell him he must\nalways kill a squall, something as they burst a waterspout with a\npistol  fire your ship right into it!\n\nENGLISH SAILOR.\n\nBlood! but that old man's a grand old cove! We are the lads to hunt\nhim up his whale!\n\nALL.\n\nAye! aye!\n\nOLD MANX SAILOR.\n\nHow the three pines shake! Pines are the hardest sort of tree to live\nwhen shifted to any other soil, and here there's none but the crew's\ncursed clay. Steady, helmsman! steady. This is the sort of weather\nwhen brave hearts snap ashore, and keeled hulls split at sea. Our\ncaptain has his birthmark; look yonder, boys, there's another in the\nsky  lurid-like, ye see, all else pitch black.\n\nDAGGOO.\n\nWhat of that? Who's afraid of black's afraid of me! I'm quarried out\nof it!\n\nSPANISH SAILOR.  (Aside.)\n\nHe wants to bully, ah!  the old grudge makes me touchy (Advancing.)\nAye, harpooneer, thy race is the undeniable dark side of mankind \ndevilish dark at that. No offence.\n\nDAGGOO (Grimly).\n\nNone.\n\nST. JAGO'S SAILOR.\n\nThat Spaniard's mad or drunk. But that can't be, or else in his one\ncase our old Mogul's fire-waters are somewhat long in working.\n\n5TH NANTUCKET SAILOR.\n\nWhat's that I saw  lightning? Yes.\n\nSPANISH SAILOR.\n\nNo; Daggoo showing his teeth.\n\nDAGGOO (Springing).\n\nSwallow thine, mannikin! White skin, white liver!\n\nSPANISH SAILOR (Meeting him).\n\nKnife thee heartily! big frame, small spirit!\n\nALL.\n\nA row! a row! a row!\n\nTASHTEGO (With a whiff).\n\nA row a'low, and a row aloft  Gods and men  both brawlers!\nHumph!\n\nBELFAST SAILOR.\n\nA row! arrah a row! The Virgin be blessed, a row! Plunge in with ye!\n\nENGLISH SAILOR.\n\nFair play! Snatch the Spaniard's knife! A ring, a ring!\n\nOLD MANX SAILOR.\n\nReady formed. There! the ringed horizon. In that ring Cain struck\nAbel. Sweet work, right work! No? Why then, God, mad'st thou the ring?\n\nMATE'S VOICE FROM THE QUARTER-DECK.\n\nHands by the halyards! in top-gallant sails! Stand by to reef\ntopsails!\n\nALL.\n\nThe squall! the squall! jump, my jollies! (They scatter.)\n\nPIP (Shrinking under the windlass).\n\nJollies? Lord help such jollies! Crish, crash! there goes the\njib-stay! Blang-whang! God! Duck lower, Pip, here comes the royal\nyard! It's worse than being in the whirled woods, the last day of the\nyear! Who'd go climbing after chestnuts now? But there they go, all\ncursing, and here I don't. Fine prospects to 'em; they're on the road\nto heaven. Hold on hard! Jimmini, what a squall! But those chaps there\nare worse yet  they are your white squalls, they. White squalls?\nwhite whale, shirr! shirr! Here have I heard all their chat just now,\nand the white whale  shirr! shirr!  but spoken of once! and only\nthis evening  it makes me jingle all over like my tambourine \nthat anaconda of an old man swore 'em in to hunt him! Oh, thou big\nwhite God aloft there somewhere in yon darkness, have mercy on this\nsmall black boy down here; preserve him from all men that have no\nbowels to feel fear!\n\nCHAPTER 41 Moby Dick.\n\nI, Ishmael, was one of that crew; my shouts had gone up with the rest;\nmy oath had been welded with theirs; and stronger I shouted, and more\ndid I hammer and clinch my oath, because of the dread in my soul. A\nwild, mystical, sympathetical feeling was in me; Ahab's quenchless\nfeud seemed mine. With greedy ears I learned the history of that\nmurderous monster against whom I and all the others had taken our\noaths of violence and revenge.\n\nFor some time past, though at intervals only, the unaccompanied,\nsecluded White Whale had haunted those uncivilized seas mostly\nfrequented by the Sperm Whale fishermen. But not all of them knew of\nhis existence; only a few of them, comparatively, had knowingly seen\nhim; while the number who as yet had actually and knowingly given\nbattle to him, was small indeed. For, owing to the large number of\nwhale-cruisers; the disorderly way they were sprinkled over the entire\nwatery circumference, many of them adventurously pushing their quest\nalong solitary latitudes, so as seldom or never for a whole\ntwelvemonth or more on a stretch, to encounter a single news-telling\nsail of any sort; the inordinate length of each separate voyage; the\nirregularity of the times of sailing from home; all these, with other\ncircumstances, direct and indirect, long obstructed the spread through\nthe whole world-wide whaling-fleet of the special individualizing\ntidings concerning Moby Dick. It was hardly to be doubted, that\nseveral vessels reported to have encountered, at such or such a time,\nor on such or such a meridian, a Sperm Whale of uncommon magnitude and\nmalignity, which whale, after doing great mischief to his assailants,\nhad completely escaped them; to some minds it was not an unfair\npresumption, I say, that the whale in question must have been no other\nthan Moby Dick. Yet as of late the Sperm Whale fishery had been marked\nby various and not unfrequent instances of great ferocity, cunning,\nand malice in the monster attacked; therefore it was, that those who\nby accident ignorantly gave battle to Moby Dick; such hunters,\nperhaps, for the most part, were content to ascribe the peculiar\nterror he bred, more, as it were, to the perils of the Sperm Whale\nfishery at large, than to the individual cause. In that way, mostly,\nthe disastrous encounter between Ahab and the whale had hitherto been\npopularly regarded.\n\nAnd as for those who, previously hearing of the White Whale, by chance\ncaught sight of him; in the beginning of the thing they had every one\nof them, almost, as boldly and fearlessly lowered for him, as for any\nother whale of that species. But at length, such calamities did ensue\nin these assaults  not restricted to sprained wrists and ankles,\nbroken limbs, or devouring amputations  but fatal to the last\ndegree of fatality; those repeated disastrous repulses, all\naccumulating and piling their terrors upon Moby Dick; those things had\ngone far to shake the fortitude of many brave hunters, to whom the\nstory of the White Whale had eventually come.\n\nNor did wild rumors of all sorts fail to exaggerate, and still the\nmore horrify the true histories of these deadly encounters. For not\nonly do fabulous rumors naturally grow out of the very body of all\nsurprising terrible events,  as the smitten tree gives birth to its\nfungi; but, in maritime life, far more than in that of terra firma,\nwild rumors abound, wherever there is any adequate reality for them to\ncling to. And as the sea surpasses the land in this matter, so the\nwhale fishery surpasses every other sort of maritime life, in the\nwonderfulness and fearfulness of the rumors which sometimes circulate\nthere. For not only are whalemen as a body unexempt from that\nignorance and superstitiousness hereditary to all sailors; but of all\nsailors, they are by all odds the most directly brought into contact\nwith whatever is appallingly astonishing in the sea; face to face they\nnot only eye its greatest marvels, but, hand to jaw, give battle to\nthem. Alone, in such remotest waters, that though you sailed a\nthousand miles, and passed a thousand shores, you would not come to\nany chiseled hearth-stone, or aught hospitable beneath that part of\nthe sun; in such latitudes and longitudes, pursuing too such a calling\nas he does, the whaleman is wrapped by influences all tending to make\nhis fancy pregnant with many a mighty birth.\n\nNo wonder, then, that ever gathering volume from the mere transit over\nthe widest watery spaces, the outblown rumors of the White Whale did\nin the end incorporate with themselves all manner of morbid hints, and\nhalf-formed foetal suggestions of supernatural agencies, which\neventually invested Moby Dick with new terrors unborrowed from\nanything that visibly appears. So that in many cases such a panic did\nhe finally strike, that few who by those rumors, at least, had heard\nof the White Whale, few of those hunters were willing to encounter the\nperils of his jaw.\n\nBut there were still other and more vital practical influences at\nwork. Not even at the present day has the original prestige of the\nSperm Whale, as fearfully distinguished from all other species of the\nleviathan, died out of the minds of the whalemen as a body. There are\nthose this day among them, who, though intelligent and courageous\nenough in offering battle to the Greenland or Right whale, would\nperhaps  either from professional inexperience, or incompetency, or\ntimidity, decline a contest with the Sperm Whale; at any rate, there\nare plenty of whalemen, especially among those whaling nations not\nsailing under the American flag, who have never hostilely encountered\nthe Sperm Whale, but whose sole knowledge of the leviathan is\nrestricted to the ignoble monster primitively pursued in the North;\nseated on their hatches, these men will hearken with a childish\nfireside interest and awe, to the wild, strange tales of Southern\nwhaling. Nor is the pre-eminent tremendousness of the great Sperm\nWhale anywhere more feelingly comprehended, than on board of those\nprows which stem him.\n\nAnd as if the now tested reality of his might had in former legendary\ntimes thrown its shadow before it; we find some book naturalists \nOlassen and Povelson  declaring the Sperm Whale not only to be a\nconsternation to every other creature in the sea, but also to be so\nincredibly ferocious as continually to be athirst for human blood. Nor\neven down to so late a time as Cuvier's, were these or almost similar\nimpressions effaced. For in his Natural History, the Baron himself\naffirms that at sight of the Sperm Whale, all fish (sharks included)\nare \"struck with the most lively terrors,\" and \"often in the\nprecipitancy of their flight dash themselves against the rocks with\nsuch violence as to cause instantaneous death.\" And however the\ngeneral experiences in the fishery may amend such reports as these;\nyet in their full terribleness, even to the bloodthirsty item of\nPovelson, the superstitious belief in them is, in some vicissitudes of\ntheir vocation, revived in the minds of the hunters.\n\nSo that overawed by the rumors and portents concerning him, not a few\nof the fishermen recalled, in reference to Moby Dick, the earlier days\nof the Sperm Whale fishery, when it was oftentimes hard to induce long\npractised Right whalemen to embark in the perils of this new and\ndaring warfare; such men protesting that although other leviathans\nmight be hopefully pursued, yet to chase and point lance at such an\napparition as the Sperm Whale was not for mortal man. That to attempt\nit, would be inevitably to be torn into a quick eternity. On this\nhead, there are some remarkable documents that may be consulted.\n\nNevertheless, some there were, who even in the face of these things\nwere ready to give chase to Moby Dick; and a still greater number who,\nchancing only to hear of him distantly and vaguely, without the\nspecific details of any certain calamity, and without superstitious\naccompaniments, were sufficiently hardy not to flee from the battle if\noffered.\n\nOne of the wild suggestions referred to, as at last coming to be\nlinked with the White Whale in the minds of the superstitiously\ninclined, was the unearthly conceit that Moby Dick was ubiquitous;\nthat he had actually been encountered in opposite latitudes at one and\nthe same instant of time.\n\nNor, credulous as such minds must have been, was this conceit\naltogether without some faint show of superstitious probability. For\nas the secrets of the currents in the seas have never yet been\ndivulged, even to the most erudite research; so the hidden ways of the\nSperm Whale when beneath the surface remain, in great part,\nunaccountable to his pursuers; and from time to time have originated\nthe most curious and contradictory speculations regarding them,\nespecially concerning the mystic modes whereby, after sounding to a\ngreat depth, he transports himself with such vast swiftness to the\nmost widely distant points.\n\nIt is a thing well known to both American and English whale-ships, and\nas well a thing placed upon authoritative record years ago by\nScoresby, that some whales have been captured far north in the\nPacific, in whose bodies have been found the barbs of harpoons darted\nin the Greenland seas. Nor is it to be gainsaid, that in some of these\ninstances it has been declared that the interval of time between the\ntwo assaults could not have exceeded very many days. Hence, by\ninference, it has been believed by some whalemen, that the Nor' West\nPassage, so long a problem to man, was never a problem to the\nwhale. So that here, in the real living experience of living men, the\nprodigies related in old times of the inland Strello mountain in\nPortugal (near whose top there was said to be a lake in which the\nwrecks of ships floated up to the surface); and that still more\nwonderful story of the Arethusa fountain near Syracuse (whose waters\nwere believed to have come from the Holy Land by an underground\npassage); these fabulous narrations are almost fully equalled by the\nrealities of the whalemen.\n\nForced into familiarity, then, with such prodigies as these; and\nknowing that after repeated, intrepid assaults, the White Whale had\nescaped alive; it cannot be much matter of surprise that some whalemen\nshould go still further in their superstitions; declaring Moby Dick\nnot only ubiquitous, but immortal (for immortality is but ubiquity in\ntime); that though groves of spears should be planted in his flanks,\nhe would still swim away unharmed; or if indeed he should ever be made\nto spout thick blood, such a sight would be but a ghastly deception;\nfor again in unensanguined billows hundreds of leagues away, his\nunsullied jet would once more be seen.\n\nBut even stripped of these supernatural surmisings, there was enough\nin the earthly make and incontestable character of the monster to\nstrike the imagination with unwonted power. For, it was not so much\nhis uncommon bulk that so much distinguished him from other sperm\nwhales, but, as was elsewhere thrown out  a peculiar snow-white\nwrinkled forehead, and a high, pyramidical white hump. These were his\nprominent features; the tokens whereby, even in the limitless,\nuncharted seas, he revealed his identity, at a long distance, to those\nwho knew him.\n\nThe rest of his body was so streaked, and spotted, and marbled with\nthe same shrouded hue, that, in the end, he had gained his distinctive\nappellation of the White Whale; a name, indeed, literally justified by\nhis vivid aspect, when seen gliding at high noon through a dark blue\nsea, leaving a milky-way wake of creamy foam, all spangled with golden\ngleamings.\n\nNor was it his unwonted magnitude, nor his remarkable hue, nor yet his\ndeformed lower jaw, that so much invested the whale with natural\nterror, as that unexampled, intelligent malignity which, according to\nspecific accounts, he had over and over again evinced in his\nassaults. More than all, his treacherous retreats struck more of\ndismay than perhaps aught else. For, when swimming before his exulting\npursuers, with every apparent symptom of alarm, he had several times\nbeen known to turn round suddenly, and, bearing down upon them, either\nstave their boats to splinters, or drive them back in consternation to\ntheir ship.\n\nAlready several fatalities had attended his chase. But though similar\ndisasters, however little bruited ashore, were by no means unusual in\nthe fishery; yet, in most instances, such seemed the White Whale's\ninfernal aforethought of ferocity, that every dismembering or death\nthat he caused, was not wholly regarded as having been inflicted by an\nunintelligent agent.\n\nJudge, then, to what pitches of inflamed, distracted fury the minds of\nhis more desperate hunters were impelled, when amid the chips of\nchewed boats, and the sinking limbs of torn comrades, they swam out of\nthe white curds of the whale's direful wrath into the serene,\nexasperating sunlight, that smiled on, as if at a birth or a bridal.\n\nHis three boats stove around him, and oars and men both whirling in\nthe eddies; one captain, seizing the line-knife from his broken prow,\nhad dashed at the whale, as an Arkansas duellist at his foe, blindly\nseeking with a six inch blade to reach the fathom-deep life of the\nwhale. That captain was Ahab. And then it was, that suddenly sweeping\nhis sickle-shaped lower jaw beneath him, Moby Dick had reaped away\nAhab's leg, as a mower a blade of grass in the field. No turbaned\nTurk, no hired Venetian or Malay, could have smote him with more\nseeming malice. Small reason was there to doubt, then, that ever since\nthat almost fatal encounter, Ahab had cherished a wild vindictiveness\nagainst the whale, all the more fell for that in his frantic\nmorbidness he at last came to identify with him, not only all his\nbodily woes, but all his intellectual and spiritual exasperations. The\nWhite Whale swam before him as the monomaniac incarnation of all those\nmalicious agencies which some deep men feel eating in them, till they\nare left living on with half a heart and half a lung. That intangible\nmalignity which has been from the beginning; to whose dominion even\nthe modern Christians ascribe one-half of the worlds; which the\nancient Ophites of the east reverenced in their statue devil;  Ahab\ndid not fall down and worship it like them; but deliriously\ntransferring its idea to the abhorred white whale, he pitted himself,\nall mutilated, against it. All that most maddens and torments; all\nthat stirs up the lees of things; all truth with malice in it; all\nthat cracks the sinews and cakes the brain; all the subtle demonisms\nof life and thought; all evil, to crazy Ahab, were visibly\npersonified, and made practically assailable in Moby Dick. He piled\nupon the whale's white hump the sum of all the general rage and hate\nfelt by his whole race from Adam down; and then, as if his chest had\nbeen a mortar, he burst his hot heart's shell upon it.\n\nIt is not probable that this monomania in him took its instant rise at\nthe precise time of his bodily dismemberment. Then, in darting at the\nmonster, knife in hand, he had but given loose to a sudden,\npassionate, corporal animosity; and when he received the stroke that\ntore him, he probably but felt the agonizing bodily laceration, but\nnothing more. Yet, when by this collision forced to turn towards home,\nand for long months of days and weeks, Ahab and anguish lay stretched\ntogether in one hammock, rounding in mid winter that dreary, howling\nPatagonian Cape; then it was, that his torn body and gashed soul bled\ninto one another; and so interfusing, made him mad. That it was only\nthen, on the homeward voyage, after the encounter, that the final\nmonomania seized him, seems all but certain from the fact that, at\nintervals during the passage, he was a raving lunatic; and, though\nunlimbed of a leg, yet such vital strength yet lurked in his Egyptian\nchest, and was moreover intensified by his delirium, that his mates\nwere forced to lace him fast, even there, as he sailed, raving in his\nhammock. In a strait-jacket, he swung to the mad rockings of the\ngales. And, when running into more sufferable latitudes, the ship,\nwith mild stun'sails spread, floated across the tranquil tropics, and,\nto all appearances, the old man's delirium seemed left behind him with\nthe Cape Horn swells, and he came forth from his dark den into the\nblessed light and air; even then, when he bore that firm, collected\nfront, however pale, and issued his calm orders once again; and his\nmates thanked God the direful madness was now gone; even then, Ahab,\nin his hidden self, raved on. Human madness is oftentimes a cunning\nand most feline thing. When you think it fled, it may have but become\ntransfigured into some still subtler form. Ahab's full lunacy subsided\nnot, but deepeningly contracted; like the unabated Hudson, when that\nnoble Northman flows narrowly, but unfathomably through the Highland\ngorge. But, as in his narrow-flowing monomania, not one jot of Ahab's\nbroad madness had been left behind; so in that broad madness, not one\njot of his great natural intellect had perished. That before living\nagent, now became the living instrument. If such a furious trope may\nstand, his special lunacy stormed his general sanity, and carried it,\nand turned all its concentred cannon upon its own mad mark; so that\nfar from having lost his strength, Ahab, to that one end, did now\npossess a thousand fold more potency than ever he had sanely brought\nto bear upon any one reasonable object.\n\nThis is much; yet Ahab's larger, darker, deeper part remains\nunhinted. But vain to popularize profundities, and all truth is\nprofound. Winding far down from within the very heart of this spiked\nHotel de Cluny where we here stand  however grand and wonderful,\nnow quit it;  and take your way, ye nobler, sadder souls, to those\nvast Roman halls of Thermes; where far beneath the fantastic towers of\nman's upper earth, his root of grandeur, his whole awful essence sits\nin bearded state; an antique buried beneath antiquities, and throned\non torsoes! So with a broken throne, the great gods mock that captive\nking; so like a Caryatid, he patient sits, upholding on his frozen\nbrow the piled entablatures of ages. Wind ye down there, ye prouder,\nsadder souls! question that proud, sad king! A family likeness! aye,\nhe did beget ye, ye young exiled royalties; and from your grim sire\nonly will the old State-secret come.\n\nNow, in his heart, Ahab had some glimpse of this, namely: all my means\nare sane, my motive and my object mad. Yet without power to kill, or\nchange, or shun the fact; he likewise knew that to mankind he did long\ndissemble; in some sort, did still. But that thing of his dissembling\nwas only subject to his perceptibility, not to his will\ndeterminate. Nevertheless, so well did he succeed in that dissembling,\nthat when with ivory leg he stepped ashore at last, no Nantucketer\nthought him otherwise than but naturally grieved, and that to the\nquick, with the terrible casualty which had overtaken him.\n\nThe report of his undeniable delirium at sea was likewise popularly\nascribed to a kindred cause. And so too, all the added moodiness which\nalways afterwards, to the very day of sailing in the Pequod on the\npresent voyage, sat brooding on his brow. Nor is it so very unlikely,\nthat far from distrusting his fitness for another whaling voyage, on\naccount of such dark symptoms, the calculating people of that prudent\nisle were inclined to harbor the conceit, that for those very reasons\nhe was all the better qualified and set on edge, for a pursuit so full\nof rage and wildness as the bloody hunt of whales. Gnawed within and\nscorched without, with the infixed, unrelenting fangs of some\nincurable idea; such an one, could he be found, would seem the very\nman to dart his iron and lift his lance against the most appalling of\nall brutes. Or, if for any reason thought to be corporeally\nincapacitated for that, yet such an one would seem superlatively\ncompetent to cheer and howl on his underlings to the attack. But be\nall this as it may, certain it is, that with the mad secret of his\nunabated rage bolted up and keyed in him, Ahab had purposely sailed\nupon the present voyage with the one only and all-engrossing object of\nhunting the White Whale. Had any one of his old acquaintances on shore\nbut half dreamed of what was lurking in him then, how soon would their\naghast and righteous souls have wrenched the ship from such a fiendish\nman! They were bent on profitable cruises, the profit to be counted\ndown in dollars from the mint. He was intent on an audacious,\nimmitigable, and supernatural revenge.\n\nHere, then, was this grey-headed, ungodly old man, chasing with curses\na Job's whale round the world, at the head of a crew, too, chiefly\nmade up of mongrel renegades, and castaways, and cannibals  morally\nenfeebled also, by the incompetence of mere unaided virtue or\nright-mindedness in Starbuck, the invunerable jollity of indifference\nand recklessness in Stubb, and the pervading mediocrity in Flask. Such\na crew, so officered, seemed specially picked and packed by some\ninfernal fatality to help him to his monomaniac revenge. How it was\nthat they so aboundingly responded to the old man's ire  by what\nevil magic their souls were possessed, that at times his hate seemed\nalmost theirs; the White Whale as much their insufferable foe as his;\nhow all this came to be  what the White Whale was to them, or how\nto their unconscious understandings, also, in some dim, unsuspected\nway, he might have seemed the gliding great demon of the seas of life,\n all this to explain, would be to dive deeper than Ishmael can\ngo. The subterranean miner that works in us all, how can one tell\nwhither leads his shaft by the ever shifting, muffled sound of his\npick? Who does not feel the irresistible arm drag? What skiff in tow\nof a seventy-four can stand still? For one, I gave myself up to the\nabandonment of the time and the place; but while yet all a-rush to\nencounter the whale, could see naught in that brute but the deadliest\nill.\n\nCHAPTER 42 The Whiteness of The Whale.\n\nWhat the white whale was to Ahab, has been hinted; what, at times, he\nwas to me, as yet remains unsaid.\n\nAside from those more obvious considerations touching Moby Dick, which\ncould not but occasionally awaken in any man's soul some alarm, there\nwas another thought, or rather vague, nameless horror concerning him,\nwhich at times by its intensity completely overpowered all the rest;\nand yet so mystical and well nigh ineffable was it, that I almost\ndespair of putting it in a comprehensible form. It was the whiteness\nof the whale that above all things appalled me. But how can I hope to\nexplain myself here; and yet, in some dim, random way, explain myself\nI must, else all these chapters might be naught.\n\nThough in many natural objects, whiteness refiningly enhances beauty,\nas if imparting some special virtue of its own, as in marbles,\njaponicas, and pearls; and though various nations have in some way\nrecognised a certain royal preeminence in this hue; even the barbaric,\ngrand old kings of Pegu placing the title \"Lord of the White\nElephants\" above all their other magniloquent ascriptions of dominion;\nand the modern kings of Siam unfurling the same snow-white quadruped\nin the royal standard; and the Hanoverian flag bearing the one figure\nof a snow-white charger; and the great Austrian Empire, Caesarian,\nheir to overlording Rome, having for the imperial colour the same\nimperial hue; and though this pre-eminence in it applies to the human\nrace itself, giving the white man ideal mastership over every dusky\ntribe; and though, besides, all this, whiteness has been even made\nsignificant of gladness, for among the Romans a white stone marked a\njoyful day; and though in other mortal sympathies and symbolizings,\nthis same hue is made the emblem of many touching, noble things \nthe innocence of brides, the benignity of age; though among the Red\nMen of America the giving of the white belt of wampum was the deepest\npledge of honour; though in many climes, whiteness typifies the\nmajesty of Justice in the ermine of the Judge, and contributes to the\ndaily state of kings and queens drawn by milk-white steeds; though\neven in the higher mysteries of the most august religions it has been\nmade the symbol of the divine spotlessness and power; by the Persian\nfire worshippers, the white forked flame being held the holiest on the\naltar; and in the Greek mythologies, Great Jove himself being made\nincarnate in a snow-white bull; and though to the noble Iroquois, the\nmidwinter sacrifice of the sacred White Dog was by far the holiest\nfestival of their theology, that spotless, faithful creature being\nheld the purest envoy they could send to the Great Spirit with the\nannual tidings of their own fidelity; and though directly from the\nLatin word for white, all Christian priests derive the name of one\npart of their sacred vesture, the alb or tunic, worn beneath the\ncassock; and though among the holy pomps of the Romish faith, white is\nspecially employed in the celebration of the Passion of our Lord;\nthough in the Vision of St. John, white robes are given to the\nredeemed, and the four-and-twenty elders stand clothed in white before\nthe great-white throne, and the Holy One that sitteth there white like\nwool; yet for all these accumulated associations, with whatever is\nsweet, and honourable, and sublime, there yet lurks an elusive\nsomething in the innermost idea of this hue, which strikes more of\npanic to the soul than that redness which affrights in blood.\n\nThis elusive quality it is, which causes the thought of whiteness,\nwhen divorced from more kindly associations, and coupled with any\nobject terrible in itself, to heighten that terror to the furthest\nbounds. Witness the white bear of the poles, and the white shark of\nthe tropics; what but their smooth, flaky whiteness makes them the\ntranscendent horrors they are? That ghastly whiteness it is which\nimparts such an abhorrent mildness, even more loathsome than terrific,\nto the dumb gloating of their aspect. So that not the fierce-fanged\ntiger in his heraldic coat can so stagger courage as the\nwhite-shrouded bear or shark.\n\nBethink thee of the albatross, whence come those clouds of spiritual\nwonderment and pale dread, in which that white phantom sails in all\nimaginations? Not Coleridge first threw that spell; but God's great,\nunflattering laureate, Nature.\n\nMost famous in our Western annals and Indian traditions is that of the\nWhite Steed of the Prairies; a magnificent milk-white charger,\nlarge-eyed, small-headed, bluff-chested, and with the dignity of a\nthousand monarchs in his lofty, overscorning carriage. He was the\nelected Xerxes of vast herds of wild horses, whose pastures in those\ndays were only fenced by the Rocky Mountains and the Alleghanies. At\ntheir flaming head he westward trooped it like that chosen star which\nevery evening leads on the hosts of light. The flashing cascade of his\nmane, the curving comet of his tail, invested him with housings more\nresplendent than gold and silver-beaters could have furnished him. A\nmost imperial and archangelical apparition of that unfallen, western\nworld, which to the eyes of the old trappers and hunters revived the\nglories of those primeval times when Adam walked majestic as a god,\nbluff-browed and fearless as this mighty steed. Whether marching amid\nhis aides and marshals in the van of countless cohorts that endlessly\nstreamed it over the plains, like an Ohio; or whether with his\ncircumambient subjects browsing all around at the horizon, the White\nSteed gallopingly reviewed them with warm nostrils reddening through\nhis cool milkiness; in whatever aspect he presented himself, always to\nthe bravest Indians he was the object of trembling reverence and\nawe. Nor can it be questioned from what stands on legendary record of\nthis noble horse, that it was his spiritual whiteness chiefly, which\nso clothed him with divineness; and that this divineness had that in\nit which, though commanding worship, at the same time enforced a\ncertain nameless terror.\n\nBut there are other instances where this whiteness loses all that\naccessory and strange glory which invests it in the White Steed and\nAlbatross.\n\nWhat is it that in the Albino man so peculiarly repels and often\nshocks the eye, as that sometimes he is loathed by his own kith and\nkin! It is that whiteness which invests him, a thing expressed by the\nname he bears. The Albino is as well made as other men  has no\nsubstantive deformity  and yet this mere aspect of all-pervading\nwhiteness makes him more strangely hideous than the ugliest\nabortion. Why should this be so?\n\nNor, in quite other aspects, does Nature in her least palpable but not\nthe less malicious agencies, fail to enlist among her forces this\ncrowning attribute of the terrible. From its snowy aspect, the\ngauntleted ghost of the Southern Seas has been denominated the White\nSquall. Nor, in some historic instances, has the art of human malice\nomitted so potent an auxiliary. How wildly it heightens the effect of\nthat passage in Froissart, when, masked in the snowy symbol of their\nfaction, the desperate White Hoods of Ghent murder their bailiff in\nthe market-place!\n\nNor, in some things, does the common, hereditary experience of all\nmankind fail to bear witness to the supernaturalism of this hue. It\ncannot well be doubted, that the one visible quality in the aspect of\nthe dead which most appals the gazer, is the marble pallor lingering\nthere; as if indeed that pallor were as much like the badge of\nconsternation in the other world, as of mortal trepidation here. And\nfrom that pallor of the dead, we borrow the expressive hue of the\nshroud in which we wrap them. Nor even in our superstitions do we fail\nto throw the same snowy mantle round our phantoms; all ghosts rising\nin a milk-white fog  Yea, while these terrors seize us, let us add,\nthat even the king of terrors, when personified by the evangelist,\nrides on his pallid horse.\n\nTherefore, in his other moods, symbolize whatever grand or gracious\nthing he will by whiteness, no man can deny that in its profoundest\nidealized significance it calls up a peculiar apparition to the soul.\n\nBut though without dissent this point be fixed, how is mortal man to\naccount for it? To analyse it, would seem impossible. Can we, then, by\nthe citation of some of those instances wherein this thing of\nwhiteness  though for the time either wholly or in great part\nstripped of all direct associations calculated to impart to it aught\nfearful, but nevertheless, is found to exert over us the same sorcery,\nhowever modified;  can we thus hope to light upon some chance clue\nto conduct us to the hidden cause we seek?\n\nLet us try. But in a matter like this, subtlety appeals to subtlety,\nand without imagination no man can follow another into these\nhalls. And though, doubtless, some at least of the imaginative\nimpressions about to be presented may have been shared by most men,\nyet few perhaps were entirely conscious of them at the time, and\ntherefore may not be able to recall them now.\n\nWhy to the man of untutored ideality, who happens to be but loosely\nacquainted with the peculiar character of the day, does the bare\nmention of Whitsuntide marshal in the fancy such long, dreary,\nspeechless processions of slow-pacing pilgrims, down-cast and hooded\nwith new-fallen snow? Or, to the unread, unsophisticated Protestant of\nthe Middle American States, why does the passing mention of a White\nFriar or a White Nun, evoke such an eyeless statue in the soul?\n\nOr what is there apart from the traditions of dungeoned warriors and\nkings (which will not wholly account for it) that makes the White\nTower of London tell so much more strongly on the imagination of an\nuntravelled American, than those other storied structures, its\nneighbors  the Byward Tower, or even the Bloody? And those sublimer\ntowers, the White Mountains of New Hampshire, whence, in peculiar\nmoods, comes that gigantic ghostliness over the soul at the bare\nmention of that name, while the thought of Virginia's Blue Ridge is\nfull of a soft, dewy, distant dreaminess? Or why, irrespective of all\nlatitudes and longitudes, does the name of the White Sea exert such a\nspectralness over the fancy, while that of the Yellow Sea lulls us\nwith mortal thoughts of long lacquered mild afternoons on the waves,\nfollowed by the gaudiest and yet sleepiest of sunsets? Or, to choose a\nwholly unsubstantial instance, purely addressed to the fancy, why, in\nreading the old fairy tales of Central Europe, does \"the tall pale\nman\" of the Hartz forests, whose changeless pallor unrustlingly glides\nthrough the green of the groves  why is this phantom more terrible\nthan all the whooping imps of the Blocksburg?\n\nNor is it, altogether, the remembrance of her cathedral-toppling\nearthquakes; nor the stampedoes of her frantic seas; nor the\ntearlessness of arid skies that never rain; nor the sight of her wide\nfield of leaning spires, wrenched cope-stones, and crosses all adroop\n(like canted yards of anchored fleets); and her suburban avenues of\nhouse-walls lying over upon each other, as a tossed pack of cards; \nit is not these things alone which make tearless Lima, the strangest,\nsaddest city thou can'st see. For Lima has taken the white veil; and\nthere is a higher horror in this whiteness of her woe. Old as Pizarro,\nthis whiteness keeps her ruins for ever new; admits not the cheerful\ngreenness of complete decay; spreads over her broken ramparts the\nrigid pallor of an apoplexy that fixes its own distortions.\n\nI know that, to the common apprehension, this phenomenon of whiteness\nis not confessed to be the prime agent in exaggerating the terror of\nobjects otherwise terrible; nor to the unimaginative mind is there\naught of terror in those appearances whose awfulness to another mind\nalmost solely consists in this one phenomenon, especially when\nexhibited under any form at all approaching to muteness or\nuniversality. What I mean by these two statements may perhaps be\nrespectively elucidated by the following examples.\n\nFirst: The mariner, when drawing nigh the coasts of foreign lands, if\nby night he hear the roar of breakers, starts to vigilance, and feels\njust enough of trepidation to sharpen all his faculties; but under\nprecisely similar circumstances, let him be called from his hammock to\nview his ship sailing through a midnight sea of milky whiteness  as\nif from encircling headlands shoals of combed white bears were\nswimming round him, then he feels a silent, superstitious dread; the\nshrouded phantom of the whitened waters is horrible to him as a real\nghost; in vain the lead assures him he is still off soundings; heart\nand helm they both go down; he never rests till blue water is under\nhim again. Yet where is the mariner who will tell thee, \"Sir, it was\nnot so much the fear of striking hidden rocks, as the fear of that\nhideous whiteness that so stirred me?\"\n\nSecond: To the native Indian of Peru, the continual sight of the\nsnowhowdahed Andes conveys naught of dread, except, perhaps, in the\nmere fancying of the eternal frosted desolateness reigning at such\nvast altitudes, and the natural conceit of what a fearfulness it would\nbe to lose oneself in such inhuman solitudes. Much the same is it with\nthe backwoodsman of the West, who with comparative indifference views\nan unbounded prairie sheeted with driven snow, no shadow of tree or\ntwig to break the fixed trance of whiteness. Not so the sailor,\nbeholding the scenery of the Antarctic seas; where at times, by some\ninfernal trick of legerdemain in the powers of frost and air, he,\nshivering and half shipwrecked, instead of rainbows speaking hope and\nsolace to his misery, views what seems a boundless churchyard grinning\nupon him with its lean ice monuments and splintered crosses.\n\nBut thou sayest, methinks that white-lead chapter about whiteness is\nbut a white flag hung out from a craven soul; thou surrenderest to a\nhypo, Ishmael.\n\nTell me, why this strong young colt, foaled in some peaceful valley of\nVermont, far removed from all beasts of prey  why is it that upon\nthe sunniest day, if you but shake a fresh buffalo robe behind him, so\nthat he cannot even see it, but only smells its wild animal muskiness\n why will he start, snort, and with bursting eyes paw the ground in\nphrensies of affright? There is no remembrance in him of any gorings\nof wild creatures in his green northern home, so that the strange\nmuskiness he smells cannot recall to him anything associated with the\nexperience of former perils; for what knows he, this New England colt,\nof the black bisons of distant Oregon?\n\nNo; but here thou beholdest even in a dumb brute, the instinct of the\nknowledge of the demonism in the world. Though thousands of miles from\nOregon, still when he smells that savage musk, the rending, goring\nbison herds are as present as to the deserted wild foal of the\nprairies, which this instant they may be trampling into dust.\n\nThus, then, the muffled rollings of a milky sea; the bleak rustlings\nof the festooned frosts of mountains; the desolate shiftings of the\nwindrowed snows of prairies; all these, to Ishmael, are as the shaking\nof that buffalo robe to the frightened colt!\n\nThough neither knows where lie the nameless things of which the mystic\nsign gives forth such hints; yet with me, as with the colt, somewhere\nthose things must exist. Though in many of its aspects this visible\nworld seems formed in love, the invisible spheres were formed in\nfright.\n\nBut not yet have we solved the incantation of this whiteness, and\nlearned why it appeals with such power to the soul; and more strange\nand far more portentous  why, as we have seen, it is at once the\nmost meaning symbol of spiritual things, nay, the very veil of the\nChristian's Deity; and yet should be as it is, the intensifying agent\nin things the most appalling to mankind.\n\nIs it that by its indefiniteness it shadows forth the heartless voids\nand immensities of the universe, and thus stabs us from behind with\nthe thought of annihilation, when beholding the white depths of the\nmilky way? Or is it, that as in essence whiteness is not so much a\ncolour as the visible absence of colour; and at the same time the\nconcrete of all colours; is it for these reasons that there is such a\ndumb blankness, full of meaning, in a wide landscape of snows  a\ncolourless, all-colour of atheism from which we shrink? And when we\nconsider that other theory of the natural philosophers, that all other\nearthly hues  every stately or lovely emblazoning  the sweet\ntinges of sunset skies and woods; yea, and the gilded velvets of\nbutterflies, and the butterfly cheeks of young girls; all these are\nbut subtile deceits, not actually inherent in substances, but only\nlaid on from without; so that all deified Nature absolutely paints\nlike the harlot, whose allurements cover nothing but the charnel-house\nwithin; and when we proceed further, and consider that the mystical\ncosmetic which produces every one of her hues, the great principle of\nlight, for ever remains white or colourless in itself, and if\noperating without medium upon matter, would touch all objects, even\ntulips and roses, with its own blank tinge  pondering all this, the\npalsied universe lies before us a leper; and like wilful travellers in\nLapland, who refuse to wear coloured and colouring glasses upon their\neyes, so the wretched infidel gazes himself blind at the monumental\nwhite shroud that wraps all the prospect around him. And of all these\nthings the Albino whale was the symbol. Wonder ye then at the fiery\nhunt?\n\n With reference to the Polar bear, it may possibly be urged by him\nwho would fain go still deeper into this matter, that it is not the\nwhiteness, separately regarded, which heightens the intolerable\nhideousness of that brute; for, analysed, that heightened hideousness,\nit might be said, only rises from the circumstance, that the\nirresponsible ferociousness of the creature stands invested in the\nfleece of celestial innocence and love; and hence, by bringing\ntogether two such opposite emotions in our minds, the Polar bear\nfrightens us with so unnatural a contrast. But even assuming all this\nto be true; yet, were it not for the whiteness, you would not have\nthat intensified terror.\n\nAs for the white shark, the white gliding ghostliness of repose in\nthat creature, when beheld in his ordinary moods, strangely tallies\nwith the same quality in the Polar quadruped. This peculiarity is most\nvividly hit by the French in the name they bestow upon that fish. The\nRomish mass for the dead begins with \"Requiem eternam\" (eternal rest),\nwhence REQUIEM denominating the mass itself, and any other funeral\nmusic. Now, in allusion to the white, silent stillness of death in\nthis shark, and the mild deadliness of his habits, the French call him\nRequin.\n\n I remember the first albatross I ever saw. It was during a\nprolonged gale, in waters hard upon the Antarctic seas. From my\nforenoon watch below, I ascended to the overclouded deck; and there,\ndashed upon the main hatches, I saw a regal, feathery thing of\nunspotted whiteness, and with a hooked, Roman bill sublime. At\nintervals, it arched forth its vast archangel wings, as if to embrace\nsome holy ark. Wondrous flutterings and throbbings shook it. Though\nbodily unharmed, it uttered cries, as some king's ghost in\nsupernatural distress. Through its inexpressible, strange eyes,\nmethought I peeped to secrets which took hold of God. As Abraham\nbefore the angels, I bowed myself; the white thing was so white, its\nwings so wide, and in those for ever exiled waters, I had lost the\nmiserable warping memories of traditions and of towns. Long I gazed at\nthat prodigy of plumage. I cannot tell, can only hint, the things that\ndarted through me then. But at last I awoke; and turning, asked a\nsailor what bird was this. A goney, he replied. Goney! never had heard\nthat name before; is it conceivable that this glorious thing is\nutterly unknown to men ashore! never! But some time after, I learned\nthat goney was some seaman's name for albatross. So that by no\npossibility could Coleridge's wild Rhyme have had aught to do with\nthose mystical impressions which were mine, when I saw that bird upon\nour deck. For neither had I then read the Rhyme, nor knew the bird to\nbe an albatross. Yet, in saying this, I do but indirectly burnish a\nlittle brighter the noble merit of the poem and the poet.\n\nI assert, then, that in the wondrous bodily whiteness of the bird\nchiefly lurks the secret of the spell; a truth the more evinced in\nthis, that by a solecism of terms there are birds called grey\nalbatrosses; and these I have frequently seen, but never with such\nemotions as when I beheld the Antarctic fowl.\n\nBut how had the mystic thing been caught? Whisper it not, and I will\ntell; with a treacherous hook and line, as the fowl floated on the\nsea. At last the Captain made a postman of it; tying a lettered,\nleathern tally round its neck, with the ship's time and place; and\nthen letting it escape. But I doubt not, that leathern tally, meant\nfor man, was taken off in Heaven, when the white fowl flew to join the\nwing-folding, the invoking, and adoring cherubim!\n\nCHAPTER 43 Hark!\n\n\"HIST! Did you hear that noise, Cabaco?\n\nIt was the middle-watch; a fair moonlight; the seamen were standing in\na cordon, extending from one of the fresh-water butts in the waist, to\nthe scuttle-butt near the taffrail. In this manner, they passed the\nbuckets to fill the scuttle-butt. Standing, for the most part, on the\nhallowed precincts of the quarter-deck, they were careful not to speak\nor rustle their feet. From hand to hand, the buckets went in the\ndeepest silence, only broken by the occasional flap of a sail, and the\nsteady hum of the unceasingly advancing keel.\n\nIt was in the midst of this repose, that Archy, one of the cordon,\nwhose post was near the after-hatches, whispered to his neighbor, a\nCholo, the words above.\n\n\"Hist! did you hear that noise, Cabaco?\"\n\n\"Take the bucket, will ye, Archy? what noise d'ye mean?\"\n\n\"There it is again  under the hatches  don't you hear it  a\ncough  it sounded like a cough.\"\n\n\"Cough be damned! Pass along that return bucket.\"\n\n\"There again  there it is!  it sounds like two or three sleepers\nturning over, now!\"\n\n\"Caramba! have done, shipmate, will ye? It's the three soaked biscuits\nye eat for supper turning over inside of ye  nothing else. Look to\nthe bucket!\"\n\n\"Say what ye will, shipmate; I've sharp ears.\"\n\n\"Aye, you are the chap, ain't ye, that heard the hum of the old\nQuakeress's knitting-needles fifty miles at sea from Nantucket; you're\nthe chap.\"\n\n\"Grin away; we'll see what turns up. Hark ye, Cabaco, there is\nsomebody down in the after-hold that has not yet been seen on deck;\nand I suspect our old Mogul knows something of it too. I heard Stubb\ntell Flask, one morning watch, that there was something of that sort\nin the wind.\"\n\n\"Tish! the bucket!\"\n\nCHAPTER 44 The Chart.\n\nHad you followed Captain Ahab down into his cabin after the squall\nthat took place on the night succeeding that wild ratification of his\npurpose with his crew, you would have seen him go to a locker in the\ntransom, and bringing out a large wrinkled roll of yellowish sea\ncharts, spread them before him on his screwed-down table. Then seating\nhimself before it, you would have seen him intently study the various\nlines and shadings which there met his eye; and with slow but steady\npencil trace additional courses over spaces that before were blank. At\nintervals, he would refer to piles of old log-books beside him,\nwherein were set down the seasons and places in which, on various\nformer voyages of various ships, sperm whales had been captured or\nseen.\n\nWhile thus employed, the heavy pewter lamp suspended in chains over\nhis head, continually rocked with the motion of the ship, and for ever\nthrew shifting gleams and shadows of lines upon his wrinkled brow,\ntill it almost seemed that while he himself was marking out lines and\ncourses on the wrinkled charts, some invisible pencil was also tracing\nlines and courses upon the deeply marked chart of his forehead.\n\nBut it was not this night in particular that, in the solitude of his\ncabin, Ahab thus pondered over his charts. Almost every night they\nwere brought out; almost every night some pencil marks were effaced,\nand others were substituted. For with the charts of all four oceans\nbefore him, Ahab was threading a maze of currents and eddies, with a\nview to the more certain accomplishment of that monomaniac thought of\nhis soul.\n\nNow, to any one not fully acquainted with the ways of the leviathans,\nit might seem an absurdly hopeless task thus to seek out one solitary\ncreature in the unhooped oceans of this planet. But not so did it seem\nto Ahab, who knew the sets of all tides and currents; and thereby\ncalculating the driftings of the sperm whale's food; and, also,\ncalling to mind the regular, ascertained seasons for hunting him in\nparticular latitudes; could arrive at reasonable surmises, almost\napproaching to certainties, concerning the timeliest day to be upon\nthis or that ground in search of his prey.\n\nSo assured, indeed, is the fact concerning the periodicalness of the\nsperm whale's resorting to given waters, that many hunters believe\nthat, could he be closely observed and studied throughout the world;\nwere the logs for one voyage of the entire whale fleet carefully\ncollated, then the migrations of the sperm whale would be found to\ncorrespond in invariability to those of the herring-shoals or the\nflights of swallows. On this hint, attempts have been made to\nconstruct elaborate migratory charts of the sperm whale.\n\nBesides, when making a passage from one feeding-ground to another, the\nsperm whales, guided by some infallible instinct  say, rather,\nsecret intelligence from the Deity  mostly swim in veins, as they\nare called; continuing their way along a given ocean-line with such\nundeviating exactitude, that no ship ever sailed her course, by any\nchart, with one tithe of such marvellous precision. Though, in these\ncases, the direction taken by any one whale be straight as a\nsurveyor's parallel, and though the line of advance be strictly\nconfined to its own unavoidable, straight wake, yet the arbitrary vein\nin which at these times he is said to swim, generally embraces some\nfew miles in width (more or less, as the vein is presumed to expand or\ncontract); but never exceeds the visual sweep from the whale-ship's\nmast-heads, when circumspectly gliding along this magic zone. The sum\nis, that at particular seasons within that breadth and along that\npath, migrating whales may with great confidence be looked for.\n\nAnd hence not only at substantiated times, upon well known separate\nfeeding-grounds, could Ahab hope to encounter his prey; but in\ncrossing the widest expanses of water between those grounds he could,\nby his art, so place and time himself on his way, as even then not to\nbe wholly without prospect of a meeting.\n\nThere was a circumstance which at first sight seemed to entangle his\ndelirious but still methodical scheme. But not so in the reality,\nperhaps. Though the gregarious sperm whales have their regular seasons\nfor particular grounds, yet in general you cannot conclude that the\nherds which haunted such and such a latitude or longitude this year,\nsay, will turn out to be identically the same with those that were\nfound there the preceding season; though there are peculiar and\nunquestionable instances where the contrary of this has proved\ntrue. In general, the same remark, only within a less wide limit,\napplies to the solitaries and hermits among the matured, aged sperm\nwhales. So that though Moby Dick had in a former year been seen, for\nexample, on what is called the Seychelle ground in the Indian ocean,\nor Volcano Bay on the Japanese Coast; yet it did not follow, that were\nthe Pequod to visit either of those spots at any subsequent\ncorresponding season, she would infallibly encounter him there. So,\ntoo, with some other feeding grounds, where he had at times revealed\nhimself. But all these seemed only his casual stopping-places and\nocean-inns, so to speak, not his places of prolonged abode. And where\nAhab's chances of accomplishing his object have hitherto been spoken\nof, allusion has only been made to whatever way-side, antecedent,\nextra prospects were his, ere a particular set time or place were\nattained, when all possibilities would become probabilities, and, as\nAhab fondly thought, every possibility the next thing to a\ncertainty. That particular set time and place were conjoined in the\none technical phrase  the Season-on-the-Line. For there and then,\nfor several consecutive years, Moby Dick had been periodically\ndescried, lingering in those waters for awhile, as the sun, in its\nannual round, loiters for a predicted interval in any one sign of the\nZodiac. There it was, too, that most of the deadly encounters with the\nwhite whale had taken place; there the waves were storied with his\ndeeds; there also was that tragic spot where the monomaniac old man\nhad found the awful motive to his vengeance. But in the cautious\ncomprehensiveness and unloitering vigilance with which Ahab threw his\nbrooding soul into this unfaltering hunt, he would not permit himself\nto rest all his hopes upon the one crowning fact above mentioned,\nhowever flattering it might be to those hopes; nor in the\nsleeplessness of his vow could he so tranquillize his unquiet heart as\nto postpone all intervening quest.\n\nNow, the Pequod had sailed from Nantucket at the very beginning of the\nSeason-on-the-Line. No possible endeavor then could enable her\ncommander to make the great passage southwards, double Cape Horn, and\nthen running down sixty degrees of latitude arrive in the equatorial\nPacific in time to cruise there. Therefore, he must wait for the next\nensuing season. Yet the premature hour of the Pequod's sailing had,\nperhaps, been correctly selected by Ahab, with a view to this very\ncomplexion of things. Because, an interval of three hundred and\nsixty-five days and nights was before him; an interval which, instead\nof impatiently enduring ashore, he would spend in a miscellaneous\nhunt; if by chance the White Whale, spending his vacation in seas far\nremote from his periodical feeding-grounds, should turn up his\nwrinkled brow off the Persian Gulf, or in the Bengal Bay, or China\nSeas, or in any other waters haunted by his race. So that Monsoons,\nPampas, Nor'-Westers, Harmattans, Trades; any wind but the Levanter\nand Simoon, might blow Moby Dick into the devious zig-zag world-circle\nof the Pequod's circumnavigating wake.\n\nBut granting all this; yet, regarded discreetly and coolly, seems it\nnot but a mad idea, this; that in the broad boundless ocean, one\nsolitary whale, even if encountered, should be thought capable of\nindividual recognition from his hunter, even as a white-bearded Mufti\nin the thronged thoroughfares of Constantinople? Yes. For the peculiar\nsnow-white brow of Moby Dick, and his snow-white hump, could not but\nbe unmistakable. And have I not tallied the whale, Ahab would mutter\nto himself, as after poring over his charts till long after midnight\nhe would throw himself back in reveries  tallied him, and shall he\nescape? His broad fins are bored, and scalloped out like a lost\nsheep's ear! And here, his mad mind would run on in a breathless race;\ntill a weariness and faintness of pondering came over him; and in the\nopen air of the deck he would seek to recover his strength. Ah, God!\nwhat trances of torments does that man endure who is consumed with one\nunachieved revengeful desire. He sleeps with clenched hands; and wakes\nwith his own bloody nails in his palms.\n\nOften, when forced from his hammock by exhausting and intolerably\nvivid dreams of the night, which, resuming his own intense thoughts\nthrough the day, carried them on amid a clashing of phrensies, and\nwhirled them round and round and round in his blazing brain, till the\nvery throbbing of his life-spot became insufferable anguish; and when,\nas was sometimes the case, these spiritual throes in him heaved his\nbeing up from its base, and a chasm seemed opening in him, from which\nforked flames and lightnings shot up, and accursed fiends beckoned him\nto leap down among them; when this hell in himself yawned beneath him,\na wild cry would be heard through the ship; and with glaring eyes Ahab\nwould burst from his state room, as though escaping from a bed that\nwas on fire. Yet these, perhaps, instead of being the unsuppressable\nsymptoms of some latent weakness, or fright at his own resolve, were\nbut the plainest tokens of its intensity. For, at such times, crazy\nAhab, the scheming, unappeasedly steadfast hunter of the white whale;\nthis Ahab that had gone to his hammock, was not the agent that so\ncaused him to burst from it in horror again. The latter was the\neternal, living principle or soul in him; and in sleep, being for the\ntime dissociated from the characterizing mind, which at other times\nemployed it for its outer vehicle or agent, it spontaneously sought\nescape from the scorching contiguity of the frantic thing, of which,\nfor the time, it was no longer an integral. But as the mind does not\nexist unless leagued with the soul, therefore it must have been that,\nin Ahab's case, yielding up all his thoughts and fancies to his one\nsupreme purpose; that purpose, by its own sheer inveteracy of will,\nforced itself against gods and devils into a kind of self-assumed,\nindependent being of its own. Nay, could grimly live and burn, while\nthe common vitality to which it was conjoined, fled horror-stricken\nfrom the unbidden and unfathered birth. Therefore, the tormented\nspirit that glared out of bodily eyes, when what seemed Ahab rushed\nfrom his room, was for the time but a vacated thing, a formless\nsomnambulistic being, a ray of living light, to be sure, but without\nan object to colour, and therefore a blankness in itself. God help\nthee, old man, thy thoughts have created a creature in thee; and he\nwhose intense thinking thus makes him a Prometheus; a vulture feeds\nupon that heart for ever; that vulture the very creature he creates.\n\n Since the above was written, the statement is happily borne out by\nan official circular, issued by Lieutenant Maury, of the National\nObservatory, Washington, April 16th, 1851. By that circular, it\nappears that precisely such a chart is in course of completion; and\nportions of it are presented in the circular. \"This chart divides the\nocean into districts of five degrees of latitude by five degrees of\nlongitude; perpendicularly through each of which districts are twelve\ncolumns for the twelve months; and horizontally through each of which\ndistricts are three lines; one to show the number of days that have\nbeen spent in each month in every district, and the two others to show\nthe number of days in which whales, sperm or right, have been seen.\"\n\nCHAPTER 45 The Affidavit.\n\nSo far as what there may be of a narrative in this book; and, indeed,\nas indirectly touching one or two very interesting and curious\nparticulars in the habits of sperm whales, the foregoing chapter, in\nits earlier part, is as important a one as will be found in this\nvolume; but the leading matter of it requires to be still further and\nmore familiarly enlarged upon, in order to be adequately understood,\nand moreover to take away any incredulity which a profound ignorance\nof the entire subject may induce in some minds, as to the natural\nverity of the main points of this affair.\n\nI care not to perform this part of my task methodically; but shall be\ncontent to produce the desired impression by separate citations of\nitems, practically or reliably known to me as a whaleman; and from\nthese citations, I take it  the conclusion aimed at will naturally\nfollow of itself.\n\nFirst: I have personally known three instances where a whale, after\nreceiving a harpoon, has effected a complete escape; and, after an\ninterval (in one instance of three years), has been again struck by\nthe same hand, and slain; when the two irons, both marked by the same\nprivate cypher, have been taken from the body. In the instance where\nthree years intervened between the flinging of the two harpoons; and I\nthink it may have been something more than that; the man who darted\nthem happening, in the interval, to go in a trading ship on a voyage\nto Africa, went ashore there, joined a discovery party, and penetrated\nfar into the interior, where he travelled for a period of nearly two\nyears, often endangered by serpents, savages, tigers, poisonous\nmiasmas, with all the other common perils incident to wandering in the\nheart of unknown regions. Meanwhile, the whale he had struck must also\nhave been on its travels; no doubt it had thrice circumnavigated the\nglobe, brushing with its flanks all the coasts of Africa; but to no\npurpose. This man and this whale again came together, and the one\nvanquished the other. I say I, myself, have known three instances\nsimilar to this; that is in two of them I saw the whales struck; and,\nupon the second attack, saw the two irons with the respective marks\ncut in them, afterwards taken from the dead fish. In the three-year\ninstance, it so fell out that I was in the boat both times, first and\nlast, and the last time distinctly recognised a peculiar sort of huge\nmole under the whale's eye, which I had observed there three years\nprevious. I say three years, but I am pretty sure it was more than\nthat. Here are three instances, then, which I personally know the\ntruth of; but I have heard of many other instances from persons whose\nveracity in the matter there is no good ground to impeach.\n\nSecondly: It is well known in the Sperm Whale Fishery, however\nignorant the world ashore may be of it, that there have been several\nmemorable historical instances where a particular whale in the ocean\nhas been at distant times and places popularly cognisable. Why such a\nwhale became thus marked was not altogether and originally owing to\nhis bodily peculiarities as distinguished from other whales; for\nhowever peculiar in that respect any chance whale may be, they soon\nput an end to his peculiarities by killing him, and boiling him down\ninto a peculiarly valuable oil. No: the reason was this: that from the\nfatal experiences of the fishery there hung a terrible prestige of\nperilousness about such a whale as there did about Rinaldo Rinaldini,\ninsomuch that most fishermen were content to recognise him by merely\ntouching their tarpaulins when he would be discovered lounging by them\non the sea, without seeking to cultivate a more intimate\nacquaintance. Like some poor devils ashore that happen to know an\nirascible great man, they make distant unobtrusive salutations to him\nin the street, lest if they pursued the acquaintance further, they\nmight receive a summary thump for their presumption.\n\nBut not only did each of these famous whales enjoy great individual\ncelebrity  Nay, you may call it an ocean-wide renown; not only was\nhe famous in life and now is immortal in forecastle stories after\ndeath, but he was admitted into all the rights, privileges, and\ndistinctions of a name; had as much a name indeed as Cambyses or\nCaesar. Was it not so, O Timor Tom! thou famed leviathan, scarred like\nan iceberg, who so long did'st lurk in the Oriental straits of that\nname, whose spout was oft seen from the palmy beach of Ombay? Was it\nnot so, O New Zealand Jack! thou terror of all cruisers that crossed\ntheir wakes in the vicinity of the Tattoo Land? Was it not so, O\nMorquan! King of Japan, whose lofty jet they say at times assumed the\nsemblance of a snow-white cross against the sky? Was it not so, O Don\nMiguel! thou Chilian whale, marked like an old tortoise with mystic\nhieroglyphics upon the back! In plain prose, here are four whales as\nwell known to the students of Cetacean History as Marius or Sylla to\nthe classic scholar.\n\nBut this is not all. New Zealand Tom and Don Miguel, after at various\ntimes creating great havoc among the boats of different vessels, were\nfinally gone in quest of, systematically hunted out, chased and killed\nby valiant whaling captains, who heaved up their anchors with that\nexpress object as much in view, as in setting out through the\nNarragansett Woods, Captain Butler of old had it in his mind to\ncapture that notorious murderous savage Annawon, the headmost warrior\nof the Indian King Philip.\n\nI do not know where I can find a better place than just here, to make\nmention of one or two other things, which to me seem important, as in\nprinted form establishing in all respects the reasonableness of the\nwhole story of the White Whale, more especially the catastrophe. For\nthis is one of those disheartening instances where truth requires full\nas much bolstering as error. So ignorant are most landsmen of some of\nthe plainest and most palpable wonders of the world, that without some\nhints touching the plain facts, historical and otherwise, of the\nfishery, they might scout at Moby Dick as a monstrous fable, or still\nworse and more detestable, a hideous and intolerable allegory.\n\nFirst: Though most men have some vague flitting ideas of the general\nperils of the grand fishery, yet they have nothing like a fixed, vivid\nconception of those perils, and the frequency with which they\nrecur. One reason perhaps is, that not one in fifty of the actual\ndisasters and deaths by casualties in the fishery, ever finds a public\nrecord at home, however transient and immediately forgotten that\nrecord. Do you suppose that that poor fellow there, who this moment\nperhaps caught by the whale-line off the coast of New Guinea, is being\ncarried down to the bottom of the sea by the sounding leviathan  do\nyou suppose that that poor fellow's name will appear in the newspaper\nobituary you will read to-morrow at your breakfast? No: because the\nmails are very irregular between here and New Guinea. In fact, did you\never hear what might be called regular news direct or indirect from\nNew Guinea? Yet I tell you that upon one particular voyage which I\nmade to the Pacific, among many others we spoke thirty different\nships, every one of which had had a death by a whale, some of them\nmore than one, and three that had each lost a boat's crew. For God's\nsake, be economical with your lamps and candles! not a gallon you\nburn, but at least one drop of man's blood was spilled for it.\n\nSecondly: People ashore have indeed some indefinite idea that a whale\nis an enormous creature of enormous power; but I have ever found that\nwhen narrating to them some specific example of this two-fold\nenormousness, they have significantly complimented me upon my\nfacetiousness; when, I declare upon my soul, I had no more idea of\nbeing facetious than Moses, when he wrote the history of the plagues\nof Egypt.\n\nBut fortunately the special point I here seek can be established upon\ntestimony entirely independent of my own. That point is this: The\nSperm Whale is in some cases sufficiently powerful, knowing, and\njudiciously malicious, as with direct aforethought to stave in,\nutterly destroy, and sink a large ship; and what is more, the Sperm\nWhale HAS done it.\n\nFirst: In the year 1820 the ship Essex, Captain Pollard, of Nantucket,\nwas cruising in the Pacific Ocean. One day she saw spouts, lowered her\nboats, and gave chase to a shoal of sperm whales. Ere long, several of\nthe whales were wounded; when, suddenly, a very large whale escaping\nfrom the boats, issued from the shoal, and bore directly down upon the\nship. Dashing his forehead against her hull, he so stove her in, that\nin less than \"ten minutes\" she settled down and fell over. Not a\nsurviving plank of her has been seen since. After the severest\nexposure, part of the crew reached the land in their boats. Being\nreturned home at last, Captain Pollard once more sailed for the\nPacific in command of another ship, but the gods shipwrecked him again\nupon unknown rocks and breakers; for the second time his ship was\nutterly lost, and forthwith forswearing the sea, he has never tempted\nit since. At this day Captain Pollard is a resident of Nantucket. I\nhave seen Owen Chace, who was chief mate of the Essex at the time of\nthe tragedy; I have read his plain and faithful narrative; I have\nconversed with his son; and all this within a few miles of the scene\nof the catastrophe.\n\nSecondly: The ship Union, also of Nantucket, was in the year 1807\ntotally lost off the Azores by a similar onset, but the authentic\nparticulars of this catastrophe I have never chanced to encounter,\nthough from the whale hunters I have now and then heard casual\nallusions to it.\n\nThirdly: Some eighteen or twenty years ago Commodore J  -, then\ncommanding an American sloop-of-war of the first class, happened to be\ndining with a party of whaling captains, on board a Nantucket ship in\nthe harbor of Oahu, Sandwich Islands. Conversation turning upon\nwhales, the Commodore was pleased to be sceptical touching the amazing\nstrength ascribed to them by the professional gentlemen present. He\nperemptorily denied for example, that any whale could so smite his\nstout sloop-of-war as to cause her to leak so much as a\nthimbleful. Very good; but there is more coming. Some weeks after, the\nCommodore set sail in this impregnable craft for Valparaiso. But he\nwas stopped on the way by a portly sperm whale, that begged a few\nmoments' confidential business with him. That business consisted in\nfetching the Commodore's craft such a thwack, that with all his pumps\ngoing he made straight for the nearest port to heave down and\nrepair. I am not superstitious, but I consider the Commodore's\ninterview with that whale as providential. Was not Saul of Tarsus\nconverted from unbelief by a similar fright? I tell you, the sperm\nwhale will stand no nonsense.\n\nI will now refer you to Langsdorff's Voyages for a little circumstance\nin point, peculiarly interesting to the writer hereof. Langsdorff, you\nmust know by the way, was attached to the Russian Admiral\nKrusenstern's famous Discovery Expedition in the beginning of the\npresent century. Captain Langsdorff thus begins his seventeenth\nchapter:\n\n\"By the thirteenth of May our ship was ready to sail, and the next day\nwe were out in the open sea, on our way to Ochotsh. The weather was\nvery clear and fine, but so intolerably cold that we were obliged to\nkeep on our fur clothing. For some days we had very little wind; it\nwas not till the nineteenth that a brisk gale from the northwest\nsprang up. An uncommon large whale, the body of which was larger than\nthe ship itself, lay almost at the surface of the water, but was not\nperceived by any one on board till the moment when the ship, which was\nin full sail, was almost upon him, so that it was impossible to\nprevent its striking against him. We were thus placed in the most\nimminent danger, as this gigantic creature, setting up its back,\nraised the ship three feet at least out of the water. The masts\nreeled, and the sails fell altogether, while we who were below all\nsprang instantly upon the deck, concluding that we had struck upon\nsome rock; instead of this we saw the monster sailing off with the\nutmost gravity and solemnity. Captain D'Wolf applied immediately to\nthe pumps to examine whether or not the vessel had received any damage\nfrom the shock, but we found that very happily it had escaped entirely\nuninjured.\"\n\nNow, the Captain D'Wolf here alluded to as commanding the ship in\nquestion, is a New Englander, who, after a long life of unusual\nadventures as a sea-captain, this day resides in the village of\nDorchester near Boston. I have the honour of being a nephew of his. I\nhave particularly questioned him concerning this passage in\nLangsdorff. He substantiates every word. The ship, however, was by no\nmeans a large one: a Russian craft built on the Siberian coast, and\npurchased by my uncle after bartering away the vessel in which he\nsailed from home.\n\nIn that up and down manly book of old-fashioned adventure, so full,\ntoo, of honest wonders  the voyage of Lionel Wafer, one of ancient\nDampier's old chums  I found a little matter set down so like that\njust quoted from Langsdorff, that I cannot forbear inserting it here\nfor a corroborative example, if such be needed.\n\nLionel, it seems, was on his way to \"John Ferdinando,\" as he calls the\nmodern Juan Fernandes. \"In our way thither,\" he says, \"about four\no'clock in the morning, when we were about one hundred and fifty\nleagues from the Main of America, our ship felt a terrible shock,\nwhich put our men in such consternation that they could hardly tell\nwhere they were or what to think; but every one began to prepare for\ndeath. And, indeed, the shock was so sudden and violent, that we took\nit for granted the ship had struck against a rock; but when the\namazement was a little over, we cast the lead, and sounded, but found\nno ground. .... The suddenness of the shock made the guns leap in\ntheir carriages, and several of the men were shaken out of their\nhammocks. Captain Davis, who lay with his head on a gun, was thrown\nout of his cabin!\" Lionel then goes on to impute the shock to an\nearthquake, and seems to substantiate the imputation by stating that a\ngreat earthquake, somewhere about that time, did actually do great\nmischief along the Spanish land. But I should not much wonder if, in\nthe darkness of that early hour of the morning, the shock was after\nall caused by an unseen whale vertically bumping the hull from\nbeneath.\n\nI might proceed with several more examples, one way or another known\nto me, of the great power and malice at times of the sperm whale. In\nmore than one instance, he has been known, not only to chase the\nassailing boats back to their ships, but to pursue the ship itself,\nand long withstand all the lances hurled at him from its decks. The\nEnglish ship Pusie Hall can tell a story on that head; and, as for his\nstrength, let me say, that there have been examples where the lines\nattached to a running sperm whale have, in a calm, been transferred to\nthe ship, and secured there; the whale towing her great hull through\nthe water, as a horse walks off with a cart. Again, it is very often\nobserved that, if the sperm whale, once struck, is allowed time to\nrally, he then acts, not so often with blind rage, as with wilful,\ndeliberate designs of destruction to his pursuers; nor is it without\nconveying some eloquent indication of his character, that upon being\nattacked he will frequently open his mouth, and retain it in that\ndread expansion for several consecutive minutes. But I must be content\nwith only one more and a concluding illustration; a remarkable and\nmost significant one, by which you will not fail to see, that not only\nis the most marvellous event in this book corroborated by plain facts\nof the present day, but that these marvels (like all marvels) are mere\nrepetitions of the ages; so that for the millionth time we say amen\nwith Solomon  Verily there is nothing new under the sun.\n\nIn the sixth Christian century lived Procopius, a Christian magistrate\nof Constantinople, in the days when Justinian was Emperor and\nBelisarius general. As many know, he wrote the history of his own\ntimes, a work every way of uncommon value. By the best authorities, he\nhas always been considered a most trustworthy and unexaggerating\nhistorian, except in some one or two particulars, not at all affecting\nthe matter presently to be mentioned.\n\nNow, in this history of his, Procopius mentions that, during the term\nof his prefecture at Constantinople, a great sea-monster was captured\nin the neighboring Propontis, or Sea of Marmora, after having\ndestroyed vessels at intervals in those waters for a period of more\nthan fifty years. A fact thus set down in substantial history cannot\neasily be gainsaid. Nor is there any reason it should be. Of what\nprecise species this sea-monster was, is not mentioned. But as he\ndestroyed ships, as well as for other reasons, he must have been a\nwhale; and I am strongly inclined to think a sperm whale. And I will\ntell you why. For a long time I fancied that the sperm whale had been\nalways unknown in the Mediterranean and the deep waters connecting\nwith it. Even now I am certain that those seas are not, and perhaps\nnever can be, in the present constitution of things, a place for his\nhabitual gregarious resort. But further investigations have recently\nproved to me, that in modern times there have been isolated instances\nof the presence of the sperm whale in the Mediterranean. I am told, on\ngood authority, that on the Barbary coast, a Commodore Davis of the\nBritish navy found the skeleton of a sperm whale. Now, as a vessel of\nwar readily passes through the Dardanelles, hence a sperm whale could,\nby the same route, pass out of the Mediterranean into the Propontis.\n\nIn the Propontis, as far as I can learn, none of that peculiar\nsubstance called BRIT is to be found, the aliment of the right\nwhale. But I have every reason to believe that the food of the sperm\nwhale  squid or cuttle-fish  lurks at the bottom of that sea,\nbecause large creatures, but by no means the largest of that sort,\nhave been found at its surface. If, then, you properly put these\nstatements together, and reason upon them a bit, you will clearly\nperceive that, according to all human reasoning, Procopius's\nsea-monster, that for half a century stove the ships of a Roman\nEmperor, must in all probability have been a sperm whale.\n\n The following are extracts from Chace's narrative: \"Every fact\nseemed to warrant me in concluding that it was anything but chance\nwhich directed his operations; he made two several attacks upon the\nship, at a short interval between them, both of which, according to\ntheir direction, were calculated to do us the most injury, by being\nmade ahead, and thereby combining the speed of the two objects for the\nshock; to effect which, the exact manoeuvres which he made were\nnecessary. His aspect was most horrible, and such as indicated\nresentment and fury. He came directly from the shoal which we had just\nbefore entered, and in which we had struck three of his companions, as\nif fired with revenge for their sufferings.\" Again: \"At all events,\nthe whole circumstances taken together, all happening before my own\neyes, and producing, at the time, impressions in my mind of decided,\ncalculating mischief, on the part of the whale (many of which\nimpressions I cannot now recall), induce me to be satisfied that I am\ncorrect in my opinion.\"\n\nHere are his reflections some time after quitting the ship, during a\nblack night an open boat, when almost despairing of reaching any\nhospitable shore. \"The dark ocean and swelling waters were nothing;\nthe fears of being swallowed up by some dreadful tempest, or dashed\nupon hidden rocks, with all the other ordinary subjects of fearful\ncontemplation, seemed scarcely entitled to a moment's thought; the\ndismal looking wreck, and the horrid aspect and revenge of the whale,\nwholly engrossed my reflections, until day again made its appearance.\"\n\nIn another place  p. 45,  he speaks of \"the mysterious and\nmortal attack of the animal.\"\n\nCHAPTER 46 Surmises.\n\nThough, consumed with the hot fire of his purpose, Ahab in all his\nthoughts and actions ever had in view the ultimate capture of Moby\nDick; though he seemed ready to sacrifice all mortal interests to that\none passion; nevertheless it may have been that he was by nature and\nlong habituation far too wedded to a fiery whaleman's ways, altogether\nto abandon the collateral prosecution of the voyage. Or at least if\nthis were otherwise, there were not wanting other motives much more\ninfluential with him. It would be refining too much, perhaps, even\nconsidering his monomania, to hint that his vindictiveness towards the\nWhite Whale might have possibly extended itself in some degree to all\nsperm whales, and that the more monsters he slew by so much the more\nhe multiplied the chances that each subsequently encountered whale\nwould prove to be the hated one he hunted. But if such an hypothesis\nbe indeed exceptionable, there were still additional considerations\nwhich, though not so strictly according with the wildness of his\nruling passion, yet were by no means incapable of swaying him.\n\nTo accomplish his object Ahab must use tools; and of all tools used in\nthe shadow of the moon, men are most apt to get out of order. He knew,\nfor example, that however magnetic his ascendency in some respects was\nover Starbuck, yet that ascendency did not cover the complete\nspiritual man any more than mere corporeal superiority involves\nintellectual mastership; for to the purely spiritual, the intellectual\nbut stand in a sort of corporeal relation. Starbuck's body and\nStarbuck's coerced will were Ahab's, so long as Ahab kept his magnet\nat Starbuck's brain; still he knew that for all this the chief mate,\nin his soul, abhorred his captain's quest, and could he, would\njoyfully disintegrate himself from it, or even frustrate it. It might\nbe that a long interval would elapse ere the White Whale was\nseen. During that long interval Starbuck would ever be apt to fall\ninto open relapses of rebellion against his captain's leadership,\nunless some ordinary, prudential, circumstantial influences were\nbrought to bear upon him. Not only that, but the subtle insanity of\nAhab respecting Moby Dick was noways more significantly manifested\nthan in his superlative sense and shrewdness in foreseeing that, for\nthe present, the hunt should in some way be stripped of that strange\nimaginative impiousness which naturally invested it; that the full\nterror of the voyage must be kept withdrawn into the obscure\nbackground (for few men's courage is proof against protracted\nmeditation unrelieved by action); that when they stood their long\nnight watches, his officers and men must have some nearer things to\nthink of than Moby Dick. For however eagerly and impetuously the\nsavage crew had hailed the announcement of his quest; yet all sailors\nof all sorts are more or less capricious and unreliable  they live\nin the varying outer weather, and they inhale its fickleness  and\nwhen retained for any object remote and blank in the pursuit, however\npromissory of life and passion in the end, it is above all things\nrequisite that temporary interests and employments should intervene\nand hold them healthily suspended for the final dash.\n\nNor was Ahab unmindful of another thing. In times of strong emotion\nmankind disdain all base considerations; but such times are\nevanescent. The permanent constitutional condition of the manufactured\nman, thought Ahab, is sordidness. Granting that the White Whale fully\nincites the hearts of this my savage crew, and playing round their\nsavageness even breeds a certain generous knight-errantism in them,\nstill, while for the love of it they give chase to Moby Dick, they\nmust also have food for their more common, daily appetites. For even\nthe high lifted and chivalric Crusaders of old times were not content\nto traverse two thousand miles of land to fight for their holy\nsepulchre, without committing burglaries, picking pockets, and gaining\nother pious perquisites by the way. Had they been strictly held to\ntheir one final and romantic object  that final and romantic\nobject, too many would have turned from in disgust. I will not strip\nthese men, thought Ahab, of all hopes of cash  aye, cash. They may\nscorn cash now; but let some months go by, and no perspective promise\nof it to them, and then this same quiescent cash all at once mutinying\nin them, this same cash would soon cashier Ahab.\n\nNor was there wanting still another precautionary motive more related\nto Ahab personally. Having impulsively, it is probable, and perhaps\nsomewhat prematurely revealed the prime but private purpose of the\nPequod's voyage, Ahab was now entirely conscious that, in so doing, he\nhad indirectly laid himself open to the unanswerable charge of\nusurpation; and with perfect impunity, both moral and legal, his crew\nif so disposed, and to that end competent, could refuse all further\nobedience to him, and even violently wrest from him the command. From\neven the barely hinted imputation of usurpation, and the possible\nconsequences of such a suppressed impression gaining ground, Ahab must\nof course have been most anxious to protect himself. That protection\ncould only consist in his own predominating brain and heart and hand,\nbacked by a heedful, closely calculating attention to every minute\natmospheric influence which it was possible for his crew to be\nsubjected to.\n\nFor all these reasons then, and others perhaps too analytic to be\nverbally developed here, Ahab plainly saw that he must still in a good\ndegree continue true to the natural, nominal purpose of the Pequod's\nvoyage; observe all customary usages; and not only that, but force\nhimself to evince all his well known passionate interest in the\ngeneral pursuit of his profession.\n\nBe all this as it may, his voice was now often heard hailing the three\nmast-heads and admonishing them to keep a bright look-out, and not\nomit reporting even a porpoise. This vigilance was not long without\nreward.\n\nCHAPTER 47 The Mat-Maker.\n\nIt was a cloudy, sultry afternoon; the seamen were lazily lounging\nabout the decks, or vacantly gazing over into the lead-coloured\nwaters. Queequeg and I were mildly employed weaving what is called a\nsword-mat, for an additional lashing to our boat. So still and subdued\nand yet somehow preluding was all the scene, and such an incantation\nof reverie lurked in the air, that each silent sailor seemed resolved\ninto his own invisible self.\n\nI was the attendant or page of Queequeg, while busy at the mat. As I\nkept passing and repassing the filling or woof of marline between the\nlong yarns of the warp, using my own hand for the shuttle, and as\nQueequeg, standing sideways, ever and anon slid his heavy oaken sword\nbetween the threads, and idly looking off upon the water, carelessly\nand unthinkingly drove home every yarn: I say so strange a dreaminess\ndid there then reign all over the ship and all over the sea, only\nbroken by the intermitting dull sound of the sword, that it seemed as\nif this were the Loom of Time, and I myself were a shuttle\nmechanically weaving and weaving away at the Fates. There lay the\nfixed threads of the warp subject to but one single, ever returning,\nunchanging vibration, and that vibration merely enough to admit of the\ncrosswise interblending of other threads with its own. This warp\nseemed necessity; and here, thought I, with my own hand I ply my own\nshuttle and weave my own destiny into these unalterable\nthreads. Meantime, Queequeg's impulsive, indifferent sword, sometimes\nhitting the woof slantingly, or crookedly, or strongly, or weakly, as\nthe case might be; and by this difference in the concluding blow\nproducing a corresponding contrast in the final aspect of the\ncompleted fabric; this savage's sword, thought I, which thus finally\nshapes and fashions both warp and woof; this easy, indifferent sword\nmust be chance  aye, chance, free will, and necessity  nowise\nincompatible  all interweavingly working together. The straight\nwarp of necessity, not to be swerved from its ultimate course  its\nevery alternating vibration, indeed, only tending to that; free will\nstill free to ply her shuttle between given threads; and chance,\nthough restrained in its play within the right lines of necessity, and\nsideways in its motions directed by free will, though thus prescribed\nto by both, chance by turns rules either, and has the last featuring\nblow at events.\n\nThus we were weaving and weaving away when I started at a sound so\nstrange, long drawn, and musically wild and unearthly, that the ball\nof free will dropped from my hand, and I stood gazing up at the clouds\nwhence that voice dropped like a wing. High aloft in the cross-trees\nwas that mad Gay-Header, Tashtego. His body was reaching eagerly\nforward, his hand stretched out like a wand, and at brief sudden\nintervals he continued his cries. To be sure the same sound was that\nvery moment perhaps being heard all over the seas, from hundreds of\nwhalemen's look-outs perched as high in the air; but from few of those\nlungs could that accustomed old cry have derived such a marvellous\ncadence as from Tashtego the Indian's.\n\nAs he stood hovering over you half suspended in air, so wildly and\neagerly peering towards the horizon, you would have thought him some\nprophet or seer beholding the shadows of Fate, and by those wild cries\nannouncing their coming.\n\n\"There she blows! there! there! there! she blows! she blows!\"\n\n\"Where-away?\"\n\n\"On the lee-beam, about two miles off! a school of them!\"\n\nInstantly all was commotion.\n\nThe Sperm Whale blows as a clock ticks, with the same undeviating and\nreliable uniformity. And thereby whalemen distinguish this fish from\nother tribes of his genus.\n\n\"There go flukes!\" was now the cry from Tashtego; and the whales\ndisappeared.\n\n\"Quick, steward!\" cried Ahab. \"Time! time!\"\n\nDough-Boy hurried below, glanced at the watch, and reported the exact\nminute to Ahab.\n\nThe ship was now kept away from the wind, and she went gently rolling\nbefore it. Tashtego reporting that the whales had gone down heading to\nleeward, we confidently looked to see them again directly in advance\nof our bows. For that singular craft at times evinced by the Sperm\nWhale when, sounding with his head in one direction, he nevertheless,\nwhile concealed beneath the surface, mills round, and swiftly swims\noff in the opposite quarter  this deceitfulness of his could not\nnow be in action; for there was no reason to suppose that the fish\nseen by Tashtego had been in any way alarmed, or indeed knew at all of\nour vicinity. One of the men selected for shipkeepers  that is,\nthose not appointed to the boats, by this time relieved the Indian at\nthe main-mast head. The sailors at the fore and mizzen had come down;\nthe line tubs were fixed in their places; the cranes were thrust out;\nthe mainyard was backed, and the three boats swung over the sea like\nthree samphire baskets over high cliffs. Outside of the bulwarks their\neager crews with one hand clung to the rail, while one foot was\nexpectantly poised on the gunwale. So look the long line of\nman-of-war's men about to throw themselves on board an enemy's ship.\n\nBut at this critical instant a sudden exclamation was heard that took\nevery eye from the whale. With a start all glared at dark Ahab, who\nwas surrounded by five dusky phantoms that seemed fresh formed out of\nair.\n\nCHAPTER 48 The First Lowering.\n\nThe phantoms, for so they then seemed, were flitting on the other side\nof the deck, and, with a noiseless celerity, were casting loose the\ntackles and bands of the boat which swung there. This boat had always\nbeen deemed one of the spare boats, though technically called the\ncaptain's, on account of its hanging from the starboard quarter. The\nfigure that now stood by its bows was tall and swart, with one white\ntooth evilly protruding from its steel-like lips. A rumpled Chinese\njacket of black cotton funereally invested him, with wide black\ntrowsers of the same dark stuff. But strangely crowning this ebonness\nwas a glistening white plaited turban, the living hair braided and\ncoiled round and round upon his head. Less swart in aspect, the\ncompanions of this figure were of that vivid, tiger-yellow complexion\npeculiar to some of the aboriginal natives of the Manillas;  a race\nnotorious for a certain diabolism of subtilty, and by some honest\nwhite mariners supposed to be the paid spies and secret confidential\nagents on the water of the devil, their lord, whose counting-room they\nsuppose to be elsewhere.\n\nWhile yet the wondering ship's company were gazing upon these\nstrangers, Ahab cried out to the white-turbaned old man at their head,\n\"All ready there, Fedallah?\"\n\n\"Ready,\" was the half-hissed reply.\n\n\"Lower away then; d'ye hear?\" shouting across the deck. \"Lower away\nthere, I say.\"\n\nSuch was the thunder of his voice, that spite of their amazement the\nmen sprang over the rail; the sheaves whirled round in the blocks;\nwith a wallow, the three boats dropped into the sea; while, with a\ndexterous, off-handed daring, unknown in any other vocation, the\nsailors, goat-like, leaped down the rolling ship's side into the\ntossed boats below.\n\nHardly had they pulled out from under the ship's lee, when a fourth\nkeel, coming from the windward side, pulled round under the stern, and\nshowed the five strangers rowing Ahab, who, standing erect in the\nstern, loudly hailed Starbuck, Stubb, and Flask, to spread themselves\nwidely, so as to cover a large expanse of water. But with all their\neyes again riveted upon the swart Fedallah and his crew, the inmates\nof the other boats obeyed not the command.\n\n\"Captain Ahab?  \" said Starbuck.\n\n\"Spread yourselves,\" cried Ahab; \"give way, all four boats. Thou,\nFlask, pull out more to leeward!\"\n\n\"Aye, aye, sir,\" cheerily cried little King-Post, sweeping round his\ngreat steering oar. \"Lay back!\" addressing his crew. \"There! \nthere!  there again! There she blows right ahead, boys!  lay\nback!\"\n\n\"Never heed yonder yellow boys, Archy.\"\n\n\"Oh, I don't mind'em, sir,\" said Archy; \"I knew it all before\nnow. Didn't I hear 'em in the hold? And didn't I tell Cabaco here of\nit? What say ye, Cabaco? They are stowaways, Mr. Flask.\"\n\n\"Pull, pull, my fine hearts-alive; pull, my children; pull, my little\nones,\" drawlingly and soothingly sighed Stubb to his crew, some of\nwhom still showed signs of uneasiness. \"Why don't you break your\nbackbones, my boys? What is it you stare at? Those chaps in yonder\nboat? Tut! They are only five more hands come to help us  never\nmind from where  the more the merrier. Pull, then, do pull; never\nmind the brimstone  devils are good fellows enough. So, so; there\nyou are now; that's the stroke for a thousand pounds; that's the\nstroke to sweep the stakes! Hurrah for the gold cup of sperm oil, my\nheroes! Three cheers, men  all hearts alive! Easy, easy; don't be\nin a hurry  don't be in a hurry. Why don't you snap your oars, you\nrascals? Bite something, you dogs! So, so, so, then:  softly,\nsoftly! That's it  that's it! long and strong. Give way there, give\nway! The devil fetch ye, ye ragamuffin rapscallions; ye are all\nasleep. Stop snoring, ye sleepers, and pull. Pull, will ye? pull,\ncan't ye? pull, won't ye? Why in the name of gudgeons and ginger-cakes\ndon't ye pull?  pull and break something! pull, and start your eyes\nout! Here!\" whipping out the sharp knife from his girdle; \"every\nmother's son of ye draw his knife, and pull with the blade between his\nteeth. That's it  that's it. Now ye do something; that looks like\nit, my steel-bits. Start her  start her, my silver-spoons! Start\nher, marling-spikes!\"\n\nStubb's exordium to his crew is given here at large, because he had\nrather a peculiar way of talking to them in general, and especially in\ninculcating the religion of rowing. But you must not suppose from this\nspecimen of his sermonizings that he ever flew into downright passions\nwith his congregation. Not at all; and therein consisted his chief\npeculiarity. He would say the most terrific things to his crew, in a\ntone so strangely compounded of fun and fury, and the fury seemed so\ncalculated merely as a spice to the fun, that no oarsman could hear\nsuch queer invocations without pulling for dear life, and yet pulling\nfor the mere joke of the thing. Besides he all the time looked so easy\nand indolent himself, so loungingly managed his steering-oar, and so\nbroadly gaped  open-mouthed at times  that the mere sight of\nsuch a yawning commander, by sheer force of contrast, acted like a\ncharm upon the crew. Then again, Stubb was one of those odd sort of\nhumorists, whose jollity is sometimes so curiously ambiguous, as to\nput all inferiors on their guard in the matter of obeying them.\n\nIn obedience to a sign from Ahab, Starbuck was now pulling obliquely\nacross Stubb's bow; and when for a minute or so the two boats were\npretty near to each other, Stubb hailed the mate.\n\n\"Mr. Starbuck! larboard boat there, ahoy! a word with ye, sir, if ye\nplease!\"\n\n\"Halloa!\" returned Starbuck, turning round not a single inch as he\nspoke; still earnestly but whisperingly urging his crew; his face set\nlike a flint from Stubb's.\n\n\"What think ye of those yellow boys, sir!\n\n\"Smuggled on board, somehow, before the ship sailed. (Strong, strong,\nboys!)\" in a whisper to his crew, then speaking out loud again: \"A sad\nbusiness, Mr. Stubb! (seethe her, seethe her, my lads!) but never\nmind, Mr. Stubb, all for the best. Let all your crew pull strong, come\nwhat will. (Spring, my men, spring!) There's hogsheads of sperm ahead,\nMr. Stubb, and that's what ye came for. (Pull, my boys!) Sperm,\nsperm's the play! This at least is duty; duty and profit hand in\nhand.\"\n\n\"Aye, aye, I thought as much,\" soliloquized Stubb, when the boats\ndiverged, \"as soon as I clapt eye on 'em, I thought so. Aye, and\nthat's what he went into the after hold for, so often, as Dough-Boy\nlong suspected. They were hidden down there. The White Whale's at the\nbottom of it. Well, well, so be it! Can't be helped! All right! Give\nway, men! It ain't the White Whale to-day! Give way!\"\n\nNow the advent of these outlandish strangers at such a critical\ninstant as the lowering of the boats from the deck, this had not\nunreasonably awakened a sort of superstitious amazement in some of the\nship's company; but Archy's fancied discovery having some time\nprevious got abroad among them, though indeed not credited then, this\nhad in some small measure prepared them for the event. It took off the\nextreme edge of their wonder; and so what with all this and Stubb's\nconfident way of accounting for their appearance, they were for the\ntime freed from superstitious surmisings; though the affair still left\nabundant room for all manner of wild conjectures as to dark Ahab's\nprecise agency in the matter from the beginning. For me, I silently\nrecalled the mysterious shadows I had seen creeping on board the\nPequod during the dim Nantucket dawn, as well as the enigmatical\nhintings of the unaccountable Elijah.\n\nMeantime, Ahab, out of hearing of his officers, having sided the\nfurthest to windward, was still ranging ahead of the other boats; a\ncircumstance bespeaking how potent a crew was pulling him. Those tiger\nyellow creatures of his seemed all steel and whalebone; like five\ntrip-hammers they rose and fell with regular strokes of strength,\nwhich periodically started the boat along the water like a horizontal\nburst boiler out of a Mississippi steamer. As for Fedallah, who was\nseen pulling the harpooneer oar, he had thrown aside his black jacket,\nand displayed his naked chest with the whole part of his body above\nthe gunwale, clearly cut against the alternating depressions of the\nwatery horizon; while at the other end of the boat Ahab, with one arm,\nlike a fencer's, thrown half backward into the air, as if to\ncounterbalance any tendency to trip; Ahab was seen steadily managing\nhis steering oar as in a thousand boat lowerings ere the White Whale\nhad torn him. All at once the outstretched arm gave a peculiar motion\nand then remained fixed, while the boat's five oars were seen\nsimultaneously peaked. Boat and crew sat motionless on the\nsea. Instantly the three spread boats in the rear paused on their\nway. The whales had irregularly settled bodily down into the blue,\nthus giving no distantly discernible token of the movement, though\nfrom his closer vicinity Ahab had observed it.\n\n\"Every man look out along his oars!\" cried Starbuck. \"Thou, Queequeg,\nstand up!\"\n\nNimbly springing up on the triangular raised box in the bow, the\nsavage stood erect there, and with intensely eager eyes gazed off\ntowards the spot where the chase had last been descried. Likewise upon\nthe extreme stern of the boat where it was also triangularly\nplatformed level with the gunwale, Starbuck himself was seen coolly\nand adroitly balancing himself to the jerking tossings of his chip of\na craft, and silently eyeing the vast blue eye of the sea.\n\nNot very far distant Flask's boat was also lying breathlessly still;\nits commander recklessly standing upon the top of the loggerhead, a\nstout sort of post rooted in the keel, and rising some two feet above\nthe level of the stern platform. It is used for catching turns with\nthe whale line. Its top is not more spacious than the palm of a man's\nhand, and standing upon such a base as that, Flask seemed perched at\nthe mast-head of some ship which had sunk to all but her trucks. But\nlittle King-Post was small and short, and at the same time little\nKing-Post was full of a large and tall ambition, so that this\nloggerhead stand-point of his did by no means satisfy King-Post.\n\n\"I can't see three seas off; tip us up an oar there, and let me on to\nthat.\"\n\nUpon this, Daggoo, with either hand upon the gunwale to steady his\nway, swiftly slid aft, and then erecting himself volunteered his lofty\nshoulders for a pedestal.\n\n\"Good a mast-head as any, sir. Will you mount?\"\n\n\"That I will, and thank ye very much, my fine fellow; only I wish you\nfifty feet taller.\"\n\nWhereupon planting his feet firmly against two opposite planks of the\nboat, the gigantic negro, stooping a little, presented his flat palm\nto Flask's foot, and then putting Flask's hand on his hearse-plumed\nhead and bidding him spring as he himself should toss, with one\ndexterous fling landed the little man high and dry on his\nshoulders. And here was Flask now standing, Daggoo with one lifted arm\nfurnishing him with a breastband to lean against and steady himself\nby.\n\nAt any time it is a strange sight to the tyro to see with what\nwondrous habitude of unconscious skill the whaleman will maintain an\nerect posture in his boat, even when pitched about by the most\nriotously perverse and cross-running seas. Still more strange to see\nhim giddily perched upon the loggerhead itself, under such\ncircumstances. But the sight of little Flask mounted upon gigantic\nDaggoo was yet more curious; for sustaining himself with a cool,\nindifferent, easy, unthought of, barbaric majesty, the noble negro to\nevery roll of the sea harmoniously rolled his fine form. On his broad\nback, flaxen-haired Flask seemed a snow-flake. The bearer looked\nnobler than the rider. Though truly vivacious, tumultuous,\nostentatious little Flask would now and then stamp with impatience;\nbut not one added heave did he thereby give to the negro's lordly\nchest. So have I seen Passion and Vanity stamping the living\nmagnanimous earth, but the earth did not alter her tides and her\nseasons for that.\n\nMeanwhile Stubb, the third mate, betrayed no such far-gazing\nsolicitudes. The whales might have made one of their regular\nsoundings, not a temporary dive from mere fright; and if that were the\ncase, Stubb, as his wont in such cases, it seems, was resolved to\nsolace the languishing interval with his pipe. He withdrew it from his\nhatband, where he always wore it aslant like a feather. He loaded it,\nand rammed home the loading with his thumb-end; but hardly had he\nignited his match across the rough sandpaper of his hand, when\nTashtego, his harpooneer, whose eyes had been setting to windward like\ntwo fixed stars, suddenly dropped like light from his erect attitude\nto his seat, crying out in a quick phrensy of hurry, \"Down, down all,\nand give way!  there they are!\"\n\nTo a landsman, no whale, nor any sign of a herring, would have been\nvisible at that moment; nothing but a troubled bit of greenish white\nwater, and thin scattered puffs of vapour hovering over it, and\nsuffusingly blowing off to leeward, like the confused scud from white\nrolling billows. The air around suddenly vibrated and tingled, as it\nwere, like the air over intensely heated plates of iron. Beneath this\natmospheric waving and curling, and partially beneath a thin layer of\nwater, also, the whales were swimming. Seen in advance of all the\nother indications, the puffs of vapour they spouted, seemed their\nforerunning couriers and detached flying outriders.\n\nAll four boats were now in keen pursuit of that one spot of troubled\nwater and air. But it bade fair to outstrip them; it flew on and on,\nas a mass of interblending bubbles borne down a rapid stream from the\nhills.\n\n\"Pull, pull, my good boys,\" said Starbuck, in the lowest possible but\nintensest concentrated whisper to his men; while the sharp fixed\nglance from his eyes darted straight ahead of the bow, almost seemed\nas two visible needles in two unerring binnacle compasses. He did not\nsay much to his crew, though, nor did his crew say anything to\nhim. Only the silence of the boat was at intervals startlingly pierced\nby one of his peculiar whispers, now harsh with command, now soft with\nentreaty.\n\nHow different the loud little King-Post. \"Sing out and say something,\nmy hearties. Roar and pull, my thunderbolts! Beach me, beach me on\ntheir black backs, boys; only do that for me, and I'll sign over to\nyou my Martha's Vineyard plantation, boys; including wife and\nchildren, boys. Lay me on  lay me on! O Lord, Lord! but I shall go\nstark, staring mad! See! see that white water!\" And so shouting, he\npulled his hat from his head, and stamped up and down on it; then\npicking it up, flirted it far off upon the sea; and finally fell to\nrearing and plunging in the boat's stern like a crazed colt from the\nprairie.\n\n\"Look at that chap now,\" philosophically drawled Stubb, who, with his\nunlighted short pipe, mechanically retained between his teeth, at a\nshort distance, followed after  \"He's got fits, that Flask\nhas. Fits? yes, give him fits  that's the very word  pitch fits\ninto 'em. Merrily, merrily, hearts-alive. Pudding for supper, you\nknow;  merry's the word. Pull, babes  pull, sucklings  pull,\nall. But what the devil are you hurrying about? Softly, softly, and\nsteadily, my men. Only pull, and keep pulling; nothing more. Crack all\nyour backbones, and bite your knives in two  that's all. Take it\neasy  why don't ye take it easy, I say, and burst all your livers\nand lungs!\"\n\nBut what it was that inscrutable Ahab said to that tiger-yellow crew\nof his  these were words best omitted here; for you live under the\nblessed light of the evangelical land. Only the infidel sharks in the\naudacious seas may give ear to such words, when, with tornado brow,\nand eyes of red murder, and foam-glued lips, Ahab leaped after his\nprey.\n\nMeanwhile, all the boats tore on. The repeated specific allusions of\nFlask to \"that whale,\" as he called the fictitious monster which he\ndeclared to be incessantly tantalizing his boat's bow with its tail\n these allusions of his were at times so vivid and life-like, that\nthey would cause some one or two of his men to snatch a fearful look\nover the shoulder. But this was against all rule; for the oarsmen must\nput out their eyes, and ram a skewer through their necks; usage\npronouncing that they must have no organs but ears, and no limbs but\narms, in these critical moments.\n\nIt was a sight full of quick wonder and awe! The vast swells of the\nomnipotent sea; the surging, hollow roar they made, as they rolled\nalong the eight gunwales, like gigantic bowls in a boundless\nbowling-green; the brief suspended agony of the boat, as it would tip\nfor an instant on the knife-like edge of the sharper waves, that\nalmost seemed threatening to cut it in two; the sudden profound dip\ninto the watery glens and hollows; the keen spurrings and goadings to\ngain the top of the opposite hill; the headlong, sled-like slide down\nits other side;  all these, with the cries of the headsmen and\nharpooneers, and the shuddering gasps of the oarsmen, with the\nwondrous sight of the ivory Pequod bearing down upon her boats with\noutstretched sails, like a wild hen after her screaming brood;  all\nthis was thrilling.\n\nNot the raw recruit, marching from the bosom of his wife into the\nfever heat of his first battle; not the dead man's ghost encountering\nthe first unknown phantom in the other world;  neither of these can\nfeel stranger and stronger emotions than that man does, who for the\nfirst time finds himself pulling into the charmed, churned circle of\nthe hunted sperm whale.\n\nThe dancing white water made by the chase was now becoming more and\nmore visible, owing to the increasing darkness of the dun\ncloud-shadows flung upon the sea. The jets of vapour no longer\nblended, but tilted everywhere to right and left; the whales seemed\nseparating their wakes. The boats were pulled more apart; Starbuck\ngiving chase to three whales running dead to leeward. Our sail was now\nset, and, with the still rising wind, we rushed along; the boat going\nwith such madness through the water, that the lee oars could scarcely\nbe worked rapidly enough to escape being torn from the row-locks.\n\nSoon we were running through a suffusing wide veil of mist; neither\nship nor boat to be seen.\n\n\"Give way, men,\" whispered Starbuck, drawing still further aft the\nsheet of his sail; \"there is time to kill a fish yet before the squall\ncomes. There's white water again!  close to! Spring!\"\n\nSoon after, two cries in quick succession on each side of us denoted\nthat the other boats had got fast; but hardly were they overheard,\nwhen with a lightning-like hurtling whisper Starbuck said: \"Stand up!\"\nand Queequeg, harpoon in hand, sprang to his feet.\n\nThough not one of the oarsmen was then facing the life and death peril\nso close to them ahead, yet with their eyes on the intense countenance\nof the mate in the stern of the boat, they knew that the imminent\ninstant had come; they heard, too, an enormous wallowing sound as of\nfifty elephants stirring in their litter. Meanwhile the boat was still\nbooming through the mist, the waves curling and hissing around us like\nthe erected crests of enraged serpents.\n\n\"That's his hump. There, there, give it to him!\" whispered Starbuck.\n\nA short rushing sound leaped out of the boat; it was the darted iron\nof Queequeg. Then all in one welded commotion came an invisible push\nfrom astern, while forward the boat seemed striking on a ledge; the\nsail collapsed and exploded; a gush of scalding vapour shot up near\nby; something rolled and tumbled like an earthquake beneath us. The\nwhole crew were half suffocated as they were tossed helter-skelter\ninto the white curdling cream of the squall. Squall, whale, and\nharpoon had all blended together; and the whale, merely grazed by the\niron, escaped.\n\nThough completely swamped, the boat was nearly unharmed. Swimming\nround it we picked up the floating oars, and lashing them across the\ngunwale, tumbled back to our places. There we sat up to our knees in\nthe sea, the water covering every rib and plank, so that to our\ndownward gazing eyes the suspended craft seemed a coral boat grown up\nto us from the bottom of the ocean.\n\nThe wind increased to a howl; the waves dashed their bucklers\ntogether; the whole squall roared, forked, and crackled around us like\na white fire upon the prairie, in which, unconsumed, we were burning;\nimmortal in these jaws of death! In vain we hailed the other boats; as\nwell roar to the live coals down the chimney of a flaming furnace as\nhail those boats in that storm. Meanwhile the driving scud, rack, and\nmist, grew darker with the shadows of night; no sign of the ship could\nbe seen. The rising sea forbade all attempts to bale out the boat. The\noars were useless as propellers, performing now the office of\nlife-preservers. So, cutting the lashing of the waterproof match keg,\nafter many failures Starbuck contrived to ignite the lamp in the\nlantern; then stretching it on a waif pole, handed it to Queequeg as\nthe standard-bearer of this forlorn hope. There, then, he sat, holding\nup that imbecile candle in the heart of that almighty\nforlornness. There, then, he sat, the sign and symbol of a man without\nfaith, hopelessly holding up hope in the midst of despair.\n\nWet, drenched through, and shivering cold, despairing of ship or boat,\nwe lifted up our eyes as the dawn came on. The mist still spread over\nthe sea, the empty lantern lay crushed in the bottom of the\nboat. Suddenly Queequeg started to his feet, hollowing his hand to his\near. We all heard a faint creaking, as of ropes and yards hitherto\nmuffled by the storm. The sound came nearer and nearer; the thick\nmists were dimly parted by a huge, vague form. Affrighted, we all\nsprang into the sea as the ship at last loomed into view, bearing\nright down upon us within a distance of not much more than its length.\n\nFloating on the waves we saw the abandoned boat, as for one instant it\ntossed and gaped beneath the ship's bows like a chip at the base of a\ncataract; and then the vast hull rolled over it, and it was seen no\nmore till it came up weltering astern. Again we swam for it, were\ndashed against it by the seas, and were at last taken up and safely\nlanded on board. Ere the squall came close to, the other boats had cut\nloose from their fish and returned to the ship in good time. The ship\nhad given us up, but was still cruising, if haply it might light upon\nsome token of our perishing,  an oar or a lance pole.\n\nCHAPTER 49 The Hyena.\n\nThere are certain queer times and occasions in this strange mixed\naffair we call life when a man takes this whole universe for a vast\npractical joke, though the wit thereof he but dimly discerns, and more\nthan suspects that the joke is at nobody's expense but his\nown. However, nothing dispirits, and nothing seems worth while\ndisputing. He bolts down all events, all creeds, and beliefs, and\npersuasions, all hard things visible and invisible, never mind how\nknobby; as an ostrich of potent digestion gobbles down bullets and gun\nflints. And as for small difficulties and worryings, prospects of\nsudden disaster, peril of life and limb; all these, and death itself,\nseem to him only sly, good-natured hits, and jolly punches in the side\nbestowed by the unseen and unaccountable old joker. That odd sort of\nwayward mood I am speaking of, comes over a man only in some time of\nextreme tribulation; it comes in the very midst of his earnestness, so\nthat what just before might have seemed to him a thing most momentous,\nnow seems but a part of the general joke. There is nothing like the\nperils of whaling to breed this free and easy sort of genial,\ndesperado philosophy; and with it I now regarded this whole voyage of\nthe Pequod, and the great White Whale its object.\n\n\"Queequeg,\" said I, when they had dragged me, the last man, to the\ndeck, and I was still shaking myself in my jacket to fling off the\nwater; \"Queequeg, my fine friend, does this sort of thing often\nhappen?\" Without much emotion, though soaked through just like me, he\ngave me to understand that such things did often happen.\n\n\"Mr. Stubb,\" said I, turning to that worthy, who, buttoned up in his\noil-jacket, was now calmly smoking his pipe in the rain; \"Mr. Stubb, I\nthink I have heard you say that of all whalemen you ever met, our\nchief mate, Mr. Starbuck, is by far the most careful and prudent. I\nsuppose then, that going plump on a flying whale with your sail set in\na foggy squall is the height of a whaleman's discretion?\"\n\n\"Certain. I've lowered for whales from a leaking ship in a gale off\nCape Horn.\"\n\n\"Mr. Flask,\" said I, turning to little King-Post, who was standing\nclose by; \"you are experienced in these things, and I am not. Will you\ntell me whether it is an unalterable law in this fishery, Mr. Flask,\nfor an oarsman to break his own back pulling himself back-foremost\ninto death's jaws?\"\n\n\"Can't you twist that smaller?\" said Flask. \"Yes, that's the law. I\nshould like to see a boat's crew backing water up to a whale face\nforemost. Ha, ha! the whale would give them squint for squint, mind\nthat!\"\n\nHere then, from three impartial witnesses, I had a deliberate\nstatement of the entire case. Considering, therefore, that squalls and\ncapsizings in the water and consequent bivouacks on the deep, were\nmatters of common occurrence in this kind of life; considering that at\nthe superlatively critical instant of going on to the whale I must\nresign my life into the hands of him who steered the boat \noftentimes a fellow who at that very moment is in his impetuousness\nupon the point of scuttling the craft with his own frantic stampings;\nconsidering that the particular disaster to our own particular boat\nwas chiefly to be imputed to Starbuck's driving on to his whale almost\nin the teeth of a squall, and considering that Starbuck,\nnotwithstanding, was famous for his great heedfulness in the fishery;\nconsidering that I belonged to this uncommonly prudent Starbuck's\nboat; and finally considering in what a devil's chase I was\nimplicated, touching the White Whale: taking all things together, I\nsay, I thought I might as well go below and make a rough draft of my\nwill. \"Queequeg,\" said I, \"come along, you shall be my lawyer,\nexecutor, and legatee.\"\n\nIt may seem strange that of all men sailors should be tinkering at\ntheir last wills and testaments, but there are no people in the world\nmore fond of that diversion. This was the fourth time in my nautical\nlife that I had done the same thing. After the ceremony was concluded\nupon the present occasion, I felt all the easier; a stone was rolled\naway from my heart. Besides, all the days I should now live would be\nas good as the days that Lazarus lived after his resurrection; a\nsupplementary clean gain of so many months or weeks as the case might\nbe. I survived myself; my death and burial were locked up in my\nchest. I looked round me tranquilly and contentedly, like a quiet\nghost with a clean conscience sitting inside the bars of a snug family\nvault.\n\nNow then, thought I, unconsciously rolling up the sleeves of my frock,\nhere goes for a cool, collected dive at death and destruction, and the\ndevil fetch the hindmost.\n\nCHAPTER 50 Ahab's Boat and Crew. Fedallah.\n\n\"Who would have thought it, Flask!\" cried Stubb; \"if I had but one leg\nyou would not catch me in a boat, unless maybe to stop the plug-hole\nwith my timber toe. Oh! he's a wonderful old man!\"\n\n\"I don't think it so strange, after all, on that account,\" said\nFlask. \"If his leg were off at the hip, now, it would be a different\nthing. That would disable him; but he has one knee, and good part of\nthe other left, you know.\"\n\n\"I don't know that, my little man; I never yet saw him kneel.\"\n\nAmong whale-wise people it has often been argued whether, considering\nthe paramount importance of his life to the success of the voyage, it\nis right for a whaling captain to jeopardize that life in the active\nperils of the chase. So Tamerlane's soldiers often argued with tears\nin their eyes, whether that invaluable life of his ought to be carried\ninto the thickest of the fight.\n\nBut with Ahab the question assumed a modified aspect. Considering that\nwith two legs man is but a hobbling wight in all times of danger;\nconsidering that the pursuit of whales is always under great and\nextraordinary difficulties; that every individual moment, indeed, then\ncomprises a peril; under these circumstances is it wise for any maimed\nman to enter a whale-boat in the hunt? As a general thing, the\njoint-owners of the Pequod must have plainly thought not.\n\nAhab well knew that although his friends at home would think little of\nhis entering a boat in certain comparatively harmless vicissitudes of\nthe chase, for the sake of being near the scene of action and giving\nhis orders in person, yet for Captain Ahab to have a boat actually\napportioned to him as a regular headsman in the hunt  above all for\nCaptain Ahab to be supplied with five extra men, as that same boat's\ncrew, he well knew that such generous conceits never entered the heads\nof the owners of the Pequod. Therefore he had not solicited a boat's\ncrew from them, nor had he in any way hinted his desires on that\nhead. Nevertheless he had taken private measures of his own touching\nall that matter. Until Cabaco's published discovery, the sailors had\nlittle foreseen it, though to be sure when, after being a little while\nout of port, all hands had concluded the customary business of fitting\nthe whaleboats for service; when some time after this Ahab was now and\nthen found bestirring himself in the matter of making thole-pins with\nhis own hands for what was thought to be one of the spare boats, and\neven solicitously cutting the small wooden skewers, which when the\nline is running out are pinned over the groove in the bow: when all\nthis was observed in him, and particularly his solicitude in having an\nextra coat of sheathing in the bottom of the boat, as if to make it\nbetter withstand the pointed pressure of his ivory limb; and also the\nanxiety he evinced in exactly shaping the thigh board, or clumsy\ncleat, as it is sometimes called, the horizontal piece in the boat's\nbow for bracing the knee against in darting or stabbing at the whale;\nwhen it was observed how often he stood up in that boat with his\nsolitary knee fixed in the semi-circular depression in the cleat, and\nwith the carpenter's chisel gouged out a little here and straightened\nit a little there; all these things, I say, had awakened much interest\nand curiosity at the time. But almost everybody supposed that this\nparticular preparative heedfulness in Ahab must only be with a view to\nthe ultimate chase of Moby Dick; for he had already revealed his\nintention to hunt that mortal monster in person. But such a\nsupposition did by no means involve the remotest suspicion as to any\nboat's crew being assigned to that boat.\n\nNow, with the subordinate phantoms, what wonder remained soon waned\naway; for in a whaler wonders soon wane. Besides, now and then such\nunaccountable odds and ends of strange nations come up from the\nunknown nooks and ash-holes of the earth to man these floating outlaws\nof whalers; and the ships themselves often pick up such queer castaway\ncreatures found tossing about the open sea on planks, bits of wreck,\noars, whaleboats, canoes, blown-off Japanese junks, and what not; that\nBeelzebub himself might climb up the side and step down into the cabin\nto chat with the captain, and it would not create any unsubduable\nexcitement in the forecastle.\n\nBut be all this as it may, certain it is that while the subordinate\nphantoms soon found their place among the crew, though still as it\nwere somehow distinct from them, yet that hair-turbaned Fedallah\nremained a muffled mystery to the last. Whence he came in a mannerly\nworld like this, by what sort of unaccountable tie he soon evinced\nhimself to be linked with Ahab's peculiar fortunes; nay, so far as to\nhave some sort of a half-hinted influence; Heaven knows, but it might\nhave been even authority over him; all this none knew. But one cannot\nsustain an indifferent air concerning Fedallah. He was such a creature\nas civilized, domestic people in the temperate zone only see in their\ndreams, and that but dimly; but the like of whom now and then glide\namong the unchanging Asiatic communities, especially the Oriental\nisles to the east of the continent  those insulated, immemorial,\nunalterable countries, which even in these modern days still preserve\nmuch of the ghostly aboriginalness of earth's primal generations, when\nthe memory of the first man was a distinct recollection, and all men\nhis descendants, unknowing whence he came, eyed each other as real\nphantoms, and asked of the sun and the moon why they were created and\nto what end; when though, according to Genesis, the angels indeed\nconsorted with the daughters of men, the devils also, add the\nuncanonical Rabbins, indulged in mundane amours.\n\nCHAPTER 51 The Spirit-Spout.\n\nDays, weeks passed, and under easy sail, the ivory Pequod had slowly\nswept across four several cruising-grounds; that off the Azores; off\nthe Cape de Verdes; on the Plate (so called), being off the mouth of\nthe Rio de la Plata; and the Carrol Ground, an unstaked, watery\nlocality, southerly from St. Helena.\n\nIt was while gliding through these latter waters that one serene and\nmoonlight night, when all the waves rolled by like scrolls of silver;\nand, by their soft, suffusing seethings, made what seemed a silvery\nsilence, not a solitude; on such a silent night a silvery jet was seen\nfar in advance of the white bubbles at the bow. Lit up by the moon, it\nlooked celestial; seemed some plumed and glittering god uprising from\nthe sea. Fedallah first descried this jet. For of these moonlight\nnights, it was his wont to mount to the main-mast head, and stand a\nlook-out there, with the same precision as if it had been day. And\nyet, though herds of whales were seen by night, not one whaleman in a\nhundred would venture a lowering for them. You may think with what\nemotions, then, the seamen beheld this old Oriental perched aloft at\nsuch unusual hours; his turban and the moon, companions in one\nsky. But when, after spending his uniform interval there for several\nsuccessive nights without uttering a single sound; when, after all\nthis silence, his unearthly voice was heard announcing that silvery,\nmoon-lit jet, every reclining mariner started to his feet as if some\nwinged spirit had lighted in the rigging, and hailed the mortal\ncrew. \"There she blows!\" Had the trump of judgment blown, they could\nnot have quivered more; yet still they felt no terror; rather\npleasure. For though it was a most unwonted hour, yet so impressive\nwas the cry, and so deliriously exciting, that almost every soul on\nboard instinctively desired a lowering.\n\nWalking the deck with quick, side-lunging strides, Ahab commanded the\nt'gallant sails and royals to be set, and every stunsail spread. The\nbest man in the ship must take the helm. Then, with every mast-head\nmanned, the piled-up craft rolled down before the wind. The strange,\nupheaving, lifting tendency of the taffrail breeze filling the hollows\nof so many sails, made the buoyant, hovering deck to feel like air\nbeneath the feet; while still she rushed along, as if two antagonistic\ninfluences were struggling in her  one to mount direct to heaven,\nthe other to drive yawingly to some horizontal goal. And had you\nwatched Ahab's face that night, you would have thought that in him\nalso two different things were warring. While his one live leg made\nlively echoes along the deck, every stroke of his dead limb sounded\nlike a coffin-tap. On life and death this old man walked. But though\nthe ship so swiftly sped, and though from every eye, like arrows, the\neager glances shot, yet the silvery jet was no more seen that\nnight. Every sailor swore he saw it once, but not a second time.\n\nThis midnight-spout had almost grown a forgotten thing, when, some\ndays after, lo! at the same silent hour, it was again announced: again\nit was descried by all; but upon making sail to overtake it, once more\nit disappeared as if it had never been. And so it served us night\nafter night, till no one heeded it but to wonder at it. Mysteriously\njetted into the clear moonlight, or starlight, as the case might be;\ndisappearing again for one whole day, or two days, or three; and\nsomehow seeming at every distinct repetition to be advancing still\nfurther and further in our van, this solitary jet seemed for ever\nalluring us on.\n\nNor with the immemorial superstition of their race, and in accordance\nwith the preternaturalness, as it seemed, which in many things\ninvested the Pequod, were there wanting some of the seamen who swore\nthat whenever and wherever descried; at however remote times, or in\nhowever far apart latitudes and longitudes, that unnearable spout was\ncast by one self-same whale; and that whale, Moby Dick. For a time,\nthere reigned, too, a sense of peculiar dread at this flitting\napparition, as if it were treacherously beckoning us on and on, in\norder that the monster might turn round upon us, and rend us at last\nin the remotest and most savage seas.\n\nThese temporary apprehensions, so vague but so awful, derived a\nwondrous potency from the contrasting serenity of the weather, in\nwhich, beneath all its blue blandness, some thought there lurked a\ndevilish charm, as for days and days we voyaged along, through seas so\nwearily, lonesomely mild, that all space, in repugnance to our\nvengeful errand, seemed vacating itself of life before our urn-like\nprow.\n\nBut, at last, when turning to the eastward, the Cape winds began\nhowling around us, and we rose and fell upon the long, troubled seas\nthat are there; when the ivory-tusked Pequod sharply bowed to the\nblast, and gored the dark waves in her madness, till, like showers of\nsilver chips, the foam-flakes flew over her bulwarks; then all this\ndesolate vacuity of life went away, but gave place to sights more\ndismal than before.\n\nClose to our bows, strange forms in the water darted hither and\nthither before us; while thick in our rear flew the inscrutable\nsea-ravens. And every morning, perched on our stays, rows of these\nbirds were seen; and spite of our hootings, for a long time\nobstinately clung to the hemp, as though they deemed our ship some\ndrifting, uninhabited craft; a thing appointed to desolation, and\ntherefore fit roosting-place for their homeless selves. And heaved and\nheaved, still unrestingly heaved the black sea, as if its vast tides\nwere a conscience; and the great mundane soul were in anguish and\nremorse for the long sin and suffering it had bred.\n\nCape of Good Hope, do they call ye? Rather Cape Tormentoto, as called\nof yore; for long allured by the perfidious silences that before had\nattended us, we found ourselves launched into this tormented sea,\nwhere guilty beings transformed into those fowls and these fish,\nseemed condemned to swim on everlastingly without any haven in store,\nor beat that black air without any horizon. But calm, snow-white, and\nunvarying; still directing its fountain of feathers to the sky; still\nbeckoning us on from before, the solitary jet would at times be\ndescried.\n\nDuring all this blackness of the elements, Ahab, though assuming for\nthe time the almost continual command of the drenched and dangerous\ndeck, manifested the gloomiest reserve; and more seldom than ever\naddressed his mates. In tempestuous times like these, after everything\nabove and aloft has been secured, nothing more can be done but\npassively to await the issue of the gale. Then Captain and crew become\npractical fatalists. So, with his ivory leg inserted into its\naccustomed hole, and with one hand firmly grasping a shroud, Ahab for\nhours and hours would stand gazing dead to windward, while an\noccasional squall of sleet or snow would all but congeal his very\neyelashes together. Meantime, the crew driven from the forward part of\nthe ship by the perilous seas that burstingly broke over its bows,\nstood in a line along the bulwarks in the waist; and the better to\nguard against the leaping waves, each man had slipped himself into a\nsort of bowline secured to the rail, in which he swung as in a\nloosened belt. Few or no words were spoken; and the silent ship, as if\nmanned by painted sailors in wax, day after day tore on through all\nthe swift madness and gladness of the demoniac waves. By night the\nsame muteness of humanity before the shrieks of the ocean prevailed;\nstill in silence the men swung in the bowlines; still wordless Ahab\nstood up to the blast. Even when wearied nature seemed demanding\nrepose he would not seek that repose in his hammock. Never could\nStarbuck forget the old man's aspect, when one night going down into\nthe cabin to mark how the barometer stood, he saw him with closed eyes\nsitting straight in his floor-screwed chair; the rain and half-melted\nsleet of the storm from which he had some time before emerged, still\nslowly dripping from the unremoved hat and coat. On the table beside\nhim lay unrolled one of those charts of tides and currents which have\npreviously been spoken of. His lantern swung from his tightly clenched\nhand. Though the body was erect, the head was thrown back so that the\nclosed eyes were pointed towards the needle of the tell-tale that\nswung from a beam in the ceiling.\n\nTerrible old man! thought Starbuck with a shudder, sleeping in this\ngale, still thou steadfastly eyest thy purpose.\n\n The cabin-compass is called the tell-tale, because without going\nto the compass at the helm, the Captain, while below, can inform\nhimself of the course of the ship.\n\nCHAPTER 52 The Albatross.\n\nSouth-eastward from the Cape, off the distant Crozetts, a good\ncruising ground for Right Whalemen, a sail loomed ahead, the Goney\n(Albatross) by name. As she slowly drew nigh, from my lofty perch at\nthe fore-mast-head, I had a good view of that sight so remarkable to a\ntyro in the far ocean fisheries  a whaler at sea, and long absent\nfrom home.\n\nAs if the waves had been fullers, this craft was bleached like the\nskeleton of a stranded walrus. All down her sides, this spectral\nappearance was traced with long channels of reddened rust, while all\nher spars and her rigging were like the thick branches of trees furred\nover with hoar-frost. Only her lower sails were set. A wild sight it\nwas to see her long-bearded look-outs at those three mast-heads. They\nseemed clad in the skins of beasts, so torn and bepatched the raiment\nthat had survived nearly four years of cruising. Standing in iron\nhoops nailed to the mast, they swayed and swung over a fathomless sea;\nand though, when the ship slowly glided close under our stern, we six\nmen in the air came so nigh to each other that we might almost have\nleaped from the mast-heads of one ship to those of the other; yet,\nthose forlorn-looking fishermen, mildly eyeing us as they passed, said\nnot one word to our own look-outs, while the quarter-deck hail was\nbeing heard from below.\n\n\"Ship ahoy! Have ye seen the White Whale?\"\n\nBut as the strange captain, leaning over the pallid bulwarks, was in\nthe act of putting his trumpet to his mouth, it somehow fell from his\nhand into the sea; and the wind now rising amain, he in vain strove to\nmake himself heard without it. Meantime his ship was still increasing\nthe distance between. While in various silent ways the seamen of the\nPequod were evincing their observance of this ominous incident at the\nfirst mere mention of the White Whale's name to another ship, Ahab for\na moment paused; it almost seemed as though he would have lowered a\nboat to board the stranger, had not the threatening wind forbade. But\ntaking advantage of his windward position, he again seized his\ntrumpet, and knowing by her aspect that the stranger vessel was a\nNantucketer and shortly bound home, he loudly hailed  \"Ahoy there!\nThis is the Pequod, bound round the world! Tell them to address all\nfuture letters to the Pacific ocean! and this time three years, if I\nam not at home, tell them to address them to  \"\n\nAt that moment the two wakes were fairly crossed, and instantly, then,\nin accordance with their singular ways, shoals of small harmless fish,\nthat for some days before had been placidly swimming by our side,\ndarted away with what seemed shuddering fins, and ranged themselves\nfore and aft with the stranger's flanks. Though in the course of his\ncontinual voyagings Ahab must often before have noticed a similar\nsight, yet, to any monomaniac man, the veriest trifles capriciously\ncarry meanings.\n\n\"Swim away from me, do ye?\" murmured Ahab, gazing over into the\nwater. There seemed but little in the words, but the tone conveyed\nmore of deep helpless sadness than the insane old man had ever before\nevinced. But turning to the steersman, who thus far had been holding\nthe ship in the wind to diminish her headway, he cried out in his old\nlion voice,  \"Up helm! Keep her off round the world!\"\n\nRound the world! There is much in that sound to inspire proud\nfeelings; but whereto does all that circumnavigation conduct? Only\nthrough numberless perils to the very point whence we started, where\nthose that we left behind secure, were all the time before us.\n\nWere this world an endless plain, and by sailing eastward we could for\never reach new distances, and discover sights more sweet and strange\nthan any Cyclades or Islands of King Solomon, then there were promise\nin the voyage. But in pursuit of those far mysteries we dream of, or\nin tormented chase of that demon phantom that, some time or other,\nswims before all human hearts; while chasing such over this round\nglobe, they either lead us on in barren mazes or midway leave us\nwhelmed.\n\nCHAPTER 53 The Gam.\n\nThe ostensible reason why Ahab did not go on board of the whaler we\nhad spoken was this: the wind and sea betokened storms. But even had\nthis not been the case, he would not after all, perhaps, have boarded\nher  judging by his subsequent conduct on similar occasions  if\nso it had been that, by the process of hailing, he had obtained a\nnegative answer to the question he put. For, as it eventually turned\nout, he cared not to consort, even for five minutes, with any stranger\ncaptain, except he could contribute some of that information he so\nabsorbingly sought. But all this might remain inadequately estimated,\nwere not something said here of the peculiar usages of whaling-vessels\nwhen meeting each other in foreign seas, and especially on a common\ncruising-ground.\n\nIf two strangers crossing the Pine Barrens in New York State, or the\nequally desolate Salisbury Plain in England; if casually encountering\neach other in such inhospitable wilds, these twain, for the life of\nthem, cannot well avoid a mutual salutation; and stopping for a moment\nto interchange the news; and, perhaps, sitting down for a while and\nresting in concert: then, how much more natural that upon the\nillimitable Pine Barrens and Salisbury Plains of the sea, two whaling\nvessels descrying each other at the ends of the earth  off lone\nFanning's Island, or the far away King's Mills; how much more natural,\nI say, that under such circumstances these ships should not only\ninterchange hails, but come into still closer, more friendly and\nsociable contact. And especially would this seem to be a matter of\ncourse, in the case of vessels owned in one seaport, and whose\ncaptains, officers, and not a few of the men are personally known to\neach other; and consequently, have all sorts of dear domestic things\nto talk about.\n\nFor the long absent ship, the outward-bounder, perhaps, has letters on\nboard; at any rate, she will be sure to let her have some papers of a\ndate a year or two later than the last one on her blurred and\nthumb-worn files. And in return for that courtesy, the outward-bound\nship would receive the latest whaling intelligence from the\ncruising-ground to which she may be destined, a thing of the utmost\nimportance to her. And in degree, all this will hold true concerning\nwhaling vessels crossing each other's track on the cruising-ground\nitself, even though they are equally long absent from home. For one of\nthem may have received a transfer of letters from some third, and now\nfar remote vessel; and some of those letters may be for the people of\nthe ship she now meets. Besides, they would exchange the whaling news,\nand have an agreeable chat. For not only would they meet with all the\nsympathies of sailors, but likewise with all the peculiar\ncongenialities arising from a common pursuit and mutually shared\nprivations and perils.\n\nNor would difference of country make any very essential difference;\nthat is, so long as both parties speak one language, as is the case\nwith Americans and English. Though, to be sure, from the small number\nof English whalers, such meetings do not very often occur, and when\nthey do occur there is too apt to be a sort of shyness between them;\nfor your Englishman is rather reserved, and your Yankee, he does not\nfancy that sort of thing in anybody but himself. Besides, the English\nwhalers sometimes affect a kind of metropolitan superiority over the\nAmerican whalers; regarding the long, lean Nantucketer, with his\nnondescript provincialisms, as a sort of sea-peasant. But where this\nsuperiority in the English whalemen does really consist, it would be\nhard to say, seeing that the Yankees in one day, collectively, kill\nmore whales than all the English, collectively, in ten years. But this\nis a harmless little foible in the English whale-hunters, which the\nNantucketer does not take much to heart; probably, because he knows\nthat he has a few foibles himself.\n\nSo, then, we see that of all ships separately sailing the sea, the\nwhalers have most reason to be sociable  and they are so. Whereas,\nsome merchant ships crossing each other's wake in the mid-Atlantic,\nwill oftentimes pass on without so much as a single word of\nrecognition, mutually cutting each other on the high seas, like a\nbrace of dandies in Broadway; and all the time indulging, perhaps, in\nfinical criticism upon each other's rig. As for Men-of-War, when they\nchance to meet at sea, they first go through such a string of silly\nbowings and scrapings, such a ducking of ensigns, that there does not\nseem to be much right-down hearty good-will and brotherly love about\nit at all. As touching Slave-ships meeting, why, they are in such a\nprodigious hurry, they run away from each other as soon as\npossible. And as for Pirates, when they chance to cross each other's\ncross-bones, the first hail is  \"How many skulls?\"  the same way\nthat whalers hail  \"How many barrels?\" And that question once\nanswered, pirates straightway steer apart, for they are infernal\nvillains on both sides, and don't like to see overmuch of each other's\nvillanous likenesses.\n\nBut look at the godly, honest, unostentatious, hospitable, sociable,\nfree-and-easy whaler! What does the whaler do when she meets another\nwhaler in any sort of decent weather? She has a \"Gam,\" a thing so\nutterly unknown to all other ships that they never heard of the name\neven; and if by chance they should hear of it, they only grin at it,\nand repeat gamesome stuff about \"spouters\" and \"blubber-boilers,\" and\nsuch like pretty exclamations. Why it is that all Merchant-seamen, and\nalso all Pirates and Man-of-War's men, and Slave-ship sailors, cherish\nsuch a scornful feeling towards Whale-ships; this is a question it\nwould be hard to answer. Because, in the case of pirates, say, I\nshould like to know whether that profession of theirs has any peculiar\nglory about it. It sometimes ends in uncommon elevation, indeed; but\nonly at the gallows. And besides, when a man is elevated in that odd\nfashion, he has no proper foundation for his superior altitude. Hence,\nI conclude, that in boasting himself to be high lifted above a\nwhaleman, in that assertion the pirate has no solid basis to stand on.\n\nBut what is a Gam? You might wear out your index-finger running up and\ndown the columns of dictionaries, and never find the word. Dr. Johnson\nnever attained to that erudition; Noah Webster's ark does not hold\nit. Nevertheless, this same expressive word has now for many years\nbeen in constant use among some fifteen thousand true born\nYankees. Certainly, it needs a definition, and should be incorporated\ninto the Lexicon. With that view, let me learnedly define it.\n\nGAM. NOUN  A social meeting of two (or more) whaleships, generally\non a cruising-ground; when, after exchanging hails, they exchange\nvisits by boats' crews; the two captains remaining, for the time, on\nboard of one ship, and the two chief mates on the other.\n\nThere is another little item about Gamming which must not be forgotten\nhere. All professions have their own little peculiarities of detail;\nso has the whale fishery. In a pirate, man-of-war, or slave ship, when\nthe captain is rowed anywhere in his boat, he always sits in the stern\nsheets on a comfortable, sometimes cushioned seat there, and often\nsteers himself with a pretty little milliner's tiller decorated with\ngay cords and ribbons. But the whale-boat has no seat astern, no sofa\nof that sort whatever, and no tiller at all. High times indeed, if\nwhaling captains were wheeled about the water on castors like gouty\nold aldermen in patent chairs. And as for a tiller, the whale-boat\nnever admits of any such effeminacy; and therefore as in gamming a\ncomplete boat's crew must leave the ship, and hence as the boat\nsteerer or harpooneer is of the number, that subordinate is the\nsteersman upon the occasion, and the captain, having no place to sit\nin, is pulled off to his visit all standing like a pine tree. And\noften you will notice that being conscious of the eyes of the whole\nvisible world resting on him from the sides of the two ships, this\nstanding captain is all alive to the importance of sustaining his\ndignity by maintaining his legs. Nor is this any very easy matter; for\nin his rear is the immense projecting steering oar hitting him now and\nthen in the small of his back, the after-oar reciprocating by rapping\nhis knees in front. He is thus completely wedged before and behind,\nand can only expand himself sideways by settling down on his stretched\nlegs; but a sudden, violent pitch of the boat will often go far to\ntopple him, because length of foundation is nothing without\ncorresponding breadth. Merely make a spread angle of two poles, and\nyou cannot stand them up. Then, again, it would never do in plain\nsight of the world's riveted eyes, it would never do, I say, for this\nstraddling captain to be seen steadying himself the slightest particle\nby catching hold of anything with his hands; indeed, as token of his\nentire, buoyant self-command, he generally carries his hands in his\ntrowsers' pockets; but perhaps being generally very large, heavy\nhands, he carries them there for ballast. Nevertheless there have\noccurred instances, well authenticated ones too, where the captain has\nbeen known for an uncommonly critical moment or two, in a sudden\nsquall say  to seize hold of the nearest oarsman's hair, and hold\non there like grim death.\n\nCHAPTER 54 The Town-Ho's Story.\n\n(As told at the golden inn)\n\nThe Cape of Good Hope, and all the watery region round about there, is\nmuch like some noted four corners of a great highway, where you meet\nmore travellers than in any other part.\n\nIt was not very long after speaking the Goney that another\nhomeward-bound whaleman, the Town-Ho, was encountered. She was\nmanned almost wholly by Polynesians. In the short gam that ensued she\ngave us strong news of Moby Dick. To some the general interest in the\nWhite Whale was now wildly heightened by a circumstance of the\nTown-Ho's story, which seemed obscurely to involve with the whale a\ncertain wondrous, inverted visitation of one of those so called\njudgments of God which at times are said to overtake some men. This\nlatter circumstance, with its own particular accompaniments, forming\nwhat may be called the secret part of the tragedy about to be\nnarrated, never reached the ears of Captain Ahab or his mates. For\nthat secret part of the story was unknown to the captain of the\nTown-Ho himself. It was the private property of three confederate\nwhite seamen of that ship, one of whom, it seems, communicated it to\nTashtego with Romish injunctions of secrecy, but the following night\nTashtego rambled in his sleep, and revealed so much of it in that way,\nthat when he was wakened he could not well withhold the\nrest. Nevertheless, so potent an influence did this thing have on\nthose seamen in the Pequod who came to the full knowledge of it, and\nby such a strange delicacy, to call it so, were they governed in this\nmatter, that they kept the secret among themselves so that it never\ntranspired abaft the Pequod's main-mast. Interweaving in its proper\nplace this darker thread with the story as publicly narrated on the\nship, the whole of this strange affair I now proceed to put on lasting\nrecord.\n\nFor my humor's sake, I shall preserve the style in which I once\nnarrated it at Lima, to a lounging circle of my Spanish friends, one\nsaint's eve, smoking upon the thick-gilt tiled piazza of the Golden\nInn. Of those fine cavaliers, the young Dons, Pedro and Sebastian,\nwere on the closer terms with me; and hence the interluding questions\nthey occasionally put, and which are duly answered at the time.\n\n\"Some two years prior to my first learning the events which I am about\nrehearsing to you, gentlemen, the Town-Ho, Sperm Whaler of Nantucket,\nwas cruising in your Pacific here, not very many days' sail eastward\nfrom the eaves of this good Golden Inn. She was somewhere to the\nnorthward of the Line. One morning upon handling the pumps, according\nto daily usage, it was observed that she made more water in her hold\nthan common. They supposed a sword-fish had stabbed her,\ngentlemen. But the captain, having some unusual reason for believing\nthat rare good luck awaited him in those latitudes; and therefore\nbeing very averse to quit them, and the leak not being then considered\nat all dangerous, though, indeed, they could not find it after\nsearching the hold as low down as was possible in rather heavy\nweather, the ship still continued her cruisings, the mariners working\nat the pumps at wide and easy intervals; but no good luck came; more\ndays went by, and not only was the leak yet undiscovered, but it\nsensibly increased. So much so, that now taking some alarm, the\ncaptain, making all sail, stood away for the nearest harbor among the\nislands, there to have his hull hove out and repaired.\n\n\"Though no small passage was before her, yet, if the commonest chance\nfavoured, he did not at all fear that his ship would founder by the\nway, because his pumps were of the best, and being periodically\nrelieved at them, those six-and-thirty men of his could easily keep\nthe ship free; never mind if the leak should double on her. In truth,\nwell nigh the whole of this passage being attended by very prosperous\nbreezes, the Town-Ho had all but certainly arrived in perfect safety\nat her port without the occurrence of the least fatality, had it not\nbeen for the brutal overbearing of Radney, the mate, a Vineyarder, and\nthe bitterly provoked vengeance of Steelkilt, a Lakeman and desperado\nfrom Buffalo.\n\n\"'Lakeman!  Buffalo! Pray, what is a Lakeman, and where is\nBuffalo?' said Don Sebastian, rising in his swinging mat of grass.\n\n\"On the eastern shore of our Lake Erie, Don; but  I crave your\ncourtesy  may be, you shall soon hear further of all that. Now,\ngentlemen, in square-sail brigs and three-masted ships, well-nigh as\nlarge and stout as any that ever sailed out of your old Callao to far\nManilla; this Lakeman, in the land-locked heart of our America, had\nyet been nurtured by all those agrarian freebooting impressions\npopularly connected with the open ocean. For in their interflowing\naggregate, those grand fresh-water seas of ours,  Erie, and\nOntario, and Huron, and Superior, and Michigan,  possess an\nocean-like expansiveness, with many of the ocean's noblest traits;\nwith many of its rimmed varieties of races and of climes. They contain\nround archipelagoes of romantic isles, even as the Polynesian waters\ndo; in large part, are shored by two great contrasting nations, as the\nAtlantic is; they furnish long maritime approaches to our numerous\nterritorial colonies from the East, dotted all round their banks; here\nand there are frowned upon by batteries, and by the goat-like craggy\nguns of lofty Mackinaw; they have heard the fleet thunderings of naval\nvictories; at intervals, they yield their beaches to wild barbarians,\nwhose red painted faces flash from out their peltry wigwams; for\nleagues and leagues are flanked by ancient and unentered forests,\nwhere the gaunt pines stand like serried lines of kings in Gothic\ngenealogies; those same woods harboring wild Afric beasts of prey, and\nsilken creatures whose exported furs give robes to Tartar Emperors;\nthey mirror the paved capitals of Buffalo and Cleveland, as well as\nWinnebago villages; they float alike the full-rigged merchant ship,\nthe armed cruiser of the State, the steamer, and the beech canoe; they\nare swept by Borean and dismasting blasts as direful as any that lash\nthe salted wave; they know what shipwrecks are, for out of sight of\nland, however inland, they have drowned full many a midnight ship with\nall its shrieking crew. Thus, gentlemen, though an inlander, Steelkilt\nwas wild-ocean born, and wild-ocean nurtured; as much of an audacious\nmariner as any. And for Radney, though in his infancy he may have laid\nhim down on the lone Nantucket beach, to nurse at his maternal sea;\nthough in after life he had long followed our austere Atlantic and\nyour contemplative Pacific; yet was he quite as vengeful and full of\nsocial quarrel as the backwoods seaman, fresh from the latitudes of\nbuck-horn handled bowie-knives. Yet was this Nantucketer a man with\nsome good-hearted traits; and this Lakeman, a mariner, who though a\nsort of devil indeed, might yet by inflexible firmness, only tempered\nby that common decency of human recognition which is the meanest\nslave's right; thus treated, this Steelkilt had long been retained\nharmless and docile. At all events, he had proved so thus far; but\nRadney was doomed and made mad, and Steelkilt  but, gentlemen, you\nshall hear.\n\n\"It was not more than a day or two at the furthest after pointing her\nprow for her island haven, that the Town-Ho's leak seemed again\nincreasing, but only so as to require an hour or more at the pumps\nevery day. You must know that in a settled and civilized ocean like\nour Atlantic, for example, some skippers think little of pumping their\nwhole way across it; though of a still, sleepy night, should the\nofficer of the deck happen to forget his duty in that respect, the\nprobability would be that he and his shipmates would never again\nremember it, on account of all hands gently subsiding to the\nbottom. Nor in the solitary and savage seas far from you to the\nwestward, gentlemen, is it altogether unusual for ships to keep\nclanging at their pump-handles in full chorus even for a voyage of\nconsiderable length; that is, if it lie along a tolerably accessible\ncoast, or if any other reasonable retreat is afforded them. It is only\nwhen a leaky vessel is in some very out of the way part of those\nwaters, some really landless latitude, that her captain begins to feel\na little anxious.\n\n\"Much this way had it been with the Town-Ho; so when her leak was\nfound gaining once more, there was in truth some small concern\nmanifested by several of her company; especially by Radney the\nmate. He commanded the upper sails to be well hoisted, sheeted home\nanew, and every way expanded to the breeze. Now this Radney, I\nsuppose, was as little of a coward, and as little inclined to any sort\nof nervous apprehensiveness touching his own person as any fearless,\nunthinking creature on land or on sea that you can conveniently\nimagine, gentlemen. Therefore when he betrayed this solicitude about\nthe safety of the ship, some of the seamen declared that it was only\non account of his being a part owner in her. So when they were working\nthat evening at the pumps, there was on this head no small\ngamesomeness slily going on among them, as they stood with their feet\ncontinually overflowed by the rippling clear water; clear as any\nmountain spring, gentlemen  that bubbling from the pumps ran across\nthe deck, and poured itself out in steady spouts at the lee\nscupper-holes.\n\n\"Now, as you well know, it is not seldom the case in this conventional\nworld of ours  watery or otherwise; that when a person placed in\ncommand over his fellow-men finds one of them to be very significantly\nhis superior in general pride of manhood, straightway against that man\nhe conceives an unconquerable dislike and bitterness; and if he have a\nchance he will pull down and pulverize that subaltern's tower, and\nmake a little heap of dust of it. Be this conceit of mine as it may,\ngentlemen, at all events Steelkilt was a tall and noble animal with a\nhead like a Roman, and a flowing golden beard like the tasseled\nhousings of your last viceroy's snorting charger; and a brain, and a\nheart, and a soul in him, gentlemen, which had made Steelkilt\nCharlemagne, had he been born son to Charlemagne's father. But Radney,\nthe mate, was ugly as a mule; yet as hardy, as stubborn, as\nmalicious. He did not love Steelkilt, and Steelkilt knew it.\n\n\"Espying the mate drawing near as he was toiling at the pump with the\nrest, the Lakeman affected not to notice him, but unawed, went on with\nhis gay banterings.\n\n\"'Aye, aye, my merry lads, it's a lively leak this; hold a cannikin,\none of ye, and let's have a taste. By the Lord, it's worth bottling! I\ntell ye what, men, old Rad's investment must go for it! he had best\ncut away his part of the hull and tow it home. The fact is, boys, that\nsword-fish only began the job; he's come back again with a gang of\nship-carpenters, saw-fish, and file-fish, and what not; and the whole\nposse of 'em are now hard at work cutting and slashing at the bottom;\nmaking improvements, I suppose. If old Rad were here now, I'd tell him\nto jump overboard and scatter 'em. They're playing the devil with his\nestate, I can tell him. But he's a simple old soul,  Rad, and a\nbeauty too. Boys, they say the rest of his property is invested in\nlooking-glasses. I wonder if he'd give a poor devil like me the model\nof his nose.'\n\n\"'Damn your eyes! what's that pump stopping for?' roared Radney,\npretending not to have heard the sailors' talk. 'Thunder away at it!'\n\n'Aye, aye, sir,' said Steelkilt, merry as a cricket. 'Lively, boys,\nlively, now!' And with that the pump clanged like fifty fire-engines;\nthe men tossed their hats off to it, and ere long that peculiar\ngasping of the lungs was heard which denotes the fullest tension of\nlife's utmost energies.\n\n\"Quitting the pump at last, with the rest of his band, the Lakeman\nwent forward all panting, and sat himself down on the windlass; his\nface fiery red, his eyes bloodshot, and wiping the profuse sweat from\nhis brow. Now what cozening fiend it was, gentlemen, that possessed\nRadney to meddle with such a man in that corporeally exasperated\nstate, I know not; but so it happened. Intolerably striding along the\ndeck, the mate commanded him to get a broom and sweep down the planks,\nand also a shovel, and remove some offensive matters consequent upon\nallowing a pig to run at large.\n\n\"Now, gentlemen, sweeping a ship's deck at sea is a piece of household\nwork which in all times but raging gales is regularly attended to\nevery evening; it has been known to be done in the case of ships\nactually foundering at the time. Such, gentlemen, is the inflexibility\nof sea-usages and the instinctive love of neatness in seamen; some of\nwhom would not willingly drown without first washing their faces. But\nin all vessels this broom business is the prescriptive province of the\nboys, if boys there be aboard. Besides, it was the stronger men in the\nTown-Ho that had been divided into gangs, taking turns at the pumps;\nand being the most athletic seaman of them all, Steelkilt had been\nregularly assigned captain of one of the gangs; consequently he should\nhave been freed from any trivial business not connected with truly\nnautical duties, such being the case with his comrades. I mention all\nthese particulars so that you may understand exactly how this affair\nstood between the two men.\n\n\"But there was more than this: the order about the shovel was almost\nas plainly meant to sting and insult Steelkilt, as though Radney had\nspat in his face. Any man who has gone sailor in a whale-ship will\nunderstand this; and all this and doubtless much more, the Lakeman\nfully comprehended when the mate uttered his command. But as he sat\nstill for a moment, and as he steadfastly looked into the mate's\nmalignant eye and perceived the stacks of powder-casks heaped up in\nhim and the slow-match silently burning along towards them; as he\ninstinctively saw all this, that strange forbearance and unwillingness\nto stir up the deeper passionateness in any already ireful being  a\nrepugnance most felt, when felt at all, by really valiant men even\nwhen aggrieved  this nameless phantom feeling, gentlemen, stole\nover Steelkilt.\n\n\"Therefore, in his ordinary tone, only a little broken by the bodily\nexhaustion he was temporarily in, he answered him saying that sweeping\nthe deck was not his business, and he would not do it. And then,\nwithout at all alluding to the shovel, he pointed to three lads as the\ncustomary sweepers; who, not being billeted at the pumps, had done\nlittle or nothing all day. To this, Radney replied with an oath, in a\nmost domineering and outrageous manner unconditionally reiterating his\ncommand; meanwhile advancing upon the still seated Lakeman, with an\nuplifted cooper's club hammer which he had snatched from a cask near\nby.\n\n\"Heated and irritated as he was by his spasmodic toil at the pumps,\nfor all his first nameless feeling of forbearance the sweating\nSteelkilt could but ill brook this bearing in the mate; but somehow\nstill smothering the conflagration within him, without speaking he\nremained doggedly rooted to his seat, till at last the incensed Radney\nshook the hammer within a few inches of his face, furiously commanding\nhim to do his bidding.\n\n\"Steelkilt rose, and slowly retreating round the windlass, steadily\nfollowed by the mate with his menacing hammer, deliberately repeated\nhis intention not to obey. Seeing, however, that his forbearance had\nnot the slightest effect, by an awful and unspeakable intimation with\nhis twisted hand he warned off the foolish and infatuated man; but it\nwas to no purpose. And in this way the two went once slowly round the\nwindlass; when, resolved at last no longer to retreat, bethinking him\nthat he had now forborne as much as comported with his humor, the\nLakeman paused on the hatches and thus spoke to the officer:\n\n\"'Mr. Radney, I will not obey you. Take that hammer away, or look to\nyourself.' But the predestinated mate coming still closer to him,\nwhere the Lakeman stood fixed, now shook the heavy hammer within an\ninch of his teeth; meanwhile repeating a string of insufferable\nmaledictions. Retreating not the thousandth part of an inch; stabbing\nhim in the eye with the unflinching poniard of his glance, Steelkilt,\nclenching his right hand behind him and creepingly drawing it back,\ntold his persecutor that if the hammer but grazed his cheek he\n(Steelkilt) would murder him. But, gentlemen, the fool had been\nbranded for the slaughter by the gods. Immediately the hammer touched\nthe cheek; the next instant the lower jaw of the mate was stove in his\nhead; he fell on the hatch spouting blood like a whale.\n\n\"Ere the cry could go aft Steelkilt was shaking one of the backstays\nleading far aloft to where two of his comrades were standing their\nmastheads. They were both Canallers.\n\n\"'Canallers!' cried Don Pedro. 'We have seen many whale-ships in our\nharbours, but never heard of your Canallers. Pardon: who and what are\nthey?'\n\n\"'Canallers, Don, are the boatmen belonging to our grand Erie\nCanal. You must have heard of it.'\n\n\"'Nay, Senor; hereabouts in this dull, warm, most lazy, and hereditary\nland, we know but little of your vigorous North.'\n\n\"'Aye? Well then, Don, refill my cup. Your chicha's very fine; and ere\nproceeding further I will tell ye what our Canallers are; for such\ninformation may throw side-light upon my story.'\n\n\"For three hundred and sixty miles, gentlemen, through the entire\nbreadth of the state of New York; through numerous populous cities and\nmost thriving villages; through long, dismal, uninhabited swamps, and\naffluent, cultivated fields, unrivalled for fertility; by\nbilliard-room and bar-room; through the holy-of-holies of great\nforests; on Roman arches over Indian rivers; through sun and shade; by\nhappy hearts or broken; through all the wide contrasting scenery of\nthose noble Mohawk counties; and especially, by rows of snow-white\nchapels, whose spires stand almost like milestones, flows one\ncontinual stream of Venetianly corrupt and often lawless life. There's\nyour true Ashantee, gentlemen; there howl your pagans; where you ever\nfind them, next door to you; under the long-flung shadow, and the snug\npatronising lee of churches. For by some curious fatality, as it is\noften noted of your metropolitan freebooters that they ever encamp\naround the halls of justice, so sinners, gentlemen, most abound in\nholiest vicinities.\n\n\"'Is that a friar passing?' said Don Pedro, looking downwards into the\ncrowded plazza, with humorous concern.\n\n\"'Well for our northern friend, Dame Isabella's Inquisition wanes in\nLima,' laughed Don Sebastian. 'Proceed, Senor.'\n\n\"'A moment! Pardon!' cried another of the company. 'In the name of all\nus Limeese, I but desire to express to you, sir sailor, that we have\nby no means overlooked your delicacy in not substituting present Lima\nfor distant Venice in your corrupt comparison. Oh! do not bow and look\nsurprised; you know the proverb all along this coast  \"Corrupt as\nLima.\" It but bears out your saying, too; churches more plentiful than\nbilliard-tables, and for ever open  and \"Corrupt as Lima.\" So, too,\nVenice; I have been there; the holy city of the blessed evangelist,\nSt. Mark!  St. Dominic, purge it! Your cup! Thanks: here I refill;\nnow, you pour out again.'\n\n\"Freely depicted in his own vocation, gentlemen, the Canaller would\nmake a fine dramatic hero, so abundantly and picturesquely wicked is\nhe. Like Mark Antony, for days and days along his green-turfed,\nflowery Nile, he indolently floats, openly toying with his red-cheeked\nCleopatra, ripening his apricot thigh upon the sunny deck. But ashore,\nall this effeminacy is dashed. The brigandish guise which the Canaller\nso proudly sports; his slouched and gaily-ribboned hat betoken his\ngrand features. A terror to the smiling innocence of the villages\nthrough which he floats; his swart visage and bold swagger are not\nunshunned in cities. Once a vagabond on his own canal, I have received\ngood turns from one of these Canallers; I thank him heartily; would\nfain be not ungrateful; but it is often one of the prime redeeming\nqualities of your man of violence, that at times he has as stiff an\narm to back a poor stranger in a strait, as to plunder a wealthy\none. In sum, gentlemen, what the wildness of this canal life is, is\nemphatically evinced by this; that our wild whale-fishery contains so\nmany of its most finished graduates, and that scarce any race of\nmankind, except Sydney men, are so much distrusted by our whaling\ncaptains. Nor does it at all diminish the curiousness of this matter,\nthat to many thousands of our rural boys and young men born along its\nline, the probationary life of the Grand Canal furnishes the sole\ntransition between quietly reaping in a Christian corn-field, and\nrecklessly ploughing the waters of the most barbaric seas.\n\n\"'I see! I see!' impetuously exclaimed Don Pedro, spilling his chicha\nupon his silvery ruffles. 'No need to travel! The world's one Lima. I\nhad thought, now, that at your temperate North the generations were\ncold and holy as the hills.  But the story.'\n\n\"I left off, gentlemen, where the Lakeman shook the backstay. Hardly\nhad he done so, when he was surrounded by the three junior mates and\nthe four harpooneers, who all crowded him to the deck. But sliding\ndown the ropes like baleful comets, the two Canallers rushed into the\nuproar, and sought to drag their man out of it towards the\nforecastle. Others of the sailors joined with them in this attempt,\nand a twisted turmoil ensued; while standing out of harm's way, the\nvaliant captain danced up and down with a whale-pike, calling upon his\nofficers to manhandle that atrocious scoundrel, and smoke him along to\nthe quarter-deck. At intervals, he ran close up to the revolving\nborder of the confusion, and prying into the heart of it with his\npike, sought to prick out the object of his resentment. But Steelkilt\nand his desperadoes were too much for them all; they succeeded in\ngaining the forecastle deck, where, hastily slewing about three or\nfour large casks in a line with the windlass, these sea-Parisians\nentrenched themselves behind the barricade.\n\n\"'Come out of that, ye pirates!' roared the captain, now menacing them\nwith a pistol in each hand, just brought to him by the steward. 'Come\nout of that, ye cut-throats!'\n\n\"Steelkilt leaped on the barricade, and striding up and down there,\ndefied the worst the pistols could do; but gave the captain to\nunderstand distinctly, that his (Steelkilt's) death would be the\nsignal for a murderous mutiny on the part of all hands. Fearing in his\nheart lest this might prove but too true, the captain a little\ndesisted, but still commanded the insurgents instantly to return to\ntheir duty.\n\n\"'Will you promise not to touch us, if we do?' demanded their\nringleader.\n\n\"'Turn to! turn to!  I make no promise;  to your duty! Do you\nwant to sink the ship, by knocking off at a time like this? Turn to!'\nand he once more raised a pistol.\n\n\"'Sink the ship?' cried Steelkilt. 'Aye, let her sink. Not a man of us\nturns to, unless you swear not to raise a rope-yarn against us. What\nsay ye, men?' turning to his comrades. A fierce cheer was their\nresponse.\n\n\"The Lakeman now patrolled the barricade, all the while keeping his\neye on the Captain, and jerking out such sentences as these:  'It's\nnot our fault; we didn't want it; I told him to take his hammer away;\nit was boy's business; he might have known me before this; I told him\nnot to prick the buffalo; I believe I have broken a finger here\nagainst his cursed jaw; ain't those mincing knives down in the\nforecastle there, men? look to those handspikes, my hearties. Captain,\nby God, look to yourself; say the word; don't be a fool; forget it\nall; we are ready to turn to; treat us decently, and we're your men;\nbut we won't be flogged.'\n\n\"'Turn to! I make no promises, turn to, I say!'\n\n\"'Look ye, now,' cried the Lakeman, flinging out his arm towards him,\n'there are a few of us here (and I am one of them) who have shipped\nfor the cruise, d'ye see; now as you well know, sir, we can claim our\ndischarge as soon as the anchor is down; so we don't want a row; it's\nnot our interest; we want to be peaceable; we are ready to work, but\nwe won't be flogged.'\n\n\"'Turn to!' roared the Captain.\n\n\"Steelkilt glanced round him a moment, and then said:  'I tell you\nwhat it is now, Captain, rather than kill ye, and be hung for such a\nshabby rascal, we won't lift a hand against ye unless ye attack us;\nbut till you say the word about not flogging us, we don't do a hand's\nturn.'\n\n\"'Down into the forecastle then, down with ye, I'll keep ye there till\nye're sick of it. Down ye go.'\n\n\"'Shall we?' cried the ringleader to his men. Most of them were\nagainst it; but at length, in obedience to Steelkilt, they preceded\nhim down into their dark den, growlingly disappearing, like bears into\na cave.\n\n\"As the Lakeman's bare head was just level with the planks, the\nCaptain and his posse leaped the barricade, and rapidly drawing over\nthe slide of the scuttle, planted their group of hands upon it, and\nloudly called for the steward to bring the heavy brass padlock\nbelonging to the companionway.\n\nThen opening the slide a little, the Captain whispered something down\nthe crack, closed it, and turned the key upon them  ten in number\n leaving on deck some twenty or more, who thus far had remained\nneutral.\n\n\"All night a wide-awake watch was kept by all the officers, forward\nand aft, especially about the forecastle scuttle and fore hatchway; at\nwhich last place it was feared the insurgents might emerge, after\nbreaking through the bulkhead below. But the hours of darkness passed\nin peace; the men who still remained at their duty toiling hard at the\npumps, whose clinking and clanking at intervals through the dreary\nnight dismally resounded through the ship.\n\n\"At sunrise the Captain went forward, and knocking on the deck,\nsummoned the prisoners to work; but with a yell they refused. Water\nwas then lowered down to them, and a couple of handfuls of biscuit\nwere tossed after it; when again turning the key upon them and\npocketing it, the Captain returned to the quarter-deck. Twice every\nday for three days this was repeated; but on the fourth morning a\nconfused wrangling, and then a scuffling was heard, as the customary\nsummons was delivered; and suddenly four men burst up from the\nforecastle, saying they were ready to turn to. The fetid closeness of\nthe air, and a famishing diet, united perhaps to some fears of\nultimate retribution, had constrained them to surrender at\ndiscretion. Emboldened by this, the Captain reiterated his demand to\nthe rest, but Steelkilt shouted up to him a terrific hint to stop his\nbabbling and betake himself where he belonged. On the fifth morning\nthree others of the mutineers bolted up into the air from the\ndesperate arms below that sought to restrain them. Only three were\nleft.\n\n\"'Better turn to, now?' said the Captain with a heartless jeer.\n\n\"'Shut us up again, will ye!' cried Steelkilt.\n\n\"'Oh certainly,' the Captain, and the key clicked.\n\n\"It was at this point, gentlemen, that enraged by the defection of\nseven of his former associates, and stung by the mocking voice that\nhad last hailed him, and maddened by his long entombment in a place as\nblack as the bowels of despair; it was then that Steelkilt proposed to\nthe two Canallers, thus far apparently of one mind with him, to burst\nout of their hole at the next summoning of the garrison; and armed\nwith their keen mincing knives (long, crescentic, heavy implements\nwith a handle at each end) run amuck from the bowsprit to the\ntaffrail; and if by any devilishness of desperation possible, seize\nthe ship. For himself, he would do this, he said, whether they joined\nhim or not. That was the last night he should spend in that den. But\nthe scheme met with no opposition on the part of the other two; they\nswore they were ready for that, or for any other mad thing, for\nanything in short but a surrender. And what was more, they each\ninsisted upon being the first man on deck, when the time to make the\nrush should come. But to this their leader as fiercely objected,\nreserving that priority for himself; particularly as his two comrades\nwould not yield, the one to the other, in the matter; and both of them\ncould not be first, for the ladder would but admit one man at a\ntime. And here, gentlemen, the foul play of these miscreants must come\nout.\n\n\"Upon hearing the frantic project of their leader, each in his own\nseparate soul had suddenly lighted, it would seem, upon the same piece\nof treachery, namely: to be foremost in breaking out, in order to be\nthe first of the three, though the last of the ten, to surrender; and\nthereby secure whatever small chance of pardon such conduct might\nmerit. But when Steelkilt made known his determination still to lead\nthem to the last, they in some way, by some subtle chemistry of\nvillany, mixed their before secret treacheries together; and when\ntheir leader fell into a doze, verbally opened their souls to each\nother in three sentences; and bound the sleeper with cords, and gagged\nhim with cords; and shrieked out for the Captain at midnight.\n\n\"Thinking murder at hand, and smelling in the dark for the blood, he\nand all his armed mates and harpooneers rushed for the forecastle. In\na few minutes the scuttle was opened, and, bound hand and foot, the\nstill struggling ringleader was shoved up into the air by his\nperfidious allies, who at once claimed the honour of securing a man\nwho had been fully ripe for murder. But all these were collared, and\ndragged along the deck like dead cattle; and, side by side, were\nseized up into the mizzen rigging, like three quarters of meat, and\nthere they hung till morning. 'Damn ye,' cried the Captain, pacing to\nand fro before them, 'the vultures would not touch ye, ye villains!'\n\n\"At sunrise he summoned all hands; and separating those who had\nrebelled from those who had taken no part in the mutiny, he told the\nformer that he had a good mind to flog them all round  thought,\nupon the whole, he would do so  he ought to  justice demanded\nit; but for the present, considering their timely surrender, he would\nlet them go with a reprimand, which he accordingly administered in the\nvernacular.\n\n\"'But as for you, ye carrion rogues,' turning to the three men in the\nrigging  'for you, I mean to mince ye up for the try-pots;' and,\nseizing a rope, he applied it with all his might to the backs of the\ntwo traitors, till they yelled no more, but lifelessly hung their\nheads sideways, as the two crucified thieves are drawn.\n\n\"'My wrist is sprained with ye!' he cried, at last; 'but there is\nstill rope enough left for you, my fine bantam, that wouldn't give\nup. Take that gag from his mouth, and let us hear what he can say for\nhimself.'\n\n\"For a moment the exhausted mutineer made a tremulous motion of his\ncramped jaws, and then painfully twisting round his head, said in a\nsort of hiss, 'What I say is this  and mind it well  if you flog\nme, I murder you!'\n\n\"'Say ye so? then see how ye frighten me'  and the Captain drew off\nwith the rope to strike.\n\n\"'Best not,' hissed the Lakeman.\n\n\"'But I must,'  and the rope was once more drawn back for the\nstroke.\n\n\"Steelkilt here hissed out something, inaudible to all but the\nCaptain; who, to the amazement of all hands, started back, paced the\ndeck rapidly two or three times, and then suddenly throwing down his\nrope, said, 'I won't do it  let him go  cut him down: d'ye\nhear?'\n\nBut as the junior mates were hurrying to execute the order, a pale\nman, with a bandaged head, arrested them  Radney the chief\nmate. Ever since the blow, he had lain in his berth; but that morning,\nhearing the tumult on the deck, he had crept out, and thus far had\nwatched the whole scene. Such was the state of his mouth, that he\ncould hardly speak; but mumbling something about his being willing and\nable to do what the captain dared not attempt, he snatched the rope\nand advanced to his pinioned foe.\n\n\"'You are a coward!' hissed the Lakeman.\n\n\"'So I am, but take that.' The mate was in the very act of striking,\nwhen another hiss stayed his uplifted arm. He paused: and then pausing\nno more, made good his word, spite of Steelkilt's threat, whatever\nthat might have been. The three men were then cut down, all hands were\nturned to, and, sullenly worked by the moody seamen, the iron pumps\nclanged as before.\n\n\"Just after dark that day, when one watch had retired below, a clamor\nwas heard in the forecastle; and the two trembling traitors running\nup, besieged the cabin door, saying they durst not consort with the\ncrew. Entreaties, cuffs, and kicks could not drive them back, so at\ntheir own instance they were put down in the ship's run for\nsalvation. Still, no sign of mutiny reappeared among the rest. On the\ncontrary, it seemed, that mainly at Steelkilt's instigation, they had\nresolved to maintain the strictest peacefulness, obey all orders to\nthe last, and, when the ship reached port, desert her in a body. But\nin order to insure the speediest end to the voyage, they all agreed to\nanother thing  namely, not to sing out for whales, in case any\nshould be discovered. For, spite of her leak, and spite of all her\nother perils, the Town-Ho still maintained her mast-heads, and her\ncaptain was just as willing to lower for a fish that moment, as on the\nday his craft first struck the cruising ground; and Radney the mate\nwas quite as ready to change his berth for a boat, and with his\nbandaged mouth seek to gag in death the vital jaw of the whale.\n\n\"But though the Lakeman had induced the seamen to adopt this sort of\npassiveness in their conduct, he kept his own counsel (at least till\nall was over) concerning his own proper and private revenge upon the\nman who had stung him in the ventricles of his heart. He was in Radney\nthe chief mate's watch; and as if the infatuated man sought to run\nmore than half way to meet his doom, after the scene at the rigging,\nhe insisted, against the express counsel of the captain, upon resuming\nthe head of his watch at night. Upon this, and one or two other\ncircumstances, Steelkilt systematically built the plan of his revenge.\n\n\"During the night, Radney had an unseamanlike way of sitting on the\nbulwarks of the quarter-deck, and leaning his arm upon the gunwale of\nthe boat which was hoisted up there, a little above the ship's\nside. In this attitude, it was well known, he sometimes dozed. There\nwas a considerable vacancy between the boat and the ship, and down\nbetween this was the sea. Steelkilt calculated his time, and found\nthat his next trick at the helm would come round at two o'clock, in\nthe morning of the third day from that in which he had been\nbetrayed. At his leisure, he employed the interval in braiding\nsomething very carefully in his watches below.\n\n\"'What are you making there?' said a shipmate.\n\n\"'What do you think? what does it look like?'\n\n\"'Like a lanyard for your bag; but it's an odd one, seems to me.'\n\n'Yes, rather oddish,' said the Lakeman, holding it at arm's length\nbefore him; 'but I think it will answer. Shipmate, I haven't enough\ntwine,  have you any?'\n\n\"But there was none in the forecastle.\n\n\"'Then I must get some from old Rad;' and he rose to go aft.\n\n\"'You don't mean to go a begging to him!' said a sailor.\n\n\"'Why not? Do you think he won't do me a turn, when it's to help\nhimself in the end, shipmate?' and going to the mate, he looked at him\nquietly, and asked him for some twine to mend his hammock. It was\ngiven him  neither twine nor lanyard were seen again; but the next\nnight an iron ball, closely netted, partly rolled from the pocket of\nthe Lakeman's monkey jacket, as he was tucking the coat into his\nhammock for a pillow. Twenty-four hours after, his trick at the silent\nhelm  nigh to the man who was apt to doze over the grave always\nready dug to the seaman's hand  that fatal hour was then to come;\nand in the fore-ordaining soul of Steelkilt, the mate was already\nstark and stretched as a corpse, with his forehead crushed in.\n\n\"But, gentlemen, a fool saved the would-be murderer from the bloody\ndeed he had planned. Yet complete revenge he had, and without being\nthe avenger. For by a mysterious fatality, Heaven itself seemed to\nstep in to take out of his hands into its own the damning thing he\nwould have done.\n\n\"It was just between daybreak and sunrise of the morning of the second\nday, when they were washing down the decks, that a stupid Teneriffe\nman, drawing water in the main-chains, all at once shouted out, 'There\nshe rolls! there she rolls!' Jesu, what a whale! It was Moby Dick.\n\n\"'Moby Dick!' cried Don Sebastian; 'St. Dominic! Sir sailor, but do\nwhales have christenings? Whom call you Moby Dick?'\n\n\"'A very white, and famous, and most deadly immortal monster, Don; \nbut that would be too long a story.'\n\n\"'How? how?' cried all the young Spaniards, crowding.\n\n\"'Nay, Dons, Dons  nay, nay! I cannot rehearse that now. Let me get\nmore into the air, Sirs.'\n\n\"'The chicha! the chicha!' cried Don Pedro; 'our vigorous friend looks\nfaint;  fill up his empty glass!'\n\n\"No need, gentlemen; one moment, and I proceed.  Now, gentlemen, so\nsuddenly perceiving the snowy whale within fifty yards of the ship \nforgetful of the compact among the crew  in the excitement of the\nmoment, the Teneriffe man had instinctively and involuntarily lifted\nhis voice for the monster, though for some little time past it had\nbeen plainly beheld from the three sullen mast-heads. All was now a\nphrensy. 'The White Whale  the White Whale!' was the cry from\ncaptain, mates, and harpooneers, who, undeterred by fearful rumours,\nwere all anxious to capture so famous and precious a fish; while the\ndogged crew eyed askance, and with curses, the appalling beauty of the\nvast milky mass, that lit up by a horizontal spangling sun, shifted\nand glistened like a living opal in the blue morning sea. Gentlemen, a\nstrange fatality pervades the whole career of these events, as if\nverily mapped out before the world itself was charted. The mutineer\nwas the bowsman of the mate, and when fast to a fish, it was his duty\nto sit next him, while Radney stood up with his lance in the prow, and\nhaul in or slacken the line, at the word of command. Moreover, when\nthe four boats were lowered, the mate's got the start; and none howled\nmore fiercely with delight than did Steelkilt, as he strained at his\noar. After a stiff pull, their harpooneer got fast, and, spear in\nhand, Radney sprang to the bow. He was always a furious man, it seems,\nin a boat. And now his bandaged cry was, to beach him on the whale's\ntopmost back. Nothing loath, his bowsman hauled him up and up, through\na blinding foam that blent two whitenesses together; till of a sudden\nthe boat struck as against a sunken ledge, and keeling over, spilled\nout the standing mate. That instant, as he fell on the whale's\nslippery back, the boat righted, and was dashed aside by the swell,\nwhile Radney was tossed over into the sea, on the other flank of the\nwhale. He struck out through the spray, and, for an instant, was dimly\nseen through that veil, wildly seeking to remove himself from the eye\nof Moby Dick. But the whale rushed round in a sudden maelstrom; seized\nthe swimmer between his jaws; and rearing high up with him, plunged\nheadlong again, and went down.\n\n\"Meantime, at the first tap of the boat's bottom, the Lakeman had\nslackened the line, so as to drop astern from the whirlpool; calmly\nlooking on, he thought his own thoughts. But a sudden, terrific,\ndownward jerking of the boat, quickly brought his knife to the\nline. He cut it; and the whale was free. But, at some distance, Moby\nDick rose again, with some tatters of Radney's red woollen shirt,\ncaught in the teeth that had destroyed him. All four boats gave chase\nagain; but the whale eluded them, and finally wholly disappeared.\n\n\"In good time, the Town-Ho reached her port  a savage, solitary\nplace  where no civilized creature resided. There, headed by the\nLakeman, all but five or six of the foremastmen deliberately deserted\namong the palms; eventually, as it turned out, seizing a large double\nwar-canoe of the savages, and setting sail for some other harbor.\n\n\"The ship's company being reduced to but a handful, the captain called\nupon the Islanders to assist him in the laborious business of heaving\ndown the ship to stop the leak. But to such unresting vigilance over\ntheir dangerous allies was this small band of whites necessitated,\nboth by night and by day, and so extreme was the hard work they\nunderwent, that upon the vessel being ready again for sea, they were\nin such a weakened condition that the captain durst not put off with\nthem in so heavy a vessel. After taking counsel with his officers, he\nanchored the ship as far off shore as possible; loaded and ran out his\ntwo cannon from the bows; stacked his muskets on the poop; and warning\nthe Islanders not to approach the ship at their peril, took one man\nwith him, and setting the sail of his best whale-boat, steered\nstraight before the wind for Tahiti, five hundred miles distant, to\nprocure a reinforcement to his crew.\n\n\"On the fourth day of the sail, a large canoe was descried, which\nseemed to have touched at a low isle of corals. He steered away from\nit; but the savage craft bore down on him; and soon the voice of\nSteelkilt hailed him to heave to, or he would run him under water. The\ncaptain presented a pistol. With one foot on each prow of the yoked\nwar-canoes, the Lakeman laughed him to scorn; assuring him that if the\npistol so much as clicked in the lock, he would bury him in bubbles\nand foam.\n\n\"'What do you want of me?' cried the captain.\n\n\"'Where are you bound? and for what are you bound?' demanded\nSteelkilt; 'no lies.'\n\n\"'I am bound to Tahiti for more men.'\n\n\"'Very good. Let me board you a moment  I come in peace.' With that\nhe leaped from the canoe, swam to the boat; and climbing the gunwale,\nstood face to face with the captain.\n\n\"'Cross your arms, sir; throw back your head. Now, repeat after me. As\nsoon as Steelkilt leaves me, I swear to beach this boat on yonder\nisland, and remain there six days. If I do not, may lightning strike\nme!'\n\n\"'A pretty scholar,' laughed the Lakeman. 'Adios, Senor!' and leaping\ninto the sea, he swam back to his comrades.\n\n\"Watching the boat till it was fairly beached, and drawn up to the\nroots of the cocoa-nut trees, Steelkilt made sail again, and in due\ntime arrived at Tahiti, his own place of destination. There, luck\nbefriended him; two ships were about to sail for France, and were\nprovidentially in want of precisely that number of men which the\nsailor headed. They embarked; and so for ever got the start of their\nformer captain, had he been at all minded to work them legal\nretribution.\n\n\"Some ten days after the French ships sailed, the whale-boat arrived,\nand the captain was forced to enlist some of the more civilized\nTahitians, who had been somewhat used to the sea. Chartering a small\nnative schooner, he returned with them to his vessel; and finding all\nright there, again resumed his cruisings.\n\n\"Where Steelkilt now is, gentlemen, none know; but upon the island of\nNantucket, the widow of Radney still turns to the sea which refuses to\ngive up its dead; still in dreams sees the awful white whale that\ndestroyed him.\n\n\"'Are you through?' said Don Sebastian, quietly.\n\n\"'I am, Don.'\n\n\"'Then I entreat you, tell me if to the best of your own convictions,\nthis your story is in substance really true? It is so passing\nwonderful! Did you get it from an unquestionable source? Bear with me\nif I seem to press.'\n\n\"'Also bear with all of us, sir sailor; for we all join in Don\nSebastian's suit,' cried the company, with exceeding interest.\n\n\"'Is there a copy of the Holy Evangelists in the Golden Inn,\ngentlemen?'\n\n\"'Nay,' said Don Sebastian; 'but I know a worthy priest near by, who\nwill quickly procure one for me. I go for it; but are you well\nadvised? this may grow too serious.'\n\n\"'Will you be so good as to bring the priest also, Don?'\n\n\"'Though there are no Auto-da-Fe's in Lima now,' said one of the\ncompany to another; 'I fear our sailor friend runs risk of the\narchiepiscopacy. Let us withdraw more out of the moonlight. I see no\nneed of this.'\n\n\"'Excuse me for running after you, Don Sebastian; but may I also beg\nthat you will be particular in procuring the largest sized Evangelists\nyou can.'\n\n'This is the priest, he brings you the Evangelists,' said Don\nSebastian, gravely, returning with a tall and solemn figure.\n\n\"'Let me remove my hat. Now, venerable priest, further into the light,\nand hold the Holy Book before me that I may touch it.\n\n\"'So help me Heaven, and on my honour the story I have told ye,\ngentlemen, is in substance and its great items, true. I know it to be\ntrue; it happened on this ball; I trod the ship; I knew the crew; I\nhave seen and talked with Steelkilt since the death of Radney.'\"\n\n The ancient whale-cry upon first sighting a whale from the\nmast-head, still used by whalemen in hunting the famous Gallipagos\nterrapin.\n\nCHAPTER 55 Of the Monstrous Pictures of Whales.\n\nI shall ere long paint to you as well as one can without canvas,\nsomething like the true form of the whale as he actually appears to\nthe eye of the whaleman when in his own absolute body the whale is\nmoored alongside the whale-ship so that he can be fairly stepped upon\nthere. It may be worth while, therefore, previously to advert to those\ncurious imaginary portraits of him which even down to the present day\nconfidently challenge the faith of the landsman. It is time to set the\nworld right in this matter, by proving such pictures of the whale all\nwrong.\n\nIt may be that the primal source of all those pictorial delusions will\nbe found among the oldest Hindoo, Egyptian, and Grecian\nsculptures. For ever since those inventive but unscrupulous times when\non the marble panellings of temples, the pedestals of statues, and on\nshields, medallions, cups, and coins, the dolphin was drawn in scales\nof chain-armor like Saladin's, and a helmeted head like St. George's;\never since then has something of the same sort of license prevailed,\nnot only in most popular pictures of the whale, but in many scientific\npresentations of him.\n\nNow, by all odds, the most ancient extant portrait anyways purporting\nto be the whale's, is to be found in the famous cavern-pagoda of\nElephanta, in India. The Brahmins maintain that in the almost endless\nsculptures of that immemorial pagoda, all the trades and pursuits,\nevery conceivable avocation of man, were prefigured ages before any of\nthem actually came into being. No wonder then, that in some sort our\nnoble profession of whaling should have been there shadowed forth. The\nHindoo whale referred to, occurs in a separate department of the wall,\ndepicting the incarnation of Vishnu in the form of leviathan,\nlearnedly known as the Matse Avatar. But though this sculpture is half\nman and half whale, so as only to give the tail of the latter, yet\nthat small section of him is all wrong. It looks more like the\ntapering tail of an anaconda, than the broad palms of the true whale's\nmajestic flukes.\n\nBut go to the old Galleries, and look now at a great Christian\npainter's portrait of this fish; for he succeeds no better than the\nantediluvian Hindoo. It is Guido's picture of Perseus rescuing\nAndromeda from the sea-monster or whale. Where did Guido get the model\nof such a strange creature as that? Nor does Hogarth, in painting the\nsame scene in his own \"Perseus Descending,\" make out one whit\nbetter. The huge corpulence of that Hogarthian monster undulates on\nthe surface, scarcely drawing one inch of water. It has a sort of\nhowdah on its back, and its distended tusked mouth into which the\nbillows are rolling, might be taken for the Traitors' Gate leading\nfrom the Thames by water into the Tower. Then, there are the Prodromus\nwhales of old Scotch Sibbald, and Jonah's whale, as depicted in the\nprints of old Bibles and the cuts of old primers. What shall be said\nof these? As for the book-binder's whale winding like a vine-stalk\nround the stock of a descending anchor  as stamped and gilded on\nthe backs and title-pages of many books both old and new  that is a\nvery picturesque but purely fabulous creature, imitated, I take it,\nfrom the like figures on antique vases. Though universally denominated\na dolphin, I nevertheless call this book-binder's fish an attempt at a\nwhale; because it was so intended when the device was first\nintroduced. It was introduced by an old Italian publisher somewhere\nabout the 15th century, during the Revival of Learning; and in those\ndays, and even down to a comparatively late period, dolphins were\npopularly supposed to be a species of the Leviathan.\n\nIn the vignettes and other embellishments of some ancient books you\nwill at times meet with very curious touches at the whale, where all\nmanner of spouts, jets d'eau, hot springs and cold, Saratoga and\nBaden-Baden, come bubbling up from his unexhausted brain. In the\ntitle-page of the original edition of the \"Advancement of Learning\"\nyou will find some curious whales.\n\nBut quitting all these unprofessional attempts, let us glance at those\npictures of leviathan purporting to be sober, scientific delineations,\nby those who know. In old Harris's collection of voyages there are\nsome plates of whales extracted from a Dutch book of voyages,\nA.D. 1671, entitled \"A Whaling Voyage to Spitzbergen in the ship Jonas\nin the Whale, Peter Peterson of Friesland, master.\" In one of those\nplates the whales, like great rafts of logs, are represented lying\namong ice-isles, with white bears running over their living backs. In\nanother plate, the prodigious blunder is made of representing the\nwhale with perpendicular flukes.\n\nThen again, there is an imposing quarto, written by one Captain\nColnett, a Post Captain in the English navy, entitled \"A Voyage round\nCape Horn into the South Seas, for the purpose of extending the\nSpermaceti Whale Fisheries.\" In this book is an outline purporting to\nbe a \"Picture of a Physeter or Spermaceti whale, drawn by scale from\none killed on the coast of Mexico, August, 1793, and hoisted on deck.\"\nI doubt not the captain had this veracious picture taken for the\nbenefit of his marines. To mention but one thing about it, let me say\nthat it has an eye which applied, according to the accompanying scale,\nto a full grown sperm whale, would make the eye of that whale a\nbow-window some five feet long. Ah, my gallant captain, why did ye not\ngive us Jonah looking out of that eye!\n\nNor are the most conscientious compilations of Natural History for the\nbenefit of the young and tender, free from the same heinousness of\nmistake. Look at that popular work \"Goldsmith's Animated Nature.\" In\nthe abridged London edition of 1807, there are plates of an alleged\n\"whale\" and a \"narwhale.\" I do not wish to seem inelegant, but this\nunsightly whale looks much like an amputated sow; and, as for the\nnarwhale, one glimpse at it is enough to amaze one, that in this\nnineteenth century such a hippogriff could be palmed for genuine upon\nany intelligent public of schoolboys.\n\nThen, again, in 1825, Bernard Germain, Count de Lacepede, a great\nnaturalist, published a scientific systemized whale book, wherein are\nseveral pictures of the different species of the Leviathan. All these\nare not only incorrect, but the picture of the Mysticetus or Greenland\nwhale (that is to say, the Right whale), even Scoresby, a long\nexperienced man as touching that species, declares not to have its\ncounterpart in nature.\n\nBut the placing of the cap-sheaf to all this blundering business was\nreserved for the scientific Frederick Cuvier, brother to the famous\nBaron. In 1836, he published a Natural History of Whales, in which he\ngives what he calls a picture of the Sperm Whale. Before showing that\npicture to any Nantucketer, you had best provide for your summary\nretreat from Nantucket. In a word, Frederick Cuvier's Sperm Whale is\nnot a Sperm Whale, but a squash. Of course, he never had the benefit\nof a whaling voyage (such men seldom have), but whence he derived that\npicture, who can tell? Perhaps he got it as his scientific predecessor\nin the same field, Desmarest, got one of his authentic abortions; that\nis, from a Chinese drawing. And what sort of lively lads with the\npencil those Chinese are, many queer cups and saucers inform us.\n\nAs for the sign-painters' whales seen in the streets hanging over the\nshops of oil-dealers, what shall be said of them? They are generally\nRichard III. whales, with dromedary humps, and very savage;\nbreakfasting on three or four sailor tarts, that is whaleboats full of\nmariners: their deformities floundering in seas of blood and blue\npaint.\n\nBut these manifold mistakes in depicting the whale are not so very\nsurprising after all. Consider! Most of the scientific drawings have\nbeen taken from the stranded fish; and these are about as correct as a\ndrawing of a wrecked ship, with broken back, would correctly represent\nthe noble animal itself in all its undashed pride of hull and\nspars. Though elephants have stood for their full-lengths, the living\nLeviathan has never yet fairly floated himself for his portrait. The\nliving whale, in his full majesty and significance, is only to be seen\nat sea in unfathomable waters; and afloat the vast bulk of him is out\nof sight, like a launched line-of-battle ship; and out of that element\nit is a thing eternally impossible for mortal man to hoist him bodily\ninto the air, so as to preserve all his mighty swells and\nundulations. And, not to speak of the highly presumable difference of\ncontour between a young sucking whale and a full-grown Platonian\nLeviathan; yet, even in the case of one of those young sucking whales\nhoisted to a ship's deck, such is then the outlandish, eel-like,\nlimbered, varying shape of him, that his precise expression the devil\nhimself could not catch.\n\nBut it may be fancied, that from the naked skeleton of the stranded\nwhale, accurate hints may be derived touching his true form. Not at\nall. For it is one of the more curious things about this Leviathan,\nthat his skeleton gives very little idea of his general shape. Though\nJeremy Bentham's skeleton, which hangs for candelabra in the library\nof one of his executors, correctly conveys the idea of a burly-browed\nutilitarian old gentleman, with all Jeremy's other leading personal\ncharacteristics; yet nothing of this kind could be inferred from any\nleviathan's articulated bones. In fact, as the great Hunter says, the\nmere skeleton of the whale bears the same relation to the fully\ninvested and padded animal as the insect does to the chrysalis that so\nroundingly envelopes it. This peculiarity is strikingly evinced in the\nhead, as in some part of this book will be incidentally shown. It is\nalso very curiously displayed in the side fin, the bones of which\nalmost exactly answer to the bones of the human hand, minus only the\nthumb. This fin has four regular bone-fingers, the index, middle,\nring, and little finger. But all these are permanently lodged in their\nfleshy covering, as the human fingers in an artificial\ncovering. \"However recklessly the whale may sometimes serve us,\" said\nhumorous Stubb one day, \"he can never be truly said to handle us\nwithout mittens.\"\n\nFor all these reasons, then, any way you may look at it, you must\nneeds conclude that the great Leviathan is that one creature in the\nworld which must remain unpainted to the last. True, one portrait may\nhit the mark much nearer than another, but none can hit it with any\nvery considerable degree of exactness. So there is no earthly way of\nfinding out precisely what the whale really looks like. And the only\nmode in which you can derive even a tolerable idea of his living\ncontour, is by going a whaling yourself; but by so doing, you run no\nsmall risk of being eternally stove and sunk by him. Wherefore, it\nseems to me you had best not be too fastidious in your curiosity\ntouching this Leviathan.\n\nCHAPTER 56 Of the Less Erroneous Pictures of Whales, and the True\nPictures of Whaling Scenes.\n\nIn connexion with the monstrous pictures of whales, I am strongly\ntempted here to enter upon those still more monstrous stories of them\nwhich are to be found in certain books, both ancient and modern,\nespecially in Pliny, Purchas, Hackluyt, Harris, Cuvier, etc. But I\npass that matter by.\n\nI know of only four published outlines of the great Sperm Whale;\nColnett's, Huggins's, Frederick Cuvier's, and Beale's. In the previous\nchapter Colnett and Cuvier have been referred to. Huggins's is far\nbetter than theirs; but, by great odds, Beale's is the best. All\nBeale's drawings of this whale are good, excepting the middle figure\nin the picture of three whales in various attitudes, capping his\nsecond chapter. His frontispiece, boats attacking Sperm Whales, though\nno doubt calculated to excite the civil scepticism of some parlor men,\nis admirably correct and life-like in its general effect. Some of the\nSperm Whale drawings in J. Ross Browne are pretty correct in contour;\nbut they are wretchedly engraved. That is not his fault though.\n\nOf the Right Whale, the best outline pictures are in Scoresby; but\nthey are drawn on too small a scale to convey a desirable\nimpression. He has but one picture of whaling scenes, and this is a\nsad deficiency, because it is by such pictures only, when at all well\ndone, that you can derive anything like a truthful idea of the living\nwhale as seen by his living hunters.\n\nBut, taken for all in all, by far the finest, though in some details\nnot the most correct, presentations of whales and whaling scenes to be\nanywhere found, are two large French engravings, well executed, and\ntaken from paintings by one Garnery. Respectively, they represent\nattacks on the Sperm and Right Whale. In the first engraving a noble\nSperm Whale is depicted in full majesty of might, just risen beneath\nthe boat from the profundities of the ocean, and bearing high in the\nair upon his back the terrific wreck of the stoven planks. The prow of\nthe boat is partially unbroken, and is drawn just balancing upon the\nmonster's spine; and standing in that prow, for that one single\nincomputable flash of time, you behold an oarsman, half shrouded by\nthe incensed boiling spout of the whale, and in the act of leaping, as\nif from a precipice. The action of the whole thing is wonderfully good\nand true. The half-emptied line-tub floats on the whitened sea; the\nwooden poles of the spilled harpoons obliquely bob in it; the heads of\nthe swimming crew are scattered about the whale in contrasting\nexpressions of affright; while in the black stormy distance the ship\nis bearing down upon the scene. Serious fault might be found with the\nanatomical details of this whale, but let that pass; since, for the\nlife of me, I could not draw so good a one.\n\nIn the second engraving, the boat is in the act of drawing alongside\nthe barnacled flank of a large running Right Whale, that rolls his\nblack weedy bulk in the sea like some mossy rock-slide from the\nPatagonian cliffs. His jets are erect, full, and black like soot; so\nthat from so abounding a smoke in the chimney, you would think there\nmust be a brave supper cooking in the great bowels below. Sea fowls\nare pecking at the small crabs, shell-fish, and other sea candies and\nmaccaroni, which the Right Whale sometimes carries on his pestilent\nback. And all the while the thick-lipped leviathan is rushing through\nthe deep, leaving tons of tumultuous white curds in his wake, and\ncausing the slight boat to rock in the swells like a skiff caught nigh\nthe paddle-wheels of an ocean steamer. Thus, the foreground is all\nraging commotion; but behind, in admirable artistic contrast, is the\nglassy level of a sea becalmed, the drooping unstarched sails of the\npowerless ship, and the inert mass of a dead whale, a conquered\nfortress, with the flag of capture lazily hanging from the whale-pole\ninserted into his spout-hole.\n\nWho Garnery the painter is, or was, I know not. But my life for it he\nwas either practically conversant with his subject, or else\nmarvellously tutored by some experienced whaleman. The French are the\nlads for painting action. Go and gaze upon all the paintings of\nEurope, and where will you find such a gallery of living and breathing\ncommotion on canvas, as in that triumphal hall at Versailles; where\nthe beholder fights his way, pell-mell, through the consecutive great\nbattles of France; where every sword seems a flash of the Northern\nLights, and the successive armed kings and Emperors dash by, like a\ncharge of crowned centaurs? Not wholly unworthy of a place in that\ngallery, are these sea battle-pieces of Garnery.\n\nThe natural aptitude of the French for seizing the picturesqueness of\nthings seems to be peculiarly evinced in what paintings and engravings\nthey have of their whaling scenes. With not one tenth of England's\nexperience in the fishery, and not the thousandth part of that of the\nAmericans, they have nevertheless furnished both nations with the only\nfinished sketches at all capable of conveying the real spirit of the\nwhale hunt. For the most part, the English and American whale\ndraughtsmen seem entirely content with presenting the mechanical\noutline of things, such as the vacant profile of the whale; which, so\nfar as picturesqueness of effect is concerned, is about tantamount to\nsketching the profile of a pyramid. Even Scoresby, the justly renowned\nRight whaleman, after giving us a stiff full length of the Greenland\nwhale, and three or four delicate miniatures of narwhales and\nporpoises, treats us to a series of classical engravings of boat\nhooks, chopping knives, and grapnels; and with the microscopic\ndiligence of a Leuwenhoeck submits to the inspection of a shivering\nworld ninety-six fac-similes of magnified Arctic snow crystals. I mean\nno disparagement to the excellent voyager (I honour him for a\nveteran), but in so important a matter it was certainly an oversight\nnot to have procured for every crystal a sworn affidavit taken before\na Greenland Justice of the Peace.\n\nIn addition to those fine engravings from Garnery, there are two other\nFrench engravings worthy of note, by some one who subscribes himself\n\"H. Durand.\" One of them, though not precisely adapted to our present\npurpose, nevertheless deserves mention on other accounts. It is a\nquiet noon-scene among the isles of the Pacific; a French whaler\nanchored, inshore, in a calm, and lazily taking water on board; the\nloosened sails of the ship, and the long leaves of the palms in the\nbackground, both drooping together in the breezeless air. The effect\nis very fine, when considered with reference to its presenting the\nhardy fishermen under one of their few aspects of oriental repose. The\nother engraving is quite a different affair: the ship hove-to upon the\nopen sea, and in the very heart of the Leviathanic life, with a Right\nWhale alongside; the vessel (in the act of cutting-in) hove over to\nthe monster as if to a quay; and a boat, hurriedly pushing off from\nthis scene of activity, is about giving chase to whales in the\ndistance. The harpoons and lances lie levelled for use; three oarsmen\nare just setting the mast in its hole; while from a sudden roll of the\nsea, the little craft stands half-erect out of the water, like a\nrearing horse. From the ship, the smoke of the torments of the boiling\nwhale is going up like the smoke over a village of smithies; and to\nwindward, a black cloud, rising up with earnest of squalls and rains,\nseems to quicken the activity of the excited seamen.\n\nCHAPTER 57 Of Whales in Paint; in Teeth; in Wood; in Sheet-Iron; in\nStone; in Mountains; in Stars.\n\nOn Tower-hill, as you go down to the London docks, you may have seen a\ncrippled beggar (or kedger, as the sailors say) holding a painted\nboard before him, representing the tragic scene in which he lost his\nleg. There are three whales and three boats; and one of the boats\n(presumed to contain the missing leg in all its original integrity) is\nbeing crunched by the jaws of the foremost whale. Any time these ten\nyears, they tell me, has that man held up that picture, and exhibited\nthat stump to an incredulous world. But the time of his justification\nhas now come. His three whales are as good whales as were ever\npublished in Wapping, at any rate; and his stump as unquestionable a\nstump as any you will find in the western clearings. But, though for\never mounted on that stump, never a stump-speech does the poor\nwhaleman make; but, with downcast eyes, stands ruefully contemplating\nhis own amputation.\n\nThroughout the Pacific, and also in Nantucket, and New Bedford, and\nSag Harbor, you will come across lively sketches of whales and\nwhaling-scenes, graven by the fishermen themselves on Sperm\nWhale-teeth, or ladies' busks wrought out of the Right Whale-bone, and\nother like skrimshander articles, as the whalemen call the numerous\nlittle ingenious contrivances they elaborately carve out of the rough\nmaterial, in their hours of ocean leisure. Some of them have little\nboxes of dentistical-looking implements, specially intended for the\nskrimshandering business. But, in general, they toil with their\njack-knives alone; and, with that almost omnipotent tool of the\nsailor, they will turn you out anything you please, in the way of a\nmariner's fancy.\n\nLong exile from Christendom and civilization inevitably restores a man\nto that condition in which God placed him, i.e. what is called\nsavagery. Your true whale-hunter is as much a savage as an Iroquois. I\nmyself am a savage, owning no allegiance but to the King of the\nCannibals; and ready at any moment to rebel against him.\n\nNow, one of the peculiar characteristics of the savage in his domestic\nhours, is his wonderful patience of industry. An ancient Hawaiian\nwar-club or spear-paddle, in its full multiplicity and elaboration of\ncarving, is as great a trophy of human perseverance as a Latin\nlexicon. For, with but a bit of broken sea-shell or a shark's tooth,\nthat miraculous intricacy of wooden net-work has been achieved; and it\nhas cost steady years of steady application.\n\nAs with the Hawaiian savage, so with the white sailor-savage. With the\nsame marvellous patience, and with the same single shark's tooth, of\nhis one poor jack-knife, he will carve you a bit of bone sculpture,\nnot quite as workmanlike, but as close packed in its maziness of\ndesign, as the Greek savage, Achilles's shield; and full of barbaric\nspirit and suggestiveness, as the prints of that fine old Dutch\nsavage, Albert Durer.\n\nWooden whales, or whales cut in profile out of the small dark slabs of\nthe noble South Sea war-wood, are frequently met with in the\nforecastles of American whalers. Some of them are done with much\naccuracy.\n\nAt some old gable-roofed country houses you will see brass whales hung\nby the tail for knockers to the road-side door. When the porter is\nsleepy, the anvil-headed whale would be best. But these knocking\nwhales are seldom remarkable as faithful essays. On the spires of some\nold-fashioned churches you will see sheet-iron whales placed there for\nweather-cocks; but they are so elevated, and besides that are to all\nintents and purposes so labelled with \"Hands off!\" you cannot examine\nthem closely enough to decide upon their merit.\n\nIn bony, ribby regions of the earth, where at the base of high broken\ncliffs masses of rock lie strewn in fantastic groupings upon the\nplain, you will often discover images as of the petrified forms of the\nLeviathan partly merged in grass, which of a windy day breaks against\nthem in a surf of green surges.\n\nThen, again, in mountainous countries where the traveller is\ncontinually girdled by amphitheatrical heights; here and there from\nsome lucky point of view you will catch passing glimpses of the\nprofiles of whales defined along the undulating ridges. But you must\nbe a thorough whaleman, to see these sights; and not only that, but if\nyou wish to return to such a sight again, you must be sure and take\nthe exact intersecting latitude and longitude of your first\nstand-point, else so chance-like are such observations of the hills,\nthat your precise, previous stand-point would require a laborious\nre-discovery; like the Soloma Islands, which still remain incognita,\nthough once high-ruffed Mendanna trod them and old Figuera chronicled\nthem.\n\nNor when expandingly lifted by your subject, can you fail to trace out\ngreat whales in the starry heavens, and boats in pursuit of them; as\nwhen long filled with thoughts of war the Eastern nations saw armies\nlocked in battle among the clouds. Thus at the North have I chased\nLeviathan round and round the Pole with the revolutions of the bright\npoints that first defined him to me. And beneath the effulgent\nAntarctic skies I have boarded the Argo-Navis, and joined the chase\nagainst the starry Cetus far beyond the utmost stretch of Hydrus and\nthe Flying Fish.\n\nWith a frigate's anchors for my bridle-bitts and fasces of harpoons\nfor spurs, would I could mount that whale and leap the topmost skies,\nto see whether the fabled heavens with all their countless tents\nreally lie encamped beyond my mortal sight!\n\nCHAPTER 58 Brit.\n\nSteering north-eastward from the Crozetts, we fell in with vast\nmeadows of brit, the minute, yellow substance, upon which the Right\nWhale largely feeds. For leagues and leagues it undulated round us, so\nthat we seemed to be sailing through boundless fields of ripe and\ngolden wheat.\n\nOn the second day, numbers of Right Whales were seen, who, secure from\nthe attack of a Sperm Whaler like the Pequod, with open jaws\nsluggishly swam through the brit, which, adhering to the fringing\nfibres of that wondrous Venetian blind in their mouths, was in that\nmanner separated from the water that escaped at the lip.\n\nAs morning mowers, who side by side slowly and seethingly advance\ntheir scythes through the long wet grass of marshy meads; even so\nthese monsters swam, making a strange, grassy, cutting sound; and\nleaving behind them endless swaths of blue upon the yellow sea.\n\nBut it was only the sound they made as they parted the brit which at\nall reminded one of mowers. Seen from the mast-heads, especially when\nthey paused and were stationary for a while, their vast black forms\nlooked more like lifeless masses of rock than anything else. And as in\nthe great hunting countries of India, the stranger at a distance will\nsometimes pass on the plains recumbent elephants without knowing them\nto be such, taking them for bare, blackened elevations of the soil;\neven so, often, with him, who for the first time beholds this species\nof the leviathans of the sea. And even when recognised at last, their\nimmense magnitude renders it very hard really to believe that such\nbulky masses of overgrowth can possibly be instinct, in all parts,\nwith the same sort of life that lives in a dog or a horse.\n\nIndeed, in other respects, you can hardly regard any creatures of the\ndeep with the same feelings that you do those of the shore. For though\nsome old naturalists have maintained that all creatures of the land\nare of their kind in the sea; and though taking a broad general view\nof the thing, this may very well be; yet coming to specialties, where,\nfor example, does the ocean furnish any fish that in disposition\nanswers to the sagacious kindness of the dog? The accursed shark alone\ncan in any generic respect be said to bear comparative analogy to him.\n\nBut though, to landsmen in general, the native inhabitants of the seas\nhave ever been regarded with emotions unspeakably unsocial and\nrepelling; though we know the sea to be an everlasting terra\nincognita, so that Columbus sailed over numberless unknown worlds to\ndiscover his one superficial western one; though, by vast odds, the\nmost terrific of all mortal disasters have immemorially and\nindiscriminately befallen tens and hundreds of thousands of those who\nhave gone upon the waters; though but a moment's consideration will\nteach, that however baby man may brag of his science and skill, and\nhowever much, in a flattering future, that science and skill may\naugment; yet for ever and for ever, to the crack of doom, the sea will\ninsult and murder him, and pulverize the stateliest, stiffest frigate\nhe can make; nevertheless, by the continual repetition of these very\nimpressions, man has lost that sense of the full awfulness of the sea\nwhich aboriginally belongs to it.\n\nThe first boat we read of, floated on an ocean, that with Portuguese\nvengeance had whelmed a whole world without leaving so much as a\nwidow. That same ocean rolls now; that same ocean destroyed the\nwrecked ships of last year. Yea, foolish mortals, Noah's flood is not\nyet subsided; two thirds of the fair world it yet covers.\n\nWherein differ the sea and the land, that a miracle upon one is not a\nmiracle upon the other? Preternatural terrors rested upon the Hebrews,\nwhen under the feet of Korah and his company the live ground opened\nand swallowed them up for ever; yet not a modern sun ever sets, but in\nprecisely the same manner the live sea swallows up ships and crews.\n\nBut not only is the sea such a foe to man who is an alien to it, but\nit is also a fiend to its own off-spring; worse than the Persian host\nwho murdered his own guests; sparing not the creatures which itself\nhath spawned. Like a savage tigress that tossing in the jungle\noverlays her own cubs, so the sea dashes even the mightiest whales\nagainst the rocks, and leaves them there side by side with the split\nwrecks of ships. No mercy, no power but its own controls it. Panting\nand snorting like a mad battle steed that has lost its rider, the\nmasterless ocean overruns the globe.\n\nConsider the subtleness of the sea; how its most dreaded creatures\nglide under water, unapparent for the most part, and treacherously\nhidden beneath the loveliest tints of azure. Consider also the\ndevilish brilliance and beauty of many of its most remorseless tribes,\nas the dainty embellished shape of many species of sharks. Consider,\nonce more, the universal cannibalism of the sea; all whose creatures\nprey upon each other, carrying on eternal war since the world began.\n\nConsider all this; and then turn to this green, gentle, and most\ndocile earth; consider them both, the sea and the land; and do you not\nfind a strange analogy to something in yourself? For as this appalling\nocean surrounds the verdant land, so in the soul of man there lies one\ninsular Tahiti, full of peace and joy, but encompassed by all the\nhorrors of the half known life. God keep thee! Push not off from that\nisle, thou canst never return!\n\n That part of the sea known among whalemen as the \"Brazil Banks\"\ndoes not bear that name as the Banks of Newfoundland do, because of\nthere being shallows and soundings there, but because of this\nremarkable meadow-like appearance, caused by the vast drifts of brit\ncontinually floating in those latitudes, where the Right Whale is\noften chased.\n\nCHAPTER 59 Squid.\n\nSlowly wading through the meadows of brit, the Pequod still held on\nher way north-eastward towards the island of Java; a gentle air\nimpelling her keel, so that in the surrounding serenity her three tall\ntapering masts mildly waved to that languid breeze, as three mild\npalms on a plain. And still, at wide intervals in the silvery night,\nthe lonely, alluring jet would be seen.\n\nBut one transparent blue morning, when a stillness almost\npreternatural spread over the sea, however unattended with any\nstagnant calm; when the long burnished sun-glade on the waters seemed\na golden finger laid across them, enjoining some secrecy; when the\nslippered waves whispered together as they softly ran on; in this\nprofound hush of the visible sphere a strange spectre was seen by\nDaggoo from the main-mast-head.\n\nIn the distance, a great white mass lazily rose, and rising higher and\nhigher, and disentangling itself from the azure, at last gleamed\nbefore our prow like a snow-slide, new slid from the hills. Thus\nglistening for a moment, as slowly it subsided, and sank. Then once\nmore arose, and silently gleamed. It seemed not a whale; and yet is\nthis Moby Dick? thought Daggoo. Again the phantom went down, but on\nre-appearing once more, with a stiletto-like cry that startled every\nman from his nod, the negro yelled out  \"There! there again! there\nshe breaches! right ahead! The White Whale, the White Whale!\"\n\nUpon this, the seamen rushed to the yard-arms, as in swarming-time the\nbees rush to the boughs. Bare-headed in the sultry sun, Ahab stood on\nthe bowsprit, and with one hand pushed far behind in readiness to wave\nhis orders to the helmsman, cast his eager glance in the direction\nindicated aloft by the outstretched motionless arm of Daggoo.\n\nWhether the flitting attendance of the one still and solitary jet had\ngradually worked upon Ahab, so that he was now prepared to connect the\nideas of mildness and repose with the first sight of the particular\nwhale he pursued; however this was, or whether his eagerness betrayed\nhim; whichever way it might have been, no sooner did he distinctly\nperceive the white mass, than with a quick intensity he instantly gave\norders for lowering.\n\nThe four boats were soon on the water; Ahab's in advance, and all\nswiftly pulling towards their prey. Soon it went down, and while, with\noars suspended, we were awaiting its reappearance, lo! in the same\nspot where it sank, once more it slowly rose. Almost forgetting for\nthe moment all thoughts of Moby Dick, we now gazed at the most\nwondrous phenomenon which the secret seas have hitherto revealed to\nmankind. A vast pulpy mass, furlongs in length and breadth, of a\nglancing cream-colour, lay floating on the water, innumerable long\narms radiating from its centre, and curling and twisting like a nest\nof anacondas, as if blindly to clutch at any hapless object within\nreach. No perceptible face or front did it have; no conceivable token\nof either sensation or instinct; but undulated there on the billows,\nan unearthly, formless, chance-like apparition of life.\n\nAs with a low sucking sound it slowly disappeared again, Starbuck\nstill gazing at the agitated waters where it had sunk, with a wild\nvoice exclaimed  \"Almost rather had I seen Moby Dick and fought\nhim, than to have seen thee, thou white ghost!\"\n\n\"What was it, Sir?\" said Flask.\n\n\"The great live squid, which, they say, few whale-ships ever beheld,\nand returned to their ports to tell of it.\"\n\nBut Ahab said nothing; turning his boat, he sailed back to the vessel;\nthe rest as silently following.\n\nWhatever superstitions the sperm whalemen in general have connected\nwith the sight of this object, certain it is, that a glimpse of it\nbeing so very unusual, that circumstance has gone far to invest it\nwith portentousness. So rarely is it beheld, that though one and all\nof them declare it to be the largest animated thing in the ocean, yet\nvery few of them have any but the most vague ideas concerning its true\nnature and form; notwithstanding, they believe it to furnish to the\nsperm whale his only food. For though other species of whales find\ntheir food above water, and may be seen by man in the act of feeding,\nthe spermaceti whale obtains his whole food in unknown zones below the\nsurface; and only by inference is it that any one can tell of what,\nprecisely, that food consists. At times, when closely pursued, he will\ndisgorge what are supposed to be the detached arms of the squid; some\nof them thus exhibited exceeding twenty and thirty feet in\nlength. They fancy that the monster to which these arms belonged\nordinarily clings by them to the bed of the ocean; and that the sperm\nwhale, unlike other species, is supplied with teeth in order to attack\nand tear it.\n\nThere seems some ground to imagine that the great Kraken of Bishop\nPontoppodan may ultimately resolve itself into Squid. The manner in\nwhich the Bishop describes it, as alternately rising and sinking, with\nsome other particulars he narrates, in all this the two\ncorrespond. But much abatement is necessary with respect to the\nincredible bulk he assigns it.\n\nBy some naturalists who have vaguely heard rumors of the mysterious\ncreature, here spoken of, it is included among the class of\ncuttle-fish, to which, indeed, in certain external respects it would\nseem to belong, but only as the Anak of the tribe.\n\nCHAPTER 60 The Line.\n\nWith reference to the whaling scene shortly to be described, as well\nas for the better understanding of all similar scenes elsewhere\npresented, I have here to speak of the magical, sometimes horrible\nwhale-line.\n\nThe line originally used in the fishery was of the best hemp, slightly\nvapoured with tar, not impregnated with it, as in the case of ordinary\nropes; for while tar, as ordinarily used, makes the hemp more pliable\nto the rope-maker, and also renders the rope itself more convenient to\nthe sailor for common ship use; yet, not only would the ordinary\nquantity too much stiffen the whale-line for the close coiling to\nwhich it must be subjected; but as most seamen are beginning to learn,\ntar in general by no means adds to the rope's durability or strength,\nhowever much it may give it compactness and gloss.\n\nOf late years the Manilla rope has in the American fishery almost\nentirely superseded hemp as a material for whale-lines; for, though\nnot so durable as hemp, it is stronger, and far more soft and elastic;\nand I will add (since there is an aesthetics in all things), is much\nmore handsome and becoming to the boat, than hemp. Hemp is a dusky,\ndark fellow, a sort of Indian; but Manilla is as a golden-haired\nCircassian to behold.\n\nThe whale-line is only two-thirds of an inch in thickness. At first\nsight, you would not think it so strong as it really is. By experiment\nits one and fifty yarns will each suspend a weight of one hundred and\ntwenty pounds; so that the whole rope will bear a strain nearly equal\nto three tons. In length, the common sperm whale-line measures\nsomething over two hundred fathoms. Towards the stern of the boat it\nis spirally coiled away in the tub, not like the worm-pipe of a still\nthough, but so as to form one round, cheese-shaped mass of densely\nbedded \"sheaves,\" or layers of concentric spiralizations, without any\nhollow but the \"heart,\" or minute vertical tube formed at the axis of\nthe cheese. As the least tangle or kink in the coiling would, in\nrunning out, infallibly take somebody's arm, leg, or entire body off,\nthe utmost precaution is used in stowing the line in its tub. Some\nharpooneers will consume almost an entire morning in this business,\ncarrying the line high aloft and then reeving it downwards through a\nblock towards the tub, so as in the act of coiling to free it from all\npossible wrinkles and twists.\n\nIn the English boats two tubs are used instead of one; the same line\nbeing continuously coiled in both tubs. There is some advantage in\nthis; because these twin-tubs being so small they fit more readily\ninto the boat, and do not strain it so much; whereas, the American\ntub, nearly three feet in diameter and of proportionate depth, makes a\nrather bulky freight for a craft whose planks are but one half-inch in\nthickness; for the bottom of the whale-boat is like critical ice,\nwhich will bear up a considerable distributed weight, but not very\nmuch of a concentrated one. When the painted canvas cover is clapped\non the American line-tub, the boat looks as if it were pulling off\nwith a prodigious great wedding-cake to present to the whales.\n\nBoth ends of the line are exposed; the lower end terminating in an\neye-splice or loop coming up from the bottom against the side of the\ntub, and hanging over its edge completely disengaged from\neverything. This arrangement of the lower end is necessary on two\naccounts. First: In order to facilitate the fastening to it of an\nadditional line from a neighboring boat, in case the stricken whale\nshould sound so deep as to threaten to carry off the entire line\noriginally attached to the harpoon. In these instances, the whale of\ncourse is shifted like a mug of ale, as it were, from the one boat to\nthe other; though the first boat always hovers at hand to assist its\nconsort. Second: This arrangement is indispensable for common safety's\nsake; for were the lower end of the line in any way attached to the\nboat, and were the whale then to run the line out to the end almost in\na single, smoking minute as he sometimes does, he would not stop\nthere, for the doomed boat would infallibly be dragged down after him\ninto the profundity of the sea; and in that case no town-crier would\never find her again.\n\nBefore lowering the boat for the chase, the upper end of the line is\ntaken aft from the tub, and passing round the loggerhead there, is\nagain carried forward the entire length of the boat, resting crosswise\nupon the loom or handle of every man's oar, so that it jogs against\nhis wrist in rowing; and also passing between the men, as they\nalternately sit at the opposite gunwales, to the leaded chocks or\ngrooves in the extreme pointed prow of the boat, where a wooden pin or\nskewer the size of a common quill, prevents it from slipping out. From\nthe chocks it hangs in a slight festoon over the bows, and is then\npassed inside the boat again; and some ten or twenty fathoms (called\nbox-line) being coiled upon the box in the bows, it continues its way\nto the gunwale still a little further aft, and is then attached to the\nshort-warp  the rope which is immediately connected with the\nharpoon; but previous to that connexion, the short-warp goes through\nsundry mystifications too tedious to detail.\n\nThus the whale-line folds the whole boat in its complicated coils,\ntwisting and writhing around it in almost every direction. All the\noarsmen are involved in its perilous contortions; so that to the timid\neye of the landsman, they seem as Indian jugglers, with the deadliest\nsnakes sportively festooning their limbs. Nor can any son of mortal\nwoman, for the first time, seat himself amid those hempen intricacies,\nand while straining his utmost at the oar, bethink him that at any\nunknown instant the harpoon may be darted, and all these horrible\ncontortions be put in play like ringed lightnings; he cannot be thus\ncircumstanced without a shudder that makes the very marrow in his\nbones to quiver in him like a shaken jelly. Yet habit  strange\nthing! what cannot habit accomplish?  Gayer sallies, more merry\nmirth, better jokes, and brighter repartees, you never heard over your\nmahogany, than you will hear over the half-inch white cedar of the\nwhale-boat, when thus hung in hangman's nooses; and, like the six\nburghers of Calais before King Edward, the six men composing the crew\npull into the jaws of death, with a halter around every neck, as you\nmay say.\n\nPerhaps a very little thought will now enable you to account for those\nrepeated whaling disasters  some few of which are casually\nchronicled  of this man or that man being taken out of the boat by\nthe line, and lost. For, when the line is darting out, to be seated\nthen in the boat, is like being seated in the midst of the manifold\nwhizzings of a steam-engine in full play, when every flying beam, and\nshaft, and wheel, is grazing you. It is worse; for you cannot sit\nmotionless in the heart of these perils, because the boat is rocking\nlike a cradle, and you are pitched one way and the other, without the\nslightest warning; and only by a certain self-adjusting buoyancy and\nsimultaneousness of volition and action, can you escape being made a\nMazeppa of, and run away with where the all-seeing sun himself could\nnever pierce you out.\n\nAgain: as the profound calm which only apparently precedes and\nprophesies of the storm, is perhaps more awful than the storm itself;\nfor, indeed, the calm is but the wrapper and envelope of the storm;\nand contains it in itself, as the seemingly harmless rifle holds the\nfatal powder, and the ball, and the explosion; so the graceful repose\nof the line, as it silently serpentines about the oarsmen before being\nbrought into actual play  this is a thing which carries more of\ntrue terror than any other aspect of this dangerous affair. But why\nsay more? All men live enveloped in whale-lines. All are born with\nhalters round their necks; but it is only when caught in the swift,\nsudden turn of death, that mortals realize the silent, subtle,\never-present perils of life. And if you be a philosopher, though\nseated in the whale-boat, you would not at heart feel one whit more of\nterror, than though seated before your evening fire with a poker, and\nnot a harpoon, by your side.\n\nCHAPTER 61 Stubb Kills a Whale.\n\nIf to Starbuck the apparition of the Squid was a thing of portents, to\nQueequeg it was quite a different object.\n\n\"When you see him 'quid,\" said the savage, honing his harpoon in the\nbow of his hoisted boat, \"then you quick see him 'parm whale.\"\n\nThe next day was exceedingly still and sultry, and with nothing\nspecial to engage them, the Pequod's crew could hardly resist the\nspell of sleep induced by such a vacant sea. For this part of the\nIndian Ocean through which we then were voyaging is not what whalemen\ncall a lively ground; that is, it affords fewer glimpses of porpoises,\ndolphins, flying-fish, and other vivacious denizens of more stirring\nwaters, than those off the Rio de la Plata, or the in-shore ground off\nPeru.\n\nIt was my turn to stand at the foremast-head; and with my shoulders\nleaning against the slackened royal shrouds, to and fro I idly swayed\nin what seemed an enchanted air. No resolution could withstand it; in\nthat dreamy mood losing all consciousness, at last my soul went out of\nmy body; though my body still continued to sway as a pendulum will,\nlong after the power which first moved it is withdrawn.\n\nEre forgetfulness altogether came over me, I had noticed that the\nseamen at the main and mizzen-mast-heads were already drowsy. So that\nat last all three of us lifelessly swung from the spars, and for every\nswing that we made there was a nod from below from the slumbering\nhelmsman. The waves, too, nodded their indolent crests; and across the\nwide trance of the sea, east nodded to west, and the sun over all.\n\nSuddenly bubbles seemed bursting beneath my closed eyes; like vices my\nhands grasped the shrouds; some invisible, gracious agency preserved\nme; with a shock I came back to life. And lo! close under our lee, not\nforty fathoms off, a gigantic Sperm Whale lay rolling in the water\nlike the capsized hull of a frigate, his broad, glossy back, of an\nEthiopian hue, glistening in the sun's rays like a mirror. But lazily\nundulating in the trough of the sea, and ever and anon tranquilly\nspouting his vapoury jet, the whale looked like a portly burgher\nsmoking his pipe of a warm afternoon. But that pipe, poor whale, was\nthy last. As if struck by some enchanter's wand, the sleepy ship and\nevery sleeper in it all at once started into wakefulness; and more\nthan a score of voices from all parts of the vessel, simultaneously\nwith the three notes from aloft, shouted forth the accustomed cry, as\nthe great fish slowly and regularly spouted the sparkling brine into\nthe air.\n\n\"Clear away the boats! Luff!\" cried Ahab. And obeying his own order,\nhe dashed the helm down before the helmsman could handle the spokes.\n\nThe sudden exclamations of the crew must have alarmed the whale; and\nere the boats were down, majestically turning, he swam away to the\nleeward, but with such a steady tranquillity, and making so few\nripples as he swam, that thinking after all he might not as yet be\nalarmed, Ahab gave orders that not an oar should be used, and no man\nmust speak but in whispers. So seated like Ontario Indians on the\ngunwales of the boats, we swiftly but silently paddled along; the calm\nnot admitting of the noiseless sails being set. Presently, as we thus\nglided in chase, the monster perpendicularly flitted his tail forty\nfeet into the air, and then sank out of sight like a tower swallowed\nup.\n\n\"There go flukes!\" was the cry, an announcement immediately followed\nby Stubb's producing his match and igniting his pipe, for now a\nrespite was granted. After the full interval of his sounding had\nelapsed, the whale rose again, and being now in advance of the\nsmoker's boat, and much nearer to it than to any of the others, Stubb\ncounted upon the honour of the capture. It was obvious, now, that the\nwhale had at length become aware of his pursuers. All silence of\ncautiousness was therefore no longer of use. Paddles were dropped, and\noars came loudly into play. And still puffing at his pipe, Stubb\ncheered on his crew to the assault.\n\nYes, a mighty change had come over the fish. All alive to his\njeopardy, he was going \"head out\"; that part obliquely projecting from\nthe mad yeast which he brewed.\n\n\"Start her, start her, my men! Don't hurry yourselves; take plenty of\ntime  but start her; start her like thunder-claps, that's all,\"\ncried Stubb, spluttering out the smoke as he spoke. \"Start her, now;\ngive 'em the long and strong stroke, Tashtego. Start her, Tash, my boy\n start her, all; but keep cool, keep cool  cucumbers is the word\n easy, easy  only start her like grim death and grinning devils,\nand raise the buried dead perpendicular out of their graves, boys \nthat's all. Start her!\"\n\n\"Woo-hoo! Wa-hee!\" screamed the Gay-Header in reply, raising some old\nwar-whoop to the skies; as every oarsman in the strained boat\ninvoluntarily bounced forward with the one tremendous leading stroke\nwhich the eager Indian gave.\n\nBut his wild screams were answered by others quite as wild. \"Kee-hee!\nKee-hee!\" yelled Daggoo, straining forwards and backwards on his seat,\nlike a pacing tiger in his cage.\n\n\"Ka-la! Koo-loo!\" howled Queequeg, as if smacking his lips over a\nmouthful of Grenadier's steak. And thus with oars and yells the keels\ncut the sea. Meanwhile, Stubb retaining his place in the van, still\nencouraged his men to the onset, all the while puffing the smoke from\nhis mouth. Like desperadoes they tugged and they strained, till the\nwelcome cry was heard  \"Stand up, Tashtego!  give it to him!\"\nThe harpoon was hurled. \"Stern all!\" The oarsmen backed water; the\nsame moment something went hot and hissing along every one of their\nwrists. It was the magical line. An instant before, Stubb had swiftly\ncaught two additional turns with it round the loggerhead, whence, by\nreason of its increased rapid circlings, a hempen blue smoke now\njetted up and mingled with the steady fumes from his pipe. As the line\npassed round and round the loggerhead; so also, just before reaching\nthat point, it blisteringly passed through and through both of Stubb's\nhands, from which the hand-cloths, or squares of quilted canvas\nsometimes worn at these times, had accidentally dropped. It was like\nholding an enemy's sharp two-edged sword by the blade, and that enemy\nall the time striving to wrest it out of your clutch.\n\n\"Wet the line! wet the line!\" cried Stubb to the tub oarsman (him\nseated by the tub) who, snatching off his hat, dashed sea-water into\nit. More turns were taken, so that the line began holding its\nplace. The boat now flew through the boiling water like a shark all\nfins. Stubb and Tashtego here changed places  stem for stern  a\nstaggering business truly in that rocking commotion.\n\nFrom the vibrating line extending the entire length of the upper part\nof the boat, and from its now being more tight than a harpstring, you\nwould have thought the craft had two keels  one cleaving the water,\nthe other the air  as the boat churned on through both opposing\nelements at once. A continual cascade played at the bows; a ceaseless\nwhirling eddy in her wake; and, at the slightest motion from within,\neven but of a little finger, the vibrating, cracking craft canted over\nher spasmodic gunwale into the sea. Thus they rushed; each man with\nmight and main clinging to his seat, to prevent being tossed to the\nfoam; and the tall form of Tashtego at the steering oar crouching\nalmost double, in order to bring down his centre of gravity. Whole\nAtlantics and Pacifics seemed passed as they shot on their way, till\nat length the whale somewhat slackened his flight.\n\n\"Haul in  haul in!\" cried Stubb to the bowsman! and, facing round\ntowards the whale, all hands began pulling the boat up to him, while\nyet the boat was being towed on. Soon ranging up by his flank, Stubb,\nfirmly planting his knee in the clumsy cleat, darted dart after dart\ninto the flying fish; at the word of command, the boat alternately\nsterning out of the way of the whale's horrible wallow, and then\nranging up for another fling.\n\nThe red tide now poured from all sides of the monster like brooks down\na hill. His tormented body rolled not in brine but in blood, which\nbubbled and seethed for furlongs behind in their wake. The slanting\nsun playing upon this crimson pond in the sea, sent back its\nreflection into every face, so that they all glowed to each other like\nred men. And all the while, jet after jet of white smoke was\nagonizingly shot from the spiracle of the whale, and vehement puff\nafter puff from the mouth of the excited headsman; as at every dart,\nhauling in upon his crooked lance (by the line attached to it), Stubb\nstraightened it again and again, by a few rapid blows against the\ngunwale, then again and again sent it into the whale.\n\n\"Pull up  pull up!\" he now cried to the bowsman, as the waning\nwhale relaxed in his wrath. \"Pull up!  close to!\" and the boat\nranged along the fish's flank. When reaching far over the bow, Stubb\nslowly churned his long sharp lance into the fish, and kept it there,\ncarefully churning and churning, as if cautiously seeking to feel\nafter some gold watch that the whale might have swallowed, and which\nhe was fearful of breaking ere he could hook it out. But that gold\nwatch he sought was the innermost life of the fish. And now it is\nstruck; for, starting from his trance into that unspeakable thing\ncalled his \"flurry,\" the monster horribly wallowed in his blood,\noverwrapped himself in impenetrable, mad, boiling spray, so that the\nimperilled craft, instantly dropping astern, had much ado blindly to\nstruggle out from that phrensied twilight into the clear air of the\nday.\n\nAnd now abating in his flurry, the whale once more rolled out into\nview; surging from side to side; spasmodically dilating and\ncontracting his spout-hole, with sharp, cracking, agonized\nrespirations. At last, gush after gush of clotted red gore, as if it\nhad been the purple lees of red wine, shot into the frighted air; and\nfalling back again, ran dripping down his motionless flanks into the\nsea. His heart had burst!\n\n\"He's dead, Mr. Stubb,\" said Daggoo.\n\n\"Yes; both pipes smoked out!\" and withdrawing his own from his mouth,\nStubb scattered the dead ashes over the water; and, for a moment,\nstood thoughtfully eyeing the vast corpse he had made.\n\n It will be seen in some other place of what a very light substance\nthe entire interior of the sperm whale's enormous head\nconsists. Though apparently the most massive, it is by far the most\nbuoyant part about him. So that with ease he elevates it in the air,\nand invariably does so when going at his utmost speed. Besides, such\nis the breadth of the upper part of the front of his head, and such\nthe tapering cut-water formation of the lower part, that by obliquely\nelevating his head, he thereby may be said to transform himself from a\nbluff-bowed sluggish galliot into a sharppointed New York pilot-boat.\n\n Partly to show the indispensableness of this act, it may here be\nstated, that, in the old Dutch fishery, a mop was used to dash the\nrunning line with water; in many other ships, a wooden piggin, or\nbailer, is set apart for that purpose. Your hat, however, is the most\nconvenient.\n\nCHAPTER 62 The Dart.\n\nA word concerning an incident in the last chapter.\n\nAccording to the invariable usage of the fishery, the whale-boat\npushes off from the ship, with the headsman or whale-killer as\ntemporary steersman, and the harpooneer or whale-fastener pulling the\nforemost oar, the one known as the harpooneer-oar. Now it needs a\nstrong, nervous arm to strike the first iron into the fish; for often,\nin what is called a long dart, the heavy implement has to be flung to\nthe distance of twenty or thirty feet. But however prolonged and\nexhausting the chase, the harpooneer is expected to pull his oar\nmeanwhile to the uttermost; indeed, he is expected to set an example\nof superhuman activity to the rest, not only by incredible rowing, but\nby repeated loud and intrepid exclamations; and what it is to keep\nshouting at the top of one's compass, while all the other muscles are\nstrained and half started  what that is none know but those who\nhave tried it. For one, I cannot bawl very heartily and work very\nrecklessly at one and the same time. In this straining, bawling state,\nthen, with his back to the fish, all at once the exhausted harpooneer\nhears the exciting cry  \"Stand up, and give it to him!\" He now has\nto drop and secure his oar, turn round on his centre half way, seize\nhis harpoon from the crotch, and with what little strength may remain,\nhe essays to pitch it somehow into the whale. No wonder, taking the\nwhole fleet of whalemen in a body, that out of fifty fair chances for\na dart, not five are successful; no wonder that so many hapless\nharpooneers are madly cursed and disrated; no wonder that some of them\nactually burst their blood-vessels in the boat; no wonder that some\nsperm whalemen are absent four years with four barrels; no wonder that\nto many ship owners, whaling is but a losing concern; for it is the\nharpooneer that makes the voyage, and if you take the breath out of\nhis body how can you expect to find it there when most wanted!\n\nAgain, if the dart be successful, then at the second critical instant,\nthat is, when the whale starts to run, the boatheader and harpooneer\nlikewise start to running fore and aft, to the imminent jeopardy of\nthemselves and every one else. It is then they change places; and the\nheadsman, the chief officer of the little craft, takes his proper\nstation in the bows of the boat.\n\nNow, I care not who maintains the contrary, but all this is both\nfoolish and unnecessary. The headsman should stay in the bows from\nfirst to last; he should both dart the harpoon and the lance, and no\nrowing whatever should be expected of him, except under circumstances\nobvious to any fisherman. I know that this would sometimes involve a\nslight loss of speed in the chase; but long experience in various\nwhalemen of more than one nation has convinced me that in the vast\nmajority of failures in the fishery, it has not by any means been so\nmuch the speed of the whale as the before described exhaustion of the\nharpooneer that has caused them.\n\nTo insure the greatest efficiency in the dart, the harpooneers of this\nworld must start to their feet from out of idleness, and not from out\nof toil.\n\nCHAPTER 63 The Crotch.\n\nOut of the trunk, the branches grow; out of them, the twigs. So, in\nproductive subjects, grow the chapters.\n\nThe crotch alluded to on a previous page deserves independent\nmention. It is a notched stick of a peculiar form, some two feet in\nlength, which is perpendicularly inserted into the starboard gunwale\nnear the bow, for the purpose of furnishing a rest for the wooden\nextremity of the harpoon, whose other naked, barbed end slopingly\nprojects from the prow. Thereby the weapon is instantly at hand to its\nhurler, who snatches it up as readily from its rest as a backwoodsman\nswings his rifle from the wall. It is customary to have two harpoons\nreposing in the crotch, respectively called the first and second\nirons.\n\nBut these two harpoons, each by its own cord, are both connected with\nthe line; the object being this: to dart them both, if possible, one\ninstantly after the other into the same whale; so that if, in the\ncoming drag, one should draw out, the other may still retain a\nhold. It is a doubling of the chances. But it very often happens that\nowing to the instantaneous, violent, convulsive running of the whale\nupon receiving the first iron, it becomes impossible for the\nharpooneer, however lightning-like in his movements, to pitch the\nsecond iron into him. Nevertheless, as the second iron is already\nconnected with the line, and the line is running, hence that weapon\nmust, at all events, be anticipatingly tossed out of the boat, somehow\nand somewhere; else the most terrible jeopardy would involve all\nhands. Tumbled into the water, it accordingly is in such cases; the\nspare coils of box line (mentioned in a preceding chapter) making this\nfeat, in most instances, prudently practicable. But this critical act\nis not always unattended with the saddest and most fatal casualties.\n\nFurthermore: you must know that when the second iron is thrown\noverboard, it thenceforth becomes a dangling, sharp-edged terror,\nskittishly curvetting about both boat and whale, entangling the lines,\nor cutting them, and making a prodigious sensation in all\ndirections. Nor, in general, is it possible to secure it again until\nthe whale is fairly captured and a corpse.\n\nConsider, now, how it must be in the case of four boats all engaging\none unusually strong, active, and knowing whale; when owing to these\nqualities in him, as well as to the thousand concurring accidents of\nsuch an audacious enterprise, eight or ten loose second irons may be\nsimultaneously dangling about him. For, of course, each boat is\nsupplied with several harpoons to bend on to the line should the first\none be ineffectually darted without recovery. All these particulars\nare faithfully narrated here, as they will not fail to elucidate\nseveral most important, however intricate passages, in scenes\nhereafter to be painted.\n\nCHAPTER 64 Stubb's Supper.\n\nStubb's whale had been killed some distance from the ship. It was a\ncalm; so, forming a tandem of three boats, we commenced the slow\nbusiness of towing the trophy to the Pequod. And now, as we eighteen\nmen with our thirty-six arms, and one hundred and eighty thumbs and\nfingers, slowly toiled hour after hour upon that inert, sluggish\ncorpse in the sea; and it seemed hardly to budge at all, except at\nlong intervals; good evidence was hereby furnished of the enormousness\nof the mass we moved. For, upon the great canal of Hang-Ho, or\nwhatever they call it, in China, four or five laborers on the\nfoot-path will draw a bulky freighted junk at the rate of a mile an\nhour; but this grand argosy we towed heavily forged along, as if laden\nwith pig-lead in bulk.\n\nDarkness came on; but three lights up and down in the Pequod's\nmain-rigging dimly guided our way; till drawing nearer we saw Ahab\ndropping one of several more lanterns over the bulwarks. Vacantly\neyeing the heaving whale for a moment, he issued the usual orders for\nsecuring it for the night, and then handing his lantern to a seaman,\nwent his way into the cabin, and did not come forward again until\nmorning.\n\nThough, in overseeing the pursuit of this whale, Captain Ahab had\nevinced his customary activity, to call it so; yet now that the\ncreature was dead, some vague dissatisfaction, or impatience, or\ndespair, seemed working in him; as if the sight of that dead body\nreminded him that Moby Dick was yet to be slain; and though a thousand\nother whales were brought to his ship, all that would not one jot\nadvance his grand, monomaniac object. Very soon you would have thought\nfrom the sound on the Pequod's decks, that all hands were preparing to\ncast anchor in the deep; for heavy chains are being dragged along the\ndeck, and thrust rattling out of the port-holes. But by those clanking\nlinks, the vast corpse itself, not the ship, is to be moored. Tied by\nthe head to the stern, and by the tail to the bows, the whale now lies\nwith its black hull close to the vessel's and seen through the\ndarkness of the night, which obscured the spars and rigging aloft, the\ntwo  ship and whale, seemed yoked together like colossal bullocks,\nwhereof one reclines while the other remains standing.\n\nIf moody Ahab was now all quiescence, at least so far as could be\nknown on deck, Stubb, his second mate, flushed with conquest, betrayed\nan unusual but still good-natured excitement. Such an unwonted bustle\nwas he in that the staid Starbuck, his official superior, quietly\nresigned to him for the time the sole management of affairs. One\nsmall, helping cause of all this liveliness in Stubb, was soon made\nstrangely manifest. Stubb was a high liver; he was somewhat\nintemperately fond of the whale as a flavorish thing to his palate.\n\n\"A steak, a steak, ere I sleep! You, Daggoo! overboard you go, and cut\nme one from his small!\"\n\nHere be it known, that though these wild fishermen do not, as a\ngeneral thing, and according to the great military maxim, make the\nenemy defray the current expenses of the war (at least before\nrealizing the proceeds of the voyage), yet now and then you find some\nof these Nantucketers who have a genuine relish for that particular\npart of the Sperm Whale designated by Stubb; comprising the tapering\nextremity of the body.\n\nAbout midnight that steak was cut and cooked; and lighted by two\nlanterns of sperm oil, Stubb stoutly stood up to his spermaceti supper\nat the capstan-head, as if that capstan were a sideboard. Nor was\nStubb the only banqueter on whale's flesh that night. Mingling their\nmumblings with his own mastications, thousands on thousands of sharks,\nswarming round the dead leviathan, smackingly feasted on its\nfatness. The few sleepers below in their bunks were often startled by\nthe sharp slapping of their tails against the hull, within a few\ninches of the sleepers' hearts. Peering over the side you could just\nsee them (as before you heard them) wallowing in the sullen, black\nwaters, and turning over on their backs as they scooped out huge\nglobular pieces of the whale of the bigness of a human head. This\nparticular feat of the shark seems all but miraculous. How at such an\napparently unassailable surface, they contrive to gouge out such\nsymmetrical mouthfuls, remains a part of the universal problem of all\nthings. The mark they thus leave on the whale, may best be likened to\nthe hollow made by a carpenter in countersinking for a screw.\n\nThough amid all the smoking horror and diabolism of a sea-fight,\nsharks will be seen longingly gazing up to the ship's decks, like\nhungry dogs round a table where red meat is being carved, ready to\nbolt down every killed man that is tossed to them; and though, while\nthe valiant butchers over the deck-table are thus cannibally carving\neach other's live meat with carving-knives all gilded and tasselled,\nthe sharks, also, with their jewel-hilted mouths, are quarrelsomely\ncarving away under the table at the dead meat; and though, were you to\nturn the whole affair upside down, it would still be pretty much the\nsame thing, that is to say, a shocking sharkish business enough for\nall parties; and though sharks also are the invariable outriders of\nall slave ships crossing the Atlantic, systematically trotting\nalongside, to be handy in case a parcel is to be carried anywhere, or\na dead slave to be decently buried; and though one or two other like\ninstances might be set down, touching the set terms, places, and\noccasions, when sharks do most socially congregate, and most\nhilariously feast; yet is there no conceivable time or occasion when\nyou will find them in such countless numbers, and in gayer or more\njovial spirits, than around a dead sperm whale, moored by night to a\nwhaleship at sea. If you have never seen that sight, then suspend your\ndecision about the propriety of devil-worship, and the expediency of\nconciliating the devil.\n\nBut, as yet, Stubb heeded not the mumblings of the banquet that was\ngoing on so nigh him, no more than the sharks heeded the smacking of\nhis own epicurean lips.\n\n\"Cook, cook!  where's that old Fleece?\" he cried at length,\nwidening his legs still further, as if to form a more secure base for\nhis supper; and, at the same time darting his fork into the dish, as\nif stabbing with his lance; \"cook, you cook!  sail this way, cook!\"\n\nThe old black, not in any very high glee at having been previously\nroused from his warm hammock at a most unseasonable hour, came\nshambling along from his galley, for, like many old blacks, there was\nsomething the matter with his knee-pans, which he did not keep well\nscoured like his other pans; this old Fleece, as they called him, came\nshuffling and limping along, assisting his step with his tongs, which,\nafter a clumsy fashion, were made of straightened iron hoops; this old\nEbony floundered along, and in obedience to the word of command, came\nto a dead stop on the opposite side of Stubb's sideboard; when, with\nboth hands folded before him, and resting on his two-legged cane, he\nbowed his arched back still further over, at the same time sideways\ninclining his head, so as to bring his best ear into play.\n\n\"Cook,\" said Stubb, rapidly lifting a rather reddish morsel to his\nmouth, \"don't you think this steak is rather overdone? You've been\nbeating this steak too much, cook; it's too tender. Don't I always say\nthat to be good, a whale-steak must be tough? There are those sharks\nnow over the side, don't you see they prefer it tough and rare? What a\nshindy they are kicking up! Cook, go and talk to 'em; tell 'em they\nare welcome to help themselves civilly, and in moderation, but they\nmust keep quiet. Blast me, if I can hear my own voice. Away, cook, and\ndeliver my message. Here, take this lantern,\" snatching one from his\nsideboard; \"now then, go and preach to 'em!\"\n\nSullenly taking the offered lantern, old Fleece limped across the deck\nto the bulwarks; and then, with one hand dropping his light low over\nthe sea, so as to get a good view of his congregation, with the other\nhand he solemnly flourished his tongs, and leaning far over the side\nin a mumbling voice began addressing the sharks, while Stubb, softly\ncrawling behind, overheard all that was said.\n\n\"Fellow-critters: I'se ordered here to say dat you must stop dat dam\nnoise dare. You hear? Stop dat dam smackin' ob de lips! Massa Stubb\nsay dat you can fill your dam bellies up to de hatchings, but by Gor!\nyou must stop dat dam racket!\"\n\n\"Cook,\" here interposed Stubb, accompanying the word with a sudden\nslap on the shoulder,  \"Cook! why, damn your eyes, you mustn't\nswear that way when you're preaching. That's no way to convert\nsinners, cook!\"\n\n\"Who dat? Den preach to him yourself,\" sullenly turning to go.\n\n\"No, cook; go on, go on.\"\n\n\"Well, den, Belubed fellow-critters:\"-\n\n\"Right!\" exclaimed Stubb, approvingly, \"coax 'em to it; try that,\" and\nFleece continued.\n\n\"Do you is all sharks, and by natur wery woracious, yet I zay to you,\nfellow-critters, dat dat woraciousness  'top dat dam slappin' ob de\ntail! How you tink to hear, spose you keep up such a dam slappin' and\nbitin' dare?\"\n\n\"Cook,\" cried Stubb, collaring him, \"I won't have that swearing. Talk\nto 'em gentlemanly.\"\n\nOnce more the sermon proceeded.\n\n\"Your woraciousness, fellow-critters, I don't blame ye so much for;\ndat is natur, and can't be helped; but to gobern dat wicked natur, dat\nis de pint. You is sharks, sartin; but if you gobern de shark in you,\nwhy den you be angel; for all angel is not'ing more dan de shark well\ngoberned. Now, look here, bred'ren, just try wonst to be cibil, a\nhelping yourselbs from dat whale. Don't be tearin' de blubber out your\nneighbour's mout, I say. Is not one shark dood right as toder to dat\nwhale? And, by Gor, none on you has de right to dat whale; dat whale\nbelong to some one else. I know some o' you has berry brig mout,\nbrigger dan oders; but den de brig mouts sometimes has de small\nbellies; so dat de brigness of de mout is not to swaller wid, but to\nbit off de blubber for de small fry ob sharks, dat can't get into de\nscrouge to help demselves.\"\n\n\"Well done, old Fleece!\" cried Stubb, \"that's Christianity; go on.\"\n\n\"No use goin' on; de dam willains will keep a scougin' and slappin'\neach oder, Massa Stubb; dey don't hear one word; no use a-preaching to\nsuch dam g'uttons as you call 'em, till dare bellies is full, and dare\nbellies is bottomless; and when dey do get 'em full, dey wont hear you\nden; for den dey sink in the sea, go fast to sleep on de coral, and\ncan't hear noting at all, no more, for eber and eber.\"\n\n\"Upon my soul, I am about of the same opinion; so give the\nbenediction, Fleece, and I'll away to my supper.\"\n\nUpon this, Fleece, holding both hands over the fishy mob, raised his\nshrill voice, and cried \n\n\"Cussed fellow-critters! Kick up de damndest row as ever you can; fill\nyour dam bellies 'till dey bust  and den die.\"\n\n\"Now, cook,\" said Stubb, resuming his supper at the capstan; \"stand\njust where you stood before, there, over against me, and pay\nparticular attention.\"\n\n\"All 'dention,\" said Fleece, again stooping over upon his tongs in the\ndesired position.\n\n\"Well,\" said Stubb, helping himself freely meanwhile; \"I shall now go\nback to the subject of this steak. In the first place, how old are\nyou, cook?\"\n\n\"What dat do wid de 'teak,\" said the old black, testily.\n\n\"Silence! How old are you, cook?\"\n\n\"'Bout ninety, dey say,\" he gloomily muttered.\n\n\"And you have lived in this world hard upon one hundred years, cook,\nand don't know yet how to cook a whale-steak?\" rapidly bolting another\nmouthful at the last word, so that morsel seemed a continuation of the\nquestion. \"Where were you born, cook?\"\n\n\"'Hind de hatchway, in ferry-boat, goin' ober de Roanoke.\"\n\n\"Born in a ferry-boat! That's queer, too. But I want to know what\ncountry you were born in, cook!\"\n\n\"Didn't I say de Roanoke country?\" he cried sharply.\n\n\"No, you didn't, cook; but I'll tell you what I'm coming to, cook. You\nmust go home and be born over again; you don't know how to cook a\nwhale-steak yet.\"\n\n\"Bress my soul, if I cook noder one,\" he growled, angrily, turning\nround to depart.\n\n\"Come back here, cook;  here, hand me those tongs;  now take\nthat bit of steak there, and tell me if you think that steak cooked as\nit should be? Take it, I say\"  holding the tongs towards him \n\"take it, and taste it.\"\n\nFaintly smacking his withered lips over it for a moment, the old negro\nmuttered, \"Best cooked 'teak I eber taste; joosy, berry joosy.\"\n\n\"Cook,\" said Stubb, squaring himself once more; \"do you belong to the\nchurch?\"\n\n\"Passed one once in Cape-Down,\" said the old man sullenly.\n\n\"And you have once in your life passed a holy church in Cape-Town,\nwhere you doubtless overheard a holy parson addressing his hearers as\nhis beloved fellow-creatures, have you, cook! And yet you come here,\nand tell me such a dreadful lie as you did just now, eh?\" said\nStubb. \"Where do you expect to go to, cook?\"\n\n\"Go to bed berry soon,\" he mumbled, half-turning as he spoke.\n\n\"Avast! heave to! I mean when you die, cook. It's an awful\nquestion. Now what's your answer?\"\n\n\"When dis old brack man dies,\" said the negro slowly, changing his\nwhole air and demeanor, \"he hisself won't go nowhere; but some bressed\nangel will come and fetch him.\"\n\n\"Fetch him? How? In a coach and four, as they fetched Elijah? And\nfetch him where?\"\n\n\"Up dere,\" said Fleece, holding his tongs straight over his head, and\nkeeping it there very solemnly.\n\n\"So, then, you expect to go up into our main-top, do you, cook, when\nyou are dead? But don't you know the higher you climb, the colder it\ngets? Main-top, eh?\"\n\n\"Didn't say dat t'all,\" said Fleece, again in the sulks.\n\n\"You said up there, didn't you? and now look yourself, and see where\nyour tongs are pointing. But, perhaps you expect to get into heaven by\ncrawling through the lubber's hole, cook; but, no, no, cook, you don't\nget there, except you go the regular way, round by the rigging. It's a\nticklish business, but must be done, or else it's no go. But none of\nus are in heaven yet. Drop your tongs, cook, and hear my orders. Do ye\nhear? Hold your hat in one hand, and clap t'other a'top of your heart,\nwhen I'm giving my orders, cook. What! that your heart, there? \nthat's your gizzard! Aloft! aloft!  that's it  now you have\nit. Hold it there now, and pay attention.\"\n\n\"All 'dention,\" said the old black, with both hands placed as desired,\nvainly wriggling his grizzled head, as if to get both ears in front at\none and the same time.\n\n\"Well then, cook, you see this whale-steak of yours was so very bad,\nthat I have put it out of sight as soon as possible; you see that,\ndon't you? Well, for the future, when you cook another whale-steak for\nmy private table here, the capstan, I'll tell you what to do so as not\nto spoil it by overdoing. Hold the steak in one hand, and show a live\ncoal to it with the other; that done, dish it; d'ye hear? And now\nto-morrow, cook, when we are cutting in the fish, be sure you stand by\nto get the tips of his fins; have them put in pickle. As for the ends\nof the flukes, have them soused, cook. There, now ye may go.\"\n\nBut Fleece had hardly got three paces off, when he was recalled.\n\n\"Cook, give me cutlets for supper to-morrow night in the\nmid-watch. D'ye hear? away you sail, then.  Halloa! stop! make a\nbow before you go.  Avast heaving again! Whale-balls for breakfast\n don't forget.\"\n\n\"Wish, by gor! whale eat him, 'stead of him eat whale. I'm bressed if\nhe ain't more of shark dan Massa Shark hisself,\" muttered the old man,\nlimping away; with which sage ejaculation he went to his hammock.\n\n A little item may as well be related here. The strongest and most\nreliable hold which the ship has upon the whale when moored alongside,\nis by the flukes or tail; and as from its greater density that part is\nrelatively heavier than any other (excepting the side-fins), its\nflexibility even in death, causes it to sink low beneath the surface;\nso that with the hand you cannot get at it from the boat, in order to\nput the chain round it. But this difficulty is ingeniously overcome: a\nsmall, strong line is prepared with a wooden float at its outer end,\nand a weight in its middle, while the other end is secured to the\nship. By adroit management the wooden float is made to rise on the\nother side of the mass, so that now having girdled the whale, the\nchain is readily made to follow suit; and being slipped along the\nbody, is at last locked fast round the smallest part of the tail, at\nthe point of junction with its broad flukes or lobes.\n\nCHAPTER 65 The Whale as a Dish.\n\nThat mortal man should feed upon the creature that feeds his lamp,\nand, like Stubb, eat him by his own light, as you may say; this seems\nso outlandish a thing that one must needs go a little into the history\nand philosophy of it.\n\nIt is upon record, that three centuries ago the tongue of the Right\nWhale was esteemed a great delicacy in France, and commanded large\nprices there. Also, that in Henry VIIIth's time, a certain cook of the\ncourt obtained a handsome reward for inventing an admirable sauce to\nbe eaten with barbacued porpoises, which, you remember, are a species\nof whale. Porpoises, indeed, are to this day considered fine\neating. The meat is made into balls about the size of billiard balls,\nand being well seasoned and spiced might be taken for turtle-balls or\nveal balls. The old monks of Dunfermline were very fond of them. They\nhad a great porpoise grant from the crown.\n\nThe fact is, that among his hunters at least, the whale would by all\nhands be considered a noble dish, were there not so much of him; but\nwhen you come to sit down before a meat-pie nearly one hundred feet\nlong, it takes away your appetite. Only the most unprejudiced of men\nlike Stubb, nowadays partake of cooked whales; but the Esquimaux are\nnot so fastidious. We all know how they live upon whales, and have\nrare old vintages of prime old train oil. Zogranda, one of their most\nfamous doctors, recommends strips of blubber for infants, as being\nexceedingly juicy and nourishing. And this reminds me that certain\nEnglishmen, who long ago were accidentally left in Greenland by a\nwhaling vessel  that these men actually lived for several months on\nthe mouldy scraps of whales which had been left ashore after trying\nout the blubber. Among the Dutch whalemen these scraps are called\n\"fritters\"; which, indeed, they greatly resemble, being brown and\ncrisp, and smelling something like old Amsterdam housewives'\ndough-nuts or oly-cooks, when fresh. They have such an eatable look\nthat the most self-denying stranger can hardly keep his hands off.\n\nBut what further depreciates the whale as a civilized dish, is his\nexceeding richness. He is the great prize ox of the sea, too fat to be\ndelicately good. Look at his hump, which would be as fine eating as\nthe buffalo's (which is esteemed a rare dish), were it not such a\nsolid pyramid of fat. But the spermaceti itself, how bland and creamy\nthat is; like the transparent, half-jellied, white meat of a cocoanut\nin the third month of its growth, yet far too rich to supply a\nsubstitute for butter. Nevertheless, many whalemen have a method of\nabsorbing it into some other substance, and then partaking of it. In\nthe long try watches of the night it is a common thing for the seamen\nto dip their ship-biscuit into the huge oil-pots and let them fry\nthere awhile. Many a good supper have I thus made.\n\nIn the case of a small Sperm Whale the brains are accounted a fine\ndish. The casket of the skull is broken into with an axe, and the two\nplump, whitish lobes being withdrawn (precisely resembling two large\npuddings), they are then mixed with flour, and cooked into a most\ndelectable mess, in flavor somewhat resembling calves' head, which is\nquite a dish among some epicures; and every one knows that some young\nbucks among the epicures, by continually dining upon calves' brains,\nby and by get to have a little brains of their own, so as to be able\nto tell a calf's head from their own heads; which, indeed, requires\nuncommon discrimination. And that is the reason why a young buck with\nan intelligent looking calf's head before him, is somehow one of the\nsaddest sights you can see. The head looks a sort of reproachfully at\nhim, with an \"Et tu Brute!\" expression.\n\nIt is not, perhaps, entirely because the whale is so excessively\nunctuous that landsmen seem to regard the eating of him with\nabhorrence; that appears to result, in some way, from the\nconsideration before mentioned: i.e. that a man should eat a newly\nmurdered thing of the sea, and eat it too by its own light. But no\ndoubt the first man that ever murdered an ox was regarded as a\nmurderer; perhaps he was hung; and if he had been put on his trial by\noxen, he certainly would have been; and he certainly deserved it if\nany murderer does. Go to the meat-market of a Saturday night and see\nthe crowds of live bipeds staring up at the long rows of dead\nquadrupeds. Does not that sight take a tooth out of the cannibal's\njaw? Cannibals? who is not a cannibal? I tell you it will be more\ntolerable for the Fejee that salted down a lean missionary in his\ncellar against a coming famine; it will be more tolerable for that\nprovident Fejee, I say, in the day of judgment, than for thee,\ncivilized and enlightened gourmand, who nailest geese to the ground\nand feastest on their bloated livers in thy pate-de-foie-gras.\n\nBut Stubb, he eats the whale by its own light, does he? and that is\nadding insult to injury, is it? Look at your knife-handle, there, my\ncivilized and enlightened gourmand dining off that roast beef, what is\nthat handle made of?  what but the bones of the brother of the very\nox you are eating? And what do you pick your teeth with, after\ndevouring that fat goose? With a feather of the same fowl. And with\nwhat quill did the Secretary of the Society for the Suppression of\nCruelty to Ganders formally indite his circulars? It is only within\nthe last month or two that that society passed a resolution to\npatronise nothing but steel pens.\n\nCHAPTER 66 The Shark Massacre.\n\nWhen in the Southern Fishery, a captured Sperm Whale, after long and\nweary toil, is brought alongside late at night, it is not, as a\ngeneral thing at least, customary to proceed at once to the business\nof cutting him in. For that business is an exceedingly laborious one;\nis not very soon completed; and requires all hands to set about\nit. Therefore, the common usage is to take in all sail; lash the helm\na'lee; and then send every one below to his hammock till daylight,\nwith the reservation that, until that time, anchor-watches shall be\nkept; that is, two and two for an hour, each couple, the crew in\nrotation shall mount the deck to see that all goes well.\n\nBut sometimes, especially upon the Line in the Pacific, this plan will\nnot answer at all; because such incalculable hosts of sharks gather\nround the moored carcase, that were he left so for six hours, say, on\na stretch, little more than the skeleton would be visible by\nmorning. In most other parts of the ocean, however, where these fish\ndo not so largely abound, their wondrous voracity can be at times\nconsiderably diminished, by vigorously stirring them up with sharp\nwhaling-spades, a procedure notwithstanding, which, in some instances,\nonly seems to tickle them into still greater activity. But it was not\nthus in the present case with the Pequod's sharks; though, to be sure,\nany man unaccustomed to such sights, to have looked over her side that\nnight, would have almost thought the whole round sea was one huge\ncheese, and those sharks the maggots in it.\n\nNevertheless, upon Stubb setting the anchor-watch after his supper was\nconcluded; and when, accordingly, Queequeg and a forecastle seaman\ncame on deck, no small excitement was created among the sharks; for\nimmediately suspending the cutting stages over the side, and lowering\nthree lanterns, so that they cast long gleams of light over the turbid\nsea, these two mariners, darting their long whaling-spades, kept up an\nincessant murdering of the sharks, by striking the keen steel deep\ninto their skulls, seemingly their only vital part. But in the foamy\nconfusion of their mixed and struggling hosts, the marksmen could not\nalways hit their mark; and this brought about new revelations of the\nincredible ferocity of the foe. They viciously snapped, not only at\neach other's disembowelments, but like flexible bows, bent round, and\nbit their own; till those entrails seemed swallowed over and over\nagain by the same mouth, to be oppositely voided by the gaping\nwound. Nor was this all. It was unsafe to meddle with the corpses and\nghosts of these creatures. A sort of generic or Pantheistic vitality\nseemed to lurk in their very joints and bones, after what might be\ncalled the individual life had departed. Killed and hoisted on deck\nfor the sake of his skin, one of these sharks almost took poor\nQueequeg's hand off, when he tried to shut down the dead lid of his\nmurderous jaw.\n\n\"Queequeg no care what god made him shark,\" said the savage,\nagonizingly lifting his hand up and down; \"wedder Fejee god or\nNantucket god; but de god wat made shark must be one dam Ingin.\"\n\n The whaling-spade used for cutting-in is made of the very best\nsteel; is about the bigness of a man's spread hand; and in general\nshape, corresponds to the garden implement after which it is named;\nonly its sides are perfectly flat, and its upper end considerably\nnarrower than the lower. This weapon is always kept as sharp as\npossible; and when being used is occasionally honed, just like a\nrazor. In its socket, a stiff pole, from twenty to thirty feet long,\nis inserted for a handle.\n\nCHAPTER 67 Cutting In.\n\nIt was a Saturday night, and such a Sabbath as followed! Ex officio\nprofessors of Sabbath breaking are all whalemen. The ivory Pequod was\nturned into what seemed a shamble; every sailor a butcher. You would\nhave thought we were offering up ten thousand red oxen to the sea\ngods.\n\nIn the first place, the enormous cutting tackles, among other\nponderous things comprising a cluster of blocks generally painted\ngreen, and which no single man can possibly lift  this vast bunch\nof grapes was swayed up to the main-top and firmly lashed to the lower\nmast-head, the strongest point anywhere above a ship's deck. The end\nof the hawser-like rope winding through these intricacies, was then\nconducted to the windlass, and the huge lower block of the tackles was\nswung over the whale; to this block the great blubber hook, weighing\nsome one hundred pounds, was attached. And now suspended in stages\nover the side, Starbuck and Stubb, the mates, armed with their long\nspades, began cutting a hole in the body for the insertion of the hook\njust above the nearest of the two side-fins. This done, a broad,\nsemicircular line is cut round the hole, the hook is inserted, and the\nmain body of the crew striking up a wild chorus, now commence heaving\nin one dense crowd at the windlass. When instantly, the entire ship\ncareens over on her side; every bolt in her starts like the nail-heads\nof an old house in frosty weather; she trembles, quivers, and nods her\nfrighted mast-heads to the sky. More and more she leans over to the\nwhale, while every gasping heave of the windlass is answered by a\nhelping heave from the billows; till at last, a swift, startling snap\nis heard; with a great swash the ship rolls upwards and backwards from\nthe whale, and the triumphant tackle rises into sight dragging after\nit the disengaged semicircular end of the first strip of blubber. Now\nas the blubber envelopes the whale precisely as the rind does an\norange, so is it stripped off from the body precisely as an orange is\nsometimes stripped by spiralizing it. For the strain constantly kept\nup by the windlass continually keeps the whale rolling over and over\nin the water, and as the blubber in one strip uniformly peels off\nalong the line called the \"scarf,\" simultaneously cut by the spades of\nStarbuck and Stubb, the mates; and just as fast as it is thus peeled\noff, and indeed by that very act itself, it is all the time being\nhoisted higher and higher aloft till its upper end grazes the\nmain-top; the men at the windlass then cease heaving, and for a moment\nor two the prodigious blood-dripping mass sways to and fro as if let\ndown from the sky, and every one present must take good heed to dodge\nit when it swings, else it may box his ears and pitch him headlong\noverboard.\n\nOne of the attending harpooneers now advances with a long, keen weapon\ncalled a boarding-sword, and watching his chance he dexterously slices\nout a considerable hole in the lower part of the swaying mass. Into\nthis hole, the end of the second alternating great tackle is then\nhooked so as to retain a hold upon the blubber, in order to prepare\nfor what follows. Whereupon, this accomplished swordsman, warning all\nhands to stand off, once more makes a scientific dash at the mass, and\nwith a few sidelong, desperate, lunging slicings, severs it completely\nin twain; so that while the short lower part is still fast, the long\nupper strip, called a blanket-piece, swings clear, and is all ready\nfor lowering. The heavers forward now resume their song, and while the\none tackle is peeling and hoisting a second strip from the whale, the\nother is slowly slackened away, and down goes the first strip through\nthe main hatchway right beneath, into an unfurnished parlor called the\nblubber-room. Into this twilight apartment sundry nimble hands keep\ncoiling away the long blanket-piece as if it were a great live mass of\nplaited serpents. And thus the work proceeds; the two tackles hoisting\nand lowering simultaneously; both whale and windlass heaving, the\nheavers singing, the blubber-room gentlemen coiling, the mates\nscarfing, the ship straining, and all hands swearing occasionally, by\nway of assuaging the general friction.\n\nCHAPTER 68 The Blanket.\n\nI have given no small attention to that not unvexed subject, the skin\nof the whale. I have had controversies about it with experienced\nwhalemen afloat, and learned naturalists ashore. My original opinion\nremains unchanged; but it is only an opinion.\n\nThe question is, what and where is the skin of the whale? Already you\nknow what his blubber is. That blubber is something of the consistence\nof firm, close-grained beef, but tougher, more elastic and compact,\nand ranges from eight or ten to twelve and fifteen inches in\nthickness.\n\nNow, however preposterous it may at first seem to talk of any\ncreature's skin as being of that sort of consistence and thickness,\nyet in point of fact these are no arguments against such a\npresumption; because you cannot raise any other dense enveloping layer\nfrom the whale's body but that same blubber; and the outermost\nenveloping layer of any animal, if reasonably dense, what can that be\nbut the skin? True, from the unmarred dead body of the whale, you may\nscrape off with your hand an infinitely thin, transparent substance,\nsomewhat resembling the thinnest shreds of isinglass, only it is\nalmost as flexible and soft as satin; that is, previous to being\ndried, when it not only contracts and thickens, but becomes rather\nhard and brittle. I have several such dried bits, which I use for\nmarks in my whale-books. It is transparent, as I said before; and\nbeing laid upon the printed page, I have sometimes pleased myself with\nfancying it exerted a magnifying influence. At any rate, it is\npleasant to read about whales through their own spectacles, as you may\nsay. But what I am driving at here is this. That same infinitely thin,\nisinglass substance, which, I admit, invests the entire body of the\nwhale, is not so much to be regarded as the skin of the creature, as\nthe skin of the skin, so to speak; for it were simply ridiculous to\nsay, that the proper skin of the tremendous whale is thinner and more\ntender than the skin of a new-born child. But no more of this.\n\nAssuming the blubber to be the skin of the whale; then, when this\nskin, as in the case of a very large Sperm Whale, will yield the bulk\nof one hundred barrels of oil; and, when it is considered that, in\nquantity, or rather weight, that oil, in its expressed state, is only\nthree fourths, and not the entire substance of the coat; some idea may\nhence be had of the enormousness of that animated mass, a mere part of\nwhose mere integument yields such a lake of liquid as that. Reckoning\nten barrels to the ton, you have ten tons for the net weight of only\nthree quarters of the stuff of the whale's skin.\n\nIn life, the visible surface of the Sperm Whale is not the least among\nthe many marvels he presents. Almost invariably it is all over\nobliquely crossed and re-crossed with numberless straight marks in\nthick array, something like those in the finest Italian line\nengravings. But these marks do not seem to be impressed upon the\nisinglass substance above mentioned, but seem to be seen through it,\nas if they were engraved upon the body itself. Nor is this all. In\nsome instances, to the quick, observant eye, those linear marks, as in\na veritable engraving, but afford the ground for far other\ndelineations. These are hieroglyphical; that is, if you call those\nmysterious cyphers on the walls of pyramids hieroglyphics, then that\nis the proper word to use in the present connexion. By my retentive\nmemory of the hieroglyphics upon one Sperm Whale in particular, I was\nmuch struck with a plate representing the old Indian characters\nchiselled on the famous hieroglyphic palisades on the banks of the\nUpper Mississippi. Like those mystic rocks, too, the mystic-marked\nwhale remains undecipherable. This allusion to the Indian rocks\nreminds me of another thing. Besides all the other phenomena which the\nexterior of the Sperm Whale presents, he not seldom displays the back,\nand more especially his flanks, effaced in great part of the regular\nlinear appearance, by reason of numerous rude scratches, altogether of\nan irregular, random aspect. I should say that those New England rocks\non the sea-coast, which Agassiz imagines to bear the marks of violent\nscraping contact with vast floating icebergs  I should say, that\nthose rocks must not a little resemble the Sperm Whale in this\nparticular. It also seems to me that such scratches in the whale are\nprobably made by hostile contact with other whales; for I have most\nremarked them in the large, full-grown bulls of the species.\n\nA word or two more concerning this matter of the skin or blubber of\nthe whale. It has already been said, that it is stript from him in\nlong pieces, called blanket-pieces. Like most sea-terms, this one is\nvery happy and significant. For the whale is indeed wrapt up in his\nblubber as in a real blanket or counterpane; or, still better, an\nIndian poncho slipt over his head, and skirting his extremity. It is\nby reason of this cosy blanketing of his body, that the whale is\nenabled to keep himself comfortable in all weathers, in all seas,\ntimes, and tides. What would become of a Greenland whale, say, in\nthose shuddering, icy seas of the North, if unsupplied with his cosy\nsurtout? True, other fish are found exceedingly brisk in those\nHyperborean waters; but these, be it observed, are your cold-blooded,\nlungless fish, whose very bellies are refrigerators; creatures, that\nwarm themselves under the lee of an iceberg, as a traveller in winter\nwould bask before an inn fire; whereas, like man, the whale has lungs\nand warm blood. Freeze his blood, and he dies. How wonderful is it\nthen  except after explanation  that this great monster, to whom\ncorporeal warmth is as indispensable as it is to man; how wonderful\nthat he should be found at home, immersed to his lips for life in\nthose Arctic waters! where, when seamen fall overboard, they are\nsometimes found, months afterwards, perpendicularly frozen into the\nhearts of fields of ice, as a fly is found glued in amber. But more\nsurprising is it to know, as has been proved by experiment, that the\nblood of a Polar whale is warmer than that of a Borneo negro in\nsummer.\n\nIt does seem to me, that herein we see the rare virtue of a strong\nindividual vitality, and the rare virtue of thick walls, and the rare\nvirtue of interior spaciousness. Oh, man! admire and model thyself\nafter the whale! Do thou, too, remain warm among ice. Do thou, too,\nlive in this world without being of it. Be cool at the equator; keep\nthy blood fluid at the Pole. Like the great dome of St. Peter's, and\nlike the great whale, retain, O man! in all seasons a temperature of\nthine own.\n\nBut how easy and how hopeless to teach these fine things! Of\nerections, how few are domed like St. Peter's! of creatures, how few\nvast as the whale!\n\nCHAPTER 69 The Funeral.\n\nHaul in the chains! Let the carcase go astern! The vast tackles have\nnow done their duty. The peeled white body of the beheaded whale\nflashes like a marble sepulchre; though changed in hue, it has not\nperceptibly lost anything in bulk. It is still colossal. Slowly it\nfloats more and more away, the water round it torn and splashed by the\ninsatiate sharks, and the air above vexed with rapacious flights of\nscreaming fowls, whose beaks are like so many insulting poniards in\nthe whale. The vast white headless phantom floats further and further\nfrom the ship, and every rod that it so floats, what seem square roods\nof sharks and cubic roods of fowls, augment the murderous din. For\nhours and hours from the almost stationary ship that hideous sight is\nseen. Beneath the unclouded and mild azure sky, upon the fair face of\nthe pleasant sea, wafted by the joyous breezes, that great mass of\ndeath floats on and on, till lost in infinite perspectives.\n\nThere's a most doleful and most mocking funeral! The sea-vultures all\nin pious mourning, the air-sharks all punctiliously in black or\nspeckled. In life but few of them would have helped the whale, I ween,\nif peradventure he had needed it; but upon the banquet of his funeral\nthey most piously do pounce. Oh, horrible vultureism of earth! from\nwhich not the mightiest whale is free.\n\nNor is this the end. Desecrated as the body is, a vengeful ghost\nsurvives and hovers over it to scare. Espied by some timid man-of-war\nor blundering discovery-vessel from afar, when the distance obscuring\nthe swarming fowls, nevertheless still shows the white mass floating\nin the sun, and the white spray heaving high against it; straightway\nthe whale's unharming corpse, with trembling fingers is set down in\nthe log  shoals, rocks, and breakers hereabouts: beware! And for\nyears afterwards, perhaps, ships shun the place; leaping over it as\nsilly sheep leap over a vacuum, because their leader originally leaped\nthere when a stick was held. There's your law of precedents; there's\nyour utility of traditions; there's the story of your obstinate\nsurvival of old beliefs never bottomed on the earth, and now not even\nhovering in the air! There's orthodoxy!\n\nThus, while in life the great whale's body may have been a real terror\nto his foes, in his death his ghost becomes a powerless panic to a\nworld.\n\nAre you a believer in ghosts, my friend? There are other ghosts than\nthe Cock-Lane one, and far deeper men than Doctor Johnson who believe\nin them.\n\nCHAPTER 70 The Sphynx.\n\nIt should not have been omitted that previous to completely stripping\nthe body of the leviathan, he was beheaded. Now, the beheading of the\nSperm Whale is a scientific anatomical feat, upon which experienced\nwhale surgeons very much pride themselves: and not without reason.\n\nConsider that the whale has nothing that can properly be called a\nneck; on the contrary, where his head and body seem to join, there, in\nthat very place, is the thickest part of him. Remember, also, that the\nsurgeon must operate from above, some eight or ten feet intervening\nbetween him and his subject, and that subject almost hidden in a\ndiscoloured, rolling, and oftentimes tumultuous and bursting sea. Bear\nin mind, too, that under these untoward circumstances he has to cut\nmany feet deep in the flesh; and in that subterraneous manner, without\nso much as getting one single peep into the ever-contracting gash thus\nmade, he must skilfully steer clear of all adjacent, interdicted\nparts, and exactly divide the spine at a critical point hard by its\ninsertion into the skull. Do you not marvel, then, at Stubb's boast,\nthat he demanded but ten minutes to behead a sperm whale?\n\nWhen first severed, the head is dropped astern and held there by a\ncable till the body is stripped. That done, if it belong to a small\nwhale it is hoisted on deck to be deliberately disposed of. But, with\na full grown leviathan this is impossible; for the sperm whale's head\nembraces nearly one third of his entire bulk, and completely to\nsuspend such a burden as that, even by the immense tackles of a\nwhaler, this were as vain a thing as to attempt weighing a Dutch barn\nin jewellers' scales.\n\nThe Pequod's whale being decapitated and the body stripped, the head\nwas hoisted against the ship's side  about half way out of the sea,\nso that it might yet in great part be buoyed up by its native\nelement. And there with the strained craft steeply leaning over to it,\nby reason of the enormous downward drag from the lower mast-head, and\nevery yard-arm on that side projecting like a crane over the waves;\nthere, that blood-dripping head hung to the Pequod's waist like the\ngiant Holofernes's from the girdle of Judith.\n\nWhen this last task was accomplished it was noon, and the seamen went\nbelow to their dinner. Silence reigned over the before tumultuous but\nnow deserted deck. An intense copper calm, like a universal yellow\nlotus, was more and more unfolding its noiseless measureless leaves\nupon the sea.\n\nA short space elapsed, and up into this noiselessness came Ahab alone\nfrom his cabin. Taking a few turns on the quarter-deck, he paused to\ngaze over the side, then slowly getting into the main-chains he took\nStubb's long spade  still remaining there after the whale's\nDecapitation  and striking it into the lower part of the\nhalf-suspended mass, placed its other end crutch-wise under one arm,\nand so stood leaning over with eyes attentively fixed on this head.\n\nIt was a black and hooded head; and hanging there in the midst of so\nintense a calm, it seemed the Sphynx's in the desert. \"Speak, thou\nvast and venerable head,\" muttered Ahab, \"which, though ungarnished\nwith a beard, yet here and there lookest hoary with mosses; speak,\nmighty head, and tell us the secret thing that is in thee. Of all\ndivers, thou hast dived the deepest. That head upon which the upper\nsun now gleams, has moved amid this world's foundations. Where\nunrecorded names and navies rust, and untold hopes and anchors rot;\nwhere in her murderous hold this frigate earth is ballasted with bones\nof millions of the drowned; there, in that awful water-land, there was\nthy most familiar home. Thou hast been where bell or diver never went;\nhast slept by many a sailor's side, where sleepless mothers would give\ntheir lives to lay them down. Thou saw'st the locked lovers when\nleaping from their flaming ship; heart to heart they sank beneath the\nexulting wave; true to each other, when heaven seemed false to\nthem. Thou saw'st the murdered mate when tossed by pirates from the\nmidnight deck; for hours he fell into the deeper midnight of the\ninsatiate maw; and his murderers still sailed on unharmed  while\nswift lightnings shivered the neighboring ship that would have borne a\nrighteous husband to outstretched, longing arms. O head! thou hast\nseen enough to split the planets and make an infidel of Abraham, and\nnot one syllable is thine!\"\n\n\"Sail ho!\" cried a triumphant voice from the main-mast-head.\n\n\"Aye? Well, now, that's cheering,\" cried Ahab, suddenly erecting\nhimself, while whole thunder-clouds swept aside from his brow. \"That\nlively cry upon this deadly calm might almost convert a better\nman.  Where away?\"\n\n\"Three points on the starboard bow, sir, and bringing down her breeze\nto us!\n\n\"Better and better, man. Would now St. Paul would come along that way,\nand to my breezelessness bring his breeze! O Nature, and O soul of\nman! how far beyond all utterance are your linked analogies! not the\nsmallest atom stirs or lives on matter, but has its cunning duplicate\nin mind.\"\n\nCHAPTER 71 The Jeroboam's Story.\n\nHand in hand, ship and breeze blew on; but the breeze came faster than\nthe ship, and soon the Pequod began to rock.\n\nBy and by, through the glass the stranger's boats and manned\nmast-heads proved her a whale-ship. But as she was so far to windward,\nand shooting by, apparently making a passage to some other ground, the\nPequod could not hope to reach her. So the signal was set to see what\nresponse would be made.\n\nHere be it said, that like the vessels of military marines, the ships\nof the American Whale Fleet have each a private signal; all which\nsignals being collected in a book with the names of the respective\nvessels attached, every captain is provided with it. Thereby, the\nwhale commanders are enabled to recognise each other upon the ocean,\neven at considerable distances and with no small facility.\n\nThe Pequod's signal was at last responded to by the stranger's setting\nher own; which proved the ship to be the Jeroboam of\nNantucket. Squaring her yards, she bore down, ranged abeam under the\nPequod's lee, and lowered a boat; it soon drew nigh; but, as the\nside-ladder was being rigged by Starbuck's order to accommodate the\nvisiting captain, the stranger in question waved his hand from his\nboat's stern in token of that proceeding being entirely\nunnecessary. It turned out that the Jeroboam had a malignant epidemic\non board, and that Mayhew, her captain, was fearful of infecting the\nPequod's company. For, though himself and boat's crew remained\nuntainted, and though his ship was half a rifle-shot off, and an\nincorruptible sea and air rolling and flowing between; yet\nconscientiously adhering to the timid quarantine of the land, he\nperemptorily refused to come into direct contact with the Pequod.\n\nBut this did by no means prevent all communications. Preserving an\ninterval of some few yards between itself and the ship, the Jeroboam's\nboat by the occasional use of its oars contrived to keep parallel to\nthe Pequod, as she heavily forged through the sea (for by this time it\nblew very fresh), with her main-topsail aback; though, indeed, at\ntimes by the sudden onset of a large rolling wave, the boat would be\npushed some way ahead; but would be soon skilfully brought to her\nproper bearings again. Subject to this, and other the like\ninterruptions now and then, a conversation was sustained between the\ntwo parties; but at intervals not without still another interruption\nof a very different sort.\n\nPulling an oar in the Jeroboam's boat, was a man of a singular\nappearance, even in that wild whaling life where individual\nnotabilities make up all totalities. He was a small, short, youngish\nman, sprinkled all over his face with freckles, and wearing redundant\nyellow hair. A long-skirted, cabalistically-cut coat of a faded walnut\ntinge enveloped him; the overlapping sleeves of which were rolled up\non his wrists. A deep, settled, fanatic delirium was in his eyes.\n\nSo soon as this figure had been first descried, Stubb had exclaimed\n \"That's he! that's he!  the long-togged scaramouch the\nTown-Ho's company told us of!\" Stubb here alluded to a strange story\ntold of the Jeroboam, and a certain man among her crew, some time\nprevious when the Pequod spoke the Town-Ho. According to this account\nand what was subsequently learned, it seemed that the scaramouch in\nquestion had gained a wonderful ascendency over almost everybody in\nthe Jeroboam. His story was this:\n\nHe had been originally nurtured among the crazy society of Neskyeuna\nShakers, where he had been a great prophet; in their cracked, secret\nmeetings having several times descended from heaven by the way of a\ntrap-door, announcing the speedy opening of the seventh vial, which he\ncarried in his vest-pocket; but, which, instead of containing\ngunpowder, was supposed to be charged with laudanum. A strange,\napostolic whim having seized him, he had left Neskyeuna for Nantucket,\nwhere, with that cunning peculiar to craziness, he assumed a steady,\ncommon-sense exterior, and offered himself as a green-hand candidate\nfor the Jeroboam's whaling voyage. They engaged him; but straightway\nupon the ship's getting out of sight of land, his insanity broke out\nin a freshet. He announced himself as the archangel Gabriel, and\ncommanded the captain to jump overboard. He published his manifesto,\nwhereby he set himself forth as the deliverer of the isles of the sea\nand vicar-general of all Oceanica. The unflinching earnestness with\nwhich he declared these things;  the dark, daring play of his\nsleepless, excited imagination, and all the preternatural terrors of\nreal delirium, united to invest this Gabriel in the minds of the\nmajority of the ignorant crew, with an atmosphere of\nsacredness. Moreover, they were afraid of him. As such a man, however,\nwas not of much practical use in the ship, especially as he refused to\nwork except when he pleased, the incredulous captain would fain have\nbeen rid of him; but apprised that that individual's intention was to\nland him in the first convenient port, the archangel forthwith opened\nall his seals and vials  devoting the ship and all hands to\nunconditional perdition, in case this intention was carried out. So\nstrongly did he work upon his disciples among the crew, that at last\nin a body they went to the captain and told him if Gabriel was sent\nfrom the ship, not a man of them would remain. He was therefore forced\nto relinquish his plan. Nor would they permit Gabriel to be any way\nmaltreated, say or do what he would; so that it came to pass that\nGabriel had the complete freedom of the ship. The consequence of all\nthis was, that the archangel cared little or nothing for the captain\nand mates; and since the epidemic had broken out, he carried a higher\nhand than ever; declaring that the plague, as he called it, was at his\nsole command; nor should it be stayed but according to his good\npleasure. The sailors, mostly poor devils, cringed, and some of them\nfawned before him; in obedience to his instructions, sometimes\nrendering him personal homage, as to a god. Such things may seem\nincredible; but, however wondrous, they are true. Nor is the history\nof fanatics half so striking in respect to the measureless\nself-deception of the fanatic himself, as his measureless power of\ndeceiving and bedevilling so many others. But it is time to return to\nthe Pequod.\n\n\"I fear not thy epidemic, man,\" said Ahab from the bulwarks, to\nCaptain Mayhew, who stood in the boat's stern; \"come on board.\"\n\nBut now Gabriel started to his feet.\n\n\"Think, think of the fevers, yellow and bilious! Beware of the\nhorrible plague!\"\n\n\"Gabriel! Gabriel!\" cried Captain Mayhew; \"thou must either  \" But\nthat instant a headlong wave shot the boat far ahead, and its\nseethings drowned all speech.\n\n\"Hast thou seen the White Whale?\" demanded Ahab, when the boat drifted\nback.\n\n\"Think, think of thy whale-boat, stoven and sunk! Beware of the\nhorrible tail!\"\n\n\"I tell thee again, Gabriel, that  \" But again the boat tore ahead\nas if dragged by fiends. Nothing was said for some moments, while a\nsuccession of riotous waves rolled by, which by one of those\noccasional caprices of the seas were tumbling, not heaving\nit. Meantime, the hoisted sperm whale's head jogged about very\nviolently, and Gabriel was seen eyeing it with rather more\napprehensiveness than his archangel nature seemed to warrant.\n\nWhen this interlude was over, Captain Mayhew began a dark story\nconcerning Moby Dick; not, however, without frequent interruptions\nfrom Gabriel, whenever his name was mentioned, and the crazy sea that\nseemed leagued with him.\n\nIt seemed that the Jeroboam had not long left home, when upon speaking\na whale-ship, her people were reliably apprised of the existence of\nMoby Dick, and the havoc he had made. Greedily sucking in this\nintelligence, Gabriel solemnly warned the captain against attacking\nthe White Whale, in case the monster should be seen; in his gibbering\ninsanity, pronouncing the White Whale to be no less a being than the\nShaker God incarnated; the Shakers receiving the Bible. But when, some\nyear or two afterwards, Moby Dick was fairly sighted from the\nmast-heads, Macey, the chief mate, burned with ardour to encounter\nhim; and the captain himself being not unwilling to let him have the\nopportunity, despite all the archangel's denunciations and\nforewarnings, Macey succeeded in persuading five men to man his\nboat. With them he pushed off; and, after much weary pulling, and many\nperilous, unsuccessful onsets, he at last succeeded in getting one\niron fast. Meantime, Gabriel, ascending to the main-royal mast-head,\nwas tossing one arm in frantic gestures, and hurling forth prophecies\nof speedy doom to the sacrilegious assailants of his divinity. Now,\nwhile Macey, the mate, was standing up in his boat's bow, and with all\nthe reckless energy of his tribe was venting his wild exclamations\nupon the whale, and essaying to get a fair chance for his poised\nlance, lo! a broad white shadow rose from the sea; by its quick,\nfanning motion, temporarily taking the breath out of the bodies of the\noarsmen. Next instant, the luckless mate, so full of furious life, was\nsmitten bodily into the air, and making a long arc in his descent,\nfell into the sea at the distance of about fifty yards. Not a chip of\nthe boat was harmed, nor a hair of any oarsman's head; but the mate\nfor ever sank.\n\nIt is well to parenthesize here, that of the fatal accidents in the\nSperm-Whale Fishery, this kind is perhaps almost as frequent as\nany. Sometimes, nothing is injured but the man who is thus\nannihilated; oftener the boat's bow is knocked off, or the\nthigh-board, in which the headsman stands, is torn from its place and\naccompanies the body. But strangest of all is the circumstance, that\nin more instances than one, when the body has been recovered, not a\nsingle mark of violence is discernible; the man being stark dead.\n\nThe whole calamity, with the falling form of Macey, was plainly\ndescried from the ship. Raising a piercing shriek  \"The vial! the\nvial!\" Gabriel called off the terror-stricken crew from the further\nhunting of the whale. This terrible event clothed the archangel with\nadded influence; because his credulous disciples believed that he had\nspecifically fore-announced it, instead of only making a general\nprophecy, which any one might have done, and so have chanced to hit\none of many marks in the wide margin allowed. He became a nameless\nterror to the ship.\n\nMayhew having concluded his narration, Ahab put such questions to him,\nthat the stranger captain could not forbear inquiring whether he\nintended to hunt the White Whale, if opportunity should offer. To\nwhich Ahab answered  \"Aye.\" Straightway, then, Gabriel once more\nstarted to his feet, glaring upon the old man, and vehemently\nexclaimed, with downward pointed finger  \"Think, think of the\nblasphemer  dead, and down there!  beware of the blasphemer's\nend!\"\n\nAhab stolidly turned aside; then said to Mayhew, \"Captain, I have just\nbethought me of my letter-bag; there is a letter for one of thy\nofficers, if I mistake not. Starbuck, look over the bag.\"\n\nEvery whale-ship takes out a goodly number of letters for various\nships, whose delivery to the persons to whom they may be addressed,\ndepends upon the mere chance of encountering them in the four\noceans. Thus, most letters never reach their mark; and many are only\nreceived after attaining an age of two or three years or more.\n\nSoon Starbuck returned with a letter in his hand. It was sorely\ntumbled, damp, and covered with a dull, spotted, green mould, in\nconsequence of being kept in a dark locker of the cabin. Of such a\nletter, Death himself might well have been the post-boy.\n\n\"Can'st not read it?\" cried Ahab. \"Give it me, man. Aye, aye, it's but\na dim scrawl;  what's this?\" As he was studying it out, Starbuck\ntook a long cutting-spade pole, and with his knife slightly split the\nend, to insert the letter there, and in that way, hand it to the boat,\nwithout its coming any closer to the ship.\n\nMeantime, Ahab holding the letter, muttered, \"Mr. Har  yes,\nMr. Harry  (a woman's pinny hand,  the man's wife, I'll wager)\n Aye  Mr. Harry Macey, Ship Jeroboam;  why it's Macey, and\nhe's dead!\"\n\n\"Poor fellow! poor fellow! and from his wife,\" sighed Mayhew; \"but let\nme have it.\"\n\n\"Nay, keep it thyself,\" cried Gabriel to Ahab; \"thou art soon going\nthat way.\"\n\n\"Curses throttle thee!\" yelled Ahab. \"Captain Mayhew, stand by now to\nreceive it\"; and taking the fatal missive from Starbuck's hands, he\ncaught it in the slit of the pole, and reached it over towards the\nboat. But as he did so, the oarsmen expectantly desisted from rowing;\nthe boat drifted a little towards the ship's stern; so that, as if by\nmagic, the letter suddenly ranged along with Gabriel's eager hand. He\nclutched it in an instant, seized the boat-knife, and impaling the\nletter on it, sent it thus loaded back into the ship. It fell at\nAhab's feet. Then Gabriel shrieked out to his comrades to give way\nwith their oars, and in that manner the mutinous boat rapidly shot\naway from the Pequod.\n\nAs, after this interlude, the seamen resumed their work upon the\njacket of the whale, many strange things were hinted in reference to\nthis wild affair.\n\nCHAPTER 72 The Monkey-Rope.\n\nIn the tumultuous business of cutting-in and attending to a whale,\nthere is much running backwards and forwards among the crew. Now hands\nare wanted here, and then again hands are wanted there. There is no\nstaying in any one place; for at one and the same time everything has\nto be done everywhere. It is much the same with him who endeavors the\ndescription of the scene. We must now retrace our way a little. It was\nmentioned that upon first breaking ground in the whale's back, the\nblubber-hook was inserted into the original hole there cut by the\nspades of the mates. But how did so clumsy and weighty a mass as that\nsame hook get fixed in that hole? It was inserted there by my\nparticular friend Queequeg, whose duty it was, as harpooneer, to\ndescend upon the monster's back for the special purpose referred\nto. But in very many cases, circumstances require that the harpooneer\nshall remain on the whale till the whole tensing or stripping\noperation is concluded. The whale, be it observed, lies almost\nentirely submerged, excepting the immediate parts operated upon. So\ndown there, some ten feet below the level of the deck, the poor\nharpooneer flounders about, half on the whale and half in the water,\nas the vast mass revolves like a tread-mill beneath him. On the\noccasion in question, Queequeg figured in the Highland costume  a\nshirt and socks  in which to my eyes, at least, he appeared to\nuncommon advantage; and no one had a better chance to observe him, as\nwill presently be seen.\n\nBeing the savage's bowsman, that is, the person who pulled the bow-oar\nin his boat (the second one from forward), it was my cheerful duty to\nattend upon him while taking that hard-scrabble scramble upon the dead\nwhale's back. You have seen Italian organ-boys holding a dancing-ape\nby a long cord. Just so, from the ship's steep side, did I hold\nQueequeg down there in the sea, by what is technically called in the\nfishery a monkey-rope, attached to a strong strip of canvas belted\nround his waist.\n\nIt was a humorously perilous business for both of us. For, before we\nproceed further, it must be said that the monkey-rope was fast at both\nends; fast to Queequeg's broad canvas belt, and fast to my narrow\nleather one. So that for better or for worse, we two, for the time,\nwere wedded; and should poor Queequeg sink to rise no more, then both\nusage and honour demanded, that instead of cutting the cord, it should\ndrag me down in his wake. So, then, an elongated Siamese ligature\nunited us. Queequeg was my own inseparable twin brother; nor could I\nany way get rid of the dangerous liabilities which the hempen bond\nentailed.\n\nSo strongly and metaphysically did I conceive of my situation then,\nthat while earnestly watching his motions, I seemed distinctly to\nperceive that my own individuality was now merged in a joint stock\ncompany of two; that my free will had received a mortal wound; and\nthat another's mistake or misfortune might plunge innocent me into\nunmerited disaster and death. Therefore, I saw that here was a sort of\ninterregnum in Providence; for its even-handed equity never could have\nso gross an injustice. And yet still further pondering  while I\njerked him now and then from between the whale and ship, which would\nthreaten to jam him  still further pondering, I say, I saw that\nthis situation of mine was the precise situation of every mortal that\nbreathes; only, in most cases, he, one way or other, has this Siamese\nconnexion with a plurality of other mortals. If your banker breaks,\nyou snap; if your apothecary by mistake sends you poison in your\npills, you die. True, you may say that, by exceeding caution, you may\npossibly escape these and the multitudinous other evil chances of\nlife. But handle Queequeg's monkey-rope heedfully as I would,\nsometimes he jerked it so, that I came very near sliding\noverboard. Nor could I possibly forget that, do what I would, I only\nhad the management of one end of it.\n\nI have hinted that I would often jerk poor Queequeg from between the\nwhale and the ship  where he would occasionally fall, from the\nincessant rolling and swaying of both. But this was not the only\njamming jeopardy he was exposed to. Unappalled by the massacre made\nupon them during the night, the sharks now freshly and more keenly\nallured by the before pent blood which began to flow from the carcass\n the rabid creatures swarmed round it like bees in a beehive.\n\nAnd right in among those sharks was Queequeg; who often pushed them\naside with his floundering feet. A thing altogether incredible were it\nnot that attracted by such prey as a dead whale, the otherwise\nmiscellaneously carnivorous shark will seldom touch a man.\n\nNevertheless, it may well be believed that since they have such a\nravenous finger in the pie, it is deemed but wise to look sharp to\nthem. Accordingly, besides the monkey-rope, with which I now and then\njerked the poor fellow from too close a vicinity to the maw of what\nseemed a peculiarly ferocious shark  he was provided with still\nanother protection. Suspended over the side in one of the stages,\nTashtego and Daggoo continually flourished over his head a couple of\nkeen whale-spades, wherewith they slaughtered as many sharks as they\ncould reach. This procedure of theirs, to be sure, was very\ndisinterested and benevolent of them. They meant Queequeg's best\nhappiness, I admit; but in their hasty zeal to befriend him, and from\nthe circumstance that both he and the sharks were at times half hidden\nby the blood-muddled water, those indiscreet spades of theirs would\ncome nearer amputating a leg than a tall. But poor Queequeg, I\nsuppose, straining and gasping there with that great iron hook \npoor Queequeg, I suppose, only prayed to his Yojo, and gave up his\nlife into the hands of his gods.\n\nWell, well, my dear comrade and twin-brother, thought I, as I drew in\nand then slacked off the rope to every swell of the sea  what\nmatters it, after all? Are you not the precious image of each and all\nof us men in this whaling world? That unsounded ocean you gasp in, is\nLife; those sharks, your foes; those spades, your friends; and what\nbetween sharks and spades you are in a sad pickle and peril, poor lad.\n\nBut courage! there is good cheer in store for you, Queequeg. For now,\nas with blue lips and blood-shot eyes the exhausted savage at last\nclimbs up the chains and stands all dripping and involuntarily\ntrembling over the side; the steward advances, and with a benevolent,\nconsolatory glance hands him  what? Some hot Cognac? No! hands him,\nye gods! hands him a cup of tepid ginger and water!\n\n\"Ginger? Do I smell ginger?\" suspiciously asked Stubb, coming\nnear. \"Yes, this must be ginger,\" peering into the as yet untasted\ncup. Then standing as if incredulous for a while, he calmly walked\ntowards the astonished steward slowly saying, \"Ginger? ginger? and\nwill you have the goodness to tell me, Mr. Dough-Boy, where lies the\nvirtue of ginger? Ginger! is ginger the sort of fuel you use,\nDough-boy, to kindle a fire in this shivering cannibal? Ginger! \nwhat the devil is ginger?  sea-coal? firewood?  lucifer matches?\n tinder?  gunpowder?  what the devil is ginger, I say, that\nyou offer this cup to our poor Queequeg here.\"\n\n\"There is some sneaking Temperance Society movement about this\nbusiness,\" he suddenly added, now approaching Starbuck, who had just\ncome from forward. \"Will you look at that kannakin, sir; smell of it,\nif you please.\" Then watching the mate's countenance, he added, \"The\nsteward, Mr. Starbuck, had the face to offer that calomel and jalap to\nQueequeg, there, this instant off the whale. Is the steward an\napothecary, sir? and may I ask whether this is the sort of bitters by\nwhich he blows back the life into a half-drowned man?\"\n\n\"I trust not,\" said Starbuck, \"it is poor stuff enough.\"\n\n\"Aye, aye, steward,\" cried Stubb, \"we'll teach you to drug it\nharpooneer; none of your apothecary's medicine here; you want to\npoison us, do ye? You have got out insurances on our lives and want to\nmurder us all, and pocket the proceeds, do ye?\"\n\n\"It was not me,\" cried Dough-Boy, \"it was Aunt Charity that brought\nthe ginger on board; and bade me never give the harpooneers any\nspirits, but only this ginger-jub  so she called it.\"\n\n\"Ginger-jub! you gingerly rascal! take that! and run along with ye to\nthe lockers, and get something better. I hope I do no wrong,\nMr. Starbuck. It is the captain's orders  grog for the harpooneer\non a whale.\"\n\n\"Enough,\" replied Starbuck, \"only don't hit him again, but  \"\n\n\"Oh, I never hurt when I hit, except when I hit a whale or something\nof that sort; and this fellow's a weazel. What were you about saying,\nsir?\"\n\n\"Only this: go down with him, and get what thou wantest thyself.\"\n\nWhen Stubb reappeared, he came with a dark flask in one hand, and a\nsort of tea-caddy in the other. The first contained strong spirits,\nand was handed to Queequeg; the second was Aunt Charity's gift, and\nthat was freely given to the waves.\n\n The monkey-rope is found in all whalers; but it was only in the\nPequod that the monkey and his holder were ever tied together. This\nimprovement upon the original usage was introduced by no less a man\nthan Stubb, in order to afford the imperilled harpooneer the strongest\npossible guarantee for the faithfulness and vigilance of his\nmonkey-rope holder.\n\nCHAPTER 73 Stubb and Flask Kill a Right Whale; and Then Have a Talk\nOver Him.\n\nIt must be borne in mind that all this time we have a Sperm Whale's\nprodigious head hanging to the Pequod's side. But we must let it\ncontinue hanging there a while till we can get a chance to attend to\nit. For the present other matters press, and the best we can do now\nfor the head, is to pray heaven the tackles may hold.\n\nNow, during the past night and forenoon, the Pequod had gradually\ndrifted into a sea, which, by its occasional patches of yellow brit,\ngave unusual tokens of the vicinity of Right Whales, a species of the\nLeviathan that but few supposed to be at this particular time lurking\nanywhere near. And though all hands commonly disdained the capture of\nthose inferior creatures; and though the Pequod was not commissioned\nto cruise for them at all, and though she had passed numbers of them\nnear the Crozetts without lowering a boat; yet now that a Sperm Whale\nhad been brought alongside and beheaded, to the surprise of all, the\nannouncement was made that a Right Whale should be captured that day,\nif opportunity offered.\n\nNor was this long wanting. Tall spouts were seen to leeward; and two\nboats, Stubb's and Flask's, were detached in pursuit. Pulling further\nand further away, they at last became almost invisible to the men at\nthe mast-head. But suddenly in the distance, they saw a great heap of\ntumultuous white water, and soon after news came from aloft that one\nor both the boats must be fast. An interval passed and the boats were\nin plain sight, in the act of being dragged right towards the ship by\nthe towing whale. So close did the monster come to the hull, that at\nfirst it seemed as if he meant it malice; but suddenly going down in a\nmaelstrom, within three rods of the planks, he wholly disappeared from\nview, as if diving under the keel. \"Cut, cut!\" was the cry from the\nship to the boats, which, for one instant, seemed on the point of\nbeing brought with a deadly dash against the vessel's side. But having\nplenty of line yet in the tubs, and the whale not sounding very\nrapidly, they paid out abundance of rope, and at the same time pulled\nwith all their might so as to get ahead of the ship. For a few minutes\nthe struggle was intensely critical; for while they still slacked out\nthe tightened line in one direction, and still plied their oars in\nanother, the contending strain threatened to take them under. But it\nwas only a few feet advance they sought to gain. And they stuck to it\ntill they did gain it; when instantly, a swift tremor was felt running\nlike lightning along the keel, as the strained line, scraping beneath\nthe ship, suddenly rose to view under her bows, snapping and\nquivering; and so flinging off its drippings, that the drops fell like\nbits of broken glass on the water, while the whale beyond also rose to\nsight, and once more the boats were free to fly. But the fagged whale\nabated his speed, and blindly altering his course, went round the\nstern of the ship towing the two boats after him, so that they\nperformed a complete circuit.\n\nMeantime, they hauled more and more upon their lines, till close\nflanking him on both sides, Stubb answered Flask with lance for lance;\nand thus round and round the Pequod the battle went, while the\nmultitudes of sharks that had before swum round the Sperm Whale's\nbody, rushed to the fresh blood that was spilled, thirstily drinking\nat every new gash, as the eager Israelites did at the new bursting\nfountains that poured from the smitten rock.\n\nAt last his spout grew thick, and with a frightful roll and vomit, he\nturned upon his back a corpse.\n\nWhile the two headsmen were engaged in making fast cords to his\nflukes, and in other ways getting the mass in readiness for towing,\nsome conversation ensued between them.\n\n\"I wonder what the old man wants with this lump of foul lard,\" said\nStubb, not without some disgust at the thought of having to do with so\nignoble a leviathan.\n\n\"Wants with it?\" said Flask, coiling some spare line in the boat's\nbow, \"did you never hear that the ship which but once has a Sperm\nWhale's head hoisted on her starboard side, and at the same time a\nRight Whale's on the larboard; did you never hear, Stubb, that that\nship can never afterwards capsize?\"\n\n\"Why not?\n\n\"I don't know, but I heard that gamboge ghost of a Fedallah saying so,\nand he seems to know all about ships' charms. But I sometimes think\nhe'll charm the ship to no good at last. I don't half like that chap,\nStubb. Did you ever notice how that tusk of his is a sort of carved\ninto a snake's head, Stubb?\"\n\n\"Sink him! I never look at him at all; but if ever I get a chance of a\ndark night, and he standing hard by the bulwarks, and no one by; look\ndown there, Flask\"  pointing into the sea with a peculiar motion of\nboth hands  \"Aye, will I! Flask, I take that Fedallah to be the\ndevil in disguise. Do you believe that cock and bull story about his\nhaving been stowed away on board ship? He's the devil, I say. The\nreason why you don't see his tail, is because he tucks it up out of\nsight; he carries it coiled away in his pocket, I guess. Blast him!\nnow that I think of it, he's always wanting oakum to stuff into the\ntoes of his boots.\"\n\n\"He sleeps in his boots, don't he? He hasn't got any hammock; but I've\nseen him lay of nights in a coil of rigging.\"\n\n\"No doubt, and it's because of his cursed tail; he coils it down, do\nye see, in the eye of the rigging.\"\n\n\"What's the old man have so much to do with him for?\"\n\n\"Striking up a swap or a bargain, I suppose.\"\n\n\"Bargain?  about what?\"\n\n\"Why, do ye see, the old man is hard bent after that White Whale, and\nthe devil there is trying to come round him, and get him to swap away\nhis silver watch, or his soul, or something of that sort, and then\nhe'll surrender Moby Dick.\"\n\n\"Pooh! Stubb, you are skylarking; how can Fedallah do that?\"\n\n\"I don't know, Flask, but the devil is a curious chap, and a wicked\none, I tell ye. Why, they say as how he went a sauntering into the old\nflag-ship once, switching his tail about devilish easy and\ngentlemanlike, and inquiring if the old governor was at home. Well, he\nwas at home, and asked the devil what he wanted. The devil, switching\nhis hoofs, up and says, 'I want John.' 'What for?' says the old\ngovernor. 'What business is that of yours,' says the devil, getting\nmad,  'I want to use him.' 'Take him,' says the governor  and by\nthe Lord, Flask, if the devil didn't give John the Asiatic cholera\nbefore he got through with him, I'll eat this whale in one\nmouthful. But look sharp  ain't you all ready there? Well, then,\npull ahead, and let's get the whale alongside.\"\n\n\"I think I remember some such story as you were telling,\" said Flask,\nwhen at last the two boats were slowly advancing with their burden\ntowards the ship, \"but I can't remember where.\"\n\n\"Three Spaniards? Adventures of those three bloody-minded soladoes?\nDid ye read it there, Flask? I guess ye did?\"\n\n\"No: never saw such a book; heard of it, though. But now, tell me,\nStubb, do you suppose that that devil you was speaking of just now,\nwas the same you say is now on board the Pequod?\"\n\n\"Am I the same man that helped kill this whale? Doesn't the devil live\nfor ever; who ever heard that the devil was dead? Did you ever see any\nparson a wearing mourning for the devil? And if the devil has a\nlatch-key to get into the admiral's cabin, don't you suppose he can\ncrawl into a porthole? Tell me that, Mr. Flask?\"\n\n\"How old do you suppose Fedallah is, Stubb?\"\n\n\"Do you see that mainmast there?\" pointing to the ship; \"well, that's\nthe figure one; now take all the hoops in the Pequod's hold, and\nstring along in a row with that mast, for oughts, do you see; well,\nthat wouldn't begin to be Fedallah's age. Nor all the coopers in\ncreation couldn't show hoops enough to make oughts enough.\"\n\n\"But see here, Stubb, I thought you a little boasted just now, that\nyou meant to give Fedallah a sea-toss, if you got a good chance. Now,\nif he's so old as all those hoops of yours come to, and if he is going\nto live for ever, what good will it do to pitch him overboard  tell\nme that?\n\n\"Give him a good ducking, anyhow.\"\n\n\"But he'd crawl back.\"\n\n\"Duck him again; and keep ducking him.\"\n\n\"Suppose he should take it into his head to duck you, though  yes,\nand drown you  what then?\"\n\n\"I should like to see him try it; I'd give him such a pair of black\neyes that he wouldn't dare to show his face in the admiral's cabin\nagain for a long while, let alone down in the orlop there, where he\nlives, and hereabouts on the upper decks where he sneaks so much. Damn\nthe devil, Flask; so you suppose I'm afraid of the devil? Who's afraid\nof him, except the old governor who daresn't catch him and put him in\ndouble-darbies, as he deserves, but lets him go about kidnapping\npeople; aye, and signed a bond with him, that all the people the devil\nkidnapped, he'd roast for him? There's a governor!\"\n\n\"Do you suppose Fedallah wants to kidnap Captain Ahab?\"\n\n\"Do I suppose it? You'll know it before long, Flask. But I am going\nnow to keep a sharp look-out on him; and if I see anything very\nsuspicious going on, I'll just take him by the nape of his neck, and\nsay  Look here, Beelzebub, you don't do it; and if he makes any\nfuss, by the Lord I'll make a grab into his pocket for his tail, take\nit to the capstan, and give him such a wrenching and heaving, that his\ntail will come short off at the stump  do you see; and then, I\nrather guess when he finds himself docked in that queer fashion, he'll\nsneak off without the poor satisfaction of feeling his tail between\nhis legs.\"\n\n\"And what will you do with the tail, Stubb?\"\n\n\"Do with it? Sell it for an ox whip when we get home;  what else?\"\n\n\"Now, do you mean what you say, and have been saying all along,\nStubb?\"\n\n\"Mean or not mean, here we are at the ship.\"\n\nThe boats were here hailed, to tow the whale on the larboard side,\nwhere fluke chains and other necessaries were already prepared for\nsecuring him.\n\n\"Didn't I tell you so?\" said Flask; \"yes, you'll soon see this right\nwhale's head hoisted up opposite that parmacetti's.\"\n\nIn good time, Flask's saying proved true. As before, the Pequod\nsteeply leaned over towards the sperm whale's head, now, by the\ncounterpoise of both heads, she regained her even keel; though sorely\nstrained, you may well believe. So, when on one side you hoist in\nLocke's head, you go over that way; but now, on the other side, hoist\nin Kant's and you come back again; but in very poor plight. Thus, some\nminds for ever keep trimming boat. Oh, ye foolish! throw all these\nthunder-heads overboard, and then you will float light and right.\n\nIn disposing of the body of a right whale, when brought alongside the\nship, the same preliminary proceedings commonly take place as in the\ncase of a sperm whale; only, in the latter instance, the head is cut\noff whole, but in the former the lips and tongue are separately\nremoved and hoisted on deck, with all the well known black bone\nattached to what is called the crown-piece. But nothing like this, in\nthe present case, had been done. The carcases of both whales had\ndropped astern; and the head-laden ship not a little resembled a mule\ncarrying a pair of overburdening panniers.\n\nMeantime, Fedallah was calmly eyeing the right whale's head, and ever\nand anon glancing from the deep wrinkles there to the lines in his own\nhand. And Ahab chanced so to stand, that the Parsee occupied his\nshadow; while, if the Parsee's shadow was there at all it seemed only\nto blend with, and lengthen Ahab's. As the crew toiled on, Laplandish\nspeculations were bandied among them, concerning all these passing\nthings.\n\nCHAPTER 74 The Sperm Whale's Head  Contrasted View.\n\nHere, now, are two great whales, laying their heads together; let us\njoin them, and lay together our own.\n\nOf the grand order of folio leviathans, the Sperm Whale and the Right\nWhale are by far the most noteworthy. They are the only whales\nregularly hunted by man. To the Nantucketer, they present the two\nextremes of all the known varieties of the whale. As the external\ndifference between them is mainly observable in their heads; and as a\nhead of each is this moment hanging from the Pequod's side; and as we\nmay freely go from one to the other, by merely stepping across the\ndeck:  where, I should like to know, will you obtain a better\nchance to study practical cetology than here?\n\nIn the first place, you are struck by the general contrast between\nthese heads. Both are massive enough in all conscience; but there is a\ncertain mathematical symmetry in the Sperm Whale's which the Right\nWhale's sadly lacks. There is more character in the Sperm Whale's\nhead. As you behold it, you involuntarily yield the immense\nsuperiority to him, in point of pervading dignity. In the present\ninstance, too, this dignity is heightened by the pepper and salt\ncolour of his head at the summit, giving token of advanced age and\nlarge experience. In short, he is what the fishermen technically call\na \"grey-headed whale.\"\n\nLet us now note what is least dissimilar in these heads  namely,\nthe two most important organs, the eye and the ear. Far back on the\nside of the head, and low down, near the angle of either whale's jaw,\nif you narrowly search, you will at last see a lashless eye, which you\nwould fancy to be a young colt's eye; so out of all proportion is it\nto the magnitude of the head.\n\nNow, from this peculiar sideway position of the whale's eyes, it is\nplain that he can never see an object which is exactly ahead, no more\nthan he can one exactly astern. In a word, the position of the whale's\neyes corresponds to that of a man's ears; and you may fancy, for\nyourself, how it would fare with you, did you sideways survey objects\nthrough your ears. You would find that you could only command some\nthirty degrees of vision in advance of the straight side-line of\nsight; and about thirty more behind it. If your bitterest foe were\nwalking straight towards you, with dagger uplifted in broad day, you\nwould not be able to see him, any more than if he were stealing upon\nyou from behind. In a word, you would have two backs, so to speak;\nbut, at the same time, also, two fronts (side fronts): for what is it\nthat makes the front of a man  what, indeed, but his eyes?\n\nMoreover, while in most other animals that I can now think of, the\neyes are so planted as imperceptibly to blend their visual power, so\nas to produce one picture and not two to the brain; the peculiar\nposition of the whale's eyes, effectually divided as they are by many\ncubic feet of solid head, which towers between them like a great\nmountain separating two lakes in valleys; this, of course, must wholly\nseparate the impressions which each independent organ imparts. The\nwhale, therefore, must see one distinct picture on this side, and\nanother distinct picture on that side; while all between must be\nprofound darkness and nothingness to him. Man may, in effect, be said\nto look out on the world from a sentry-box with two joined sashes for\nhis window. But with the whale, these two sashes are separately\ninserted, making two distinct windows, but sadly impairing the\nview. This peculiarity of the whale's eyes is a thing always to be\nborne in mind in the fishery; and to be remembered by the reader in\nsome subsequent scenes.\n\nA curious and most puzzling question might be started concerning this\nvisual matter as touching the Leviathan. But I must be content with a\nhint. So long as a man's eyes are open in the light, the act of seeing\nis involuntary; that is, he cannot then help mechanically seeing\nwhatever objects are before him. Nevertheless, any one's experience\nwill teach him, that though he can take in an undiscriminating sweep\nof things at one glance, it is quite impossible for him, attentively,\nand completely, to examine any two things  however large or however\nsmall  at one and the same instant of time; never mind if they lie\nside by side and touch each other. But if you now come to separate\nthese two objects, and surround each by a circle of profound darkness;\nthen, in order to see one of them, in such a manner as to bring your\nmind to bear on it, the other will be utterly excluded from your\ncontemporary consciousness. How is it, then, with the whale? True,\nboth his eyes, in themselves, must simultaneously act; but is his\nbrain so much more comprehensive, combining, and subtle than man's,\nthat he can at the same moment of time attentively examine two\ndistinct prospects, one on one side of him, and the other in an\nexactly opposite direction? If he can, then is it as marvellous a\nthing in him, as if a man were able simultaneously to go through the\ndemonstrations of two distinct problems in Euclid. Nor, strictly\ninvestigated, is there any incongruity in this comparison.\n\nIt may be but an idle whim, but it has always seemed to me, that the\nextraordinary vacillations of movement displayed by some whales when\nbeset by three or four boats; the timidity and liability to queer\nfrights, so common to such whales; I think that all this indirectly\nproceeds from the helpless perplexity of volition, in which their\ndivided and diametrically opposite powers of vision must involve them.\n\nBut the ear of the whale is full as curious as the eye. If you are an\nentire stranger to their race, you might hunt over these two heads for\nhours, and never discover that organ. The ear has no external leaf\nwhatever; and into the hole itself you can hardly insert a quill, so\nwondrously minute is it. It is lodged a little behind the eye. With\nrespect to their ears, this important difference is to be observed\nbetween the sperm whale and the right. While the ear of the former has\nan external opening, that of the latter is entirely and evenly covered\nover with a membrane, so as to be quite imperceptible from without.\n\nIs it not curious, that so vast a being as the whale should see the\nworld through so small an eye, and hear the thunder through an ear\nwhich is smaller than a hare's? But if his eyes were broad as the lens\nof Herschel's great telescope; and his ears capacious as the porches\nof cathedrals; would that make him any longer of sight, or sharper of\nhearing? Not at all.  Why then do you try to \"enlarge\" your mind?\nSubtilize it.\n\nLet us now with whatever levers and steam-engines we have at hand,\ncant over the sperm whale's head, that it may lie bottom up; then,\nascending by a ladder to the summit, have a peep down the mouth; and\nwere it not that the body is now completely separated from it, with a\nlantern we might descend into the great Kentucky Mammoth Cave of his\nstomach. But let us hold on here by this tooth, and look about us\nwhere we are. What a really beautiful and chaste-looking mouth! from\nfloor to ceiling, lined, or rather papered with a glistening white\nmembrane, glossy as bridal satins.\n\nBut come out now, and look at this portentous lower jaw, which seems\nlike the long narrow lid of an immense snuff-box, with the hinge at\none end, instead of one side. If you pry it up, so as to get it\noverhead, and expose its rows of teeth, it seems a terrific\nportcullis; and such, alas! it proves to many a poor wight in the\nfishery, upon whom these spikes fall with impaling force. But far more\nterrible is it to behold, when fathoms down in the sea, you see some\nsulky whale, floating there suspended, with his prodigious jaw, some\nfifteen feet long, hanging straight down at right-angles with his\nbody, for all the world like a ship's jib-boom. This whale is not\ndead; he is only dispirited; out of sorts, perhaps; hypochondriac; and\nso supine, that the hinges of his jaw have relaxed, leaving him there\nin that ungainly sort of plight, a reproach to all his tribe, who\nmust, no doubt, imprecate lock-jaws upon him.\n\nIn most cases this lower jaw  being easily unhinged by a practised\nartist  is disengaged and hoisted on deck for the purpose of\nextracting the ivory teeth, and furnishing a supply of that hard white\nwhalebone with which the fishermen fashion all sorts of curious\narticles, including canes, umbrella-stocks, and handles to\nriding-whips.\n\nWith a long, weary hoist the jaw is dragged on board, as if it were an\nanchor; and when the proper time comes  some few days after the\nother work  Queequeg, Daggoo, and Tashtego, being all accomplished\ndentists, are set to drawing teeth. With a keen cutting-spade,\nQueequeg lances the gums; then the jaw is lashed down to ringbolts,\nand a tackle being rigged from aloft, they drag out these teeth, as\nMichigan oxen drag stumps of old oaks out of wild wood lands. There\nare generally forty-two teeth in all; in old whales, much worn down,\nbut undecayed; nor filled after our artificial fashion. The jaw is\nafterwards sawn into slabs, and piled away like joists for building\nhouses.\n\nCHAPTER 75 The Right Whale's Head  Contrasted View.\n\nCrossing the deck, let us now have a good long look at the Right\nWhale's head.\n\nAs in general shape the noble Sperm Whale's head may be compared to a\nRoman war-chariot (especially in front, where it is so broadly\nrounded); so, at a broad view, the Right Whale's head bears a rather\ninelegant resemblance to a gigantic galliot-toed shoe. Two hundred\nyears ago an old Dutch voyager likened its shape to that of a\nshoemaker's last. And in this same last or shoe, that old woman of the\nnursery tale, with the swarming brood, might very comfortably be\nlodged, she and all her progeny.\n\nBut as you come nearer to this great head it begins to assume\ndifferent aspects, according to your point of view. If you stand on\nits summit and look at these two F-shaped spoutholes, you would take\nthe whole head for an enormous bass-viol, and these spiracles, the\napertures in its sounding-board. Then, again, if you fix your eye upon\nthis strange, crested, comb-like incrustation on the top of the mass\n this green, barnacled thing, which the Greenlanders call the\n\"crown,\" and the Southern fishers the \"bonnet\" of the Right Whale;\nfixing your eyes solely on this, you would take the head for the trunk\nof some huge oak, with a bird's nest in its crotch. At any rate, when\nyou watch those live crabs that nestle here on this bonnet, such an\nidea will be almost sure to occur to you; unless, indeed, your fancy\nhas been fixed by the technical term \"crown\" also bestowed upon it; in\nwhich case you will take great interest in thinking how this mighty\nmonster is actually a diademed king of the sea, whose green crown has\nbeen put together for him in this marvellous manner. But if this whale\nbe a king, he is a very sulky looking fellow to grace a diadem. Look\nat that hanging lower lip! what a huge sulk and pout is there! a sulk\nand pout, by carpenter's measurement, about twenty feet long and five\nfeet deep; a sulk and pout that will yield you some 500 gallons of oil\nand more.\n\nA great pity, now, that this unfortunate whale should be\nhare-lipped. The fissure is about a foot across. Probably the mother\nduring an important interval was sailing down the Peruvian coast, when\nearthquakes caused the beach to gape. Over this lip, as over a\nslippery threshold, we now slide into the mouth. Upon my word were I\nat Mackinaw, I should take this to be the inside of an Indian\nwigwam. Good Lord! is this the road that Jonah went? The roof is about\ntwelve feet high, and runs to a pretty sharp angle, as if there were a\nregular ridge-pole there; while these ribbed, arched, hairy sides,\npresent us with those wondrous, half vertical, scimetar-shaped slats\nof whalebone, say three hundred on a side, which depending from the\nupper part of the head or crown bone, form those Venetian blinds which\nhave elsewhere been cursorily mentioned. The edges of these bones are\nfringed with hairy fibres, through which the Right Whale strains the\nwater, and in whose intricacies he retains the small fish, when\nopenmouthed he goes through the seas of brit in feeding time. In the\ncentral blinds of bone, as they stand in their natural order, there\nare certain curious marks, curves, hollows, and ridges, whereby some\nwhalemen calculate the creature's age, as the age of an oak by its\ncircular rings. Though the certainty of this criterion is far from\ndemonstrable, yet it has the savor of analogical probability. At any\nrate, if we yield to it, we must grant a far greater age to the Right\nWhale than at first glance will seem reasonable.\n\nIn old times, there seem to have prevailed the most curious fancies\nconcerning these blinds. One voyager in Purchas calls them the\nwondrous \"whiskers\" inside of the whale's mouth; another, \"hogs'\nbristles\"; a third old gentleman in Hackluyt uses the following\nelegant language: \"There are about two hundred and fifty fins growing\non each side of his upper CHOP, which arch over his tongue on each\nside of his mouth.\"\n\nAs every one knows, these same \"hogs' bristles,\" \"fins,\" \"whiskers,\"\n\"blinds,\" or whatever you please, furnish to the ladies their busks\nand other stiffening contrivances. But in this particular, the demand\nhas long been on the decline. It was in Queen Anne's time that the\nbone was in its glory, the farthingale being then all the fashion. And\nas those ancient dames moved about gaily, though in the jaws of the\nwhale, as you may say; even so, in a shower, with the like\nthoughtlessness, do we nowadays fly under the same jaws for\nprotection; the umbrella being a tent spread over the same bone.\n\nBut now forget all about blinds and whiskers for a moment, and,\nstanding in the Right Whale's mouth, look around you afresh. Seeing\nall these colonnades of bone so methodically ranged about, would you\nnot think you were inside of the great Haarlem organ, and gazing upon\nits thousand pipes? For a carpet to the organ we have a rug of the\nsoftest Turkey  the tongue, which is glued, as it were, to the\nfloor of the mouth. It is very fat and tender, and apt to tear in\npieces in hoisting it on deck. This particular tongue now before us;\nat a passing glance I should say it was a six-barreler; that is, it\nwill yield you about that amount of oil.\n\nEre this, you must have plainly seen the truth of what I started with\n that the Sperm Whale and the Right Whale have almost entirely\ndifferent heads. To sum up, then: in the Right Whale's there is no\ngreat well of sperm; no ivory teeth at all; no long, slender mandible\nof a lower jaw, like the Sperm Whale's. Nor in the Sperm Whale are\nthere any of those blinds of bone; no huge lower lip; and scarcely\nanything of a tongue. Again, the Right Whale has two external\nspout-holes, the Sperm Whale only one.\n\nLook your last, now, on these venerable hooded heads, while they yet\nlie together; for one will soon sink, unrecorded, in the sea; the\nother will not be very long in following.\n\nCan you catch the expression of the Sperm Whale's there? It is the\nsame he died with, only some of the longer wrinkles in the forehead\nseem now faded away. I think his broad brow to be full of a\nprairie-like placidity, born of a speculative indifference as to\ndeath. But mark the other head's expression. See that amazing lower\nlip, pressed by accident against the vessel's side, so as firmly to\nembrace the jaw. Does not this whole head seem to speak of an enormous\npractical resolution in facing death? This Right Whale I take to have\nbeen a Stoic; the Sperm Whale, a Platonian, who might have taken up\nSpinoza in his latter years.\n\n This reminds us that the Right Whale really has a sort of whisker,\nor rather a moustache, consisting of a few scattered white hairs on\nthe upper part of the outer end of the lower jaw. Sometimes these\ntufts impart a rather brigandish expression to his otherwise solemn\ncountenance.\n\nCHAPTER 76 The Battering-Ram.\n\nEre quitting, for the nonce, the Sperm Whale's head, I would have you,\nas a sensible physiologist, simply  particularly remark its front\naspect, in all its compacted collectedness. I would have you\ninvestigate it now with the sole view of forming to yourself some\nunexaggerated, intelligent estimate of whatever battering-ram power\nmay be lodged there. Here is a vital point; for you must either\nsatisfactorily settle this matter with yourself, or for ever remain an\ninfidel as to one of the most appalling, but not the less true events,\nperhaps anywhere to be found in all recorded history.\n\nYou observe that in the ordinary swimming position of the Sperm Whale,\nthe front of his head presents an almost wholly vertical plane to the\nwater; you observe that the lower part of that front slopes\nconsiderably backwards, so as to furnish more of a retreat for the\nlong socket which receives the boom-like lower jaw; you observe that\nthe mouth is entirely under the head, much in the same way, indeed, as\nthough your own mouth were entirely under your chin. Moreover you\nobserve that the whale has no external nose; and that what nose he has\n his spout hole  is on the top of his head; you observe that his\neyes and ears are at the sides of his head, nearly one third of his\nentire length from the front. Wherefore, you must now have perceived\nthat the front of the Sperm Whale's head is a dead, blind wall,\nwithout a single organ or tender prominence of any sort\nwhatsoever. Furthermore, you are now to consider that only in the\nextreme, lower, backward sloping part of the front of the head, is\nthere the slightest vestige of bone; and not till you get near twenty\nfeet from the forehead do you come to the full cranial development. So\nthat this whole enormous boneless mass is as one wad. Finally, though,\nas will soon be revealed, its contents partly comprise the most\ndelicate oil; yet, you are now to be apprised of the nature of the\nsubstance which so impregnably invests all that apparent\neffeminacy. In some previous place I have described to you how the\nblubber wraps the body of the whale, as the rind wraps an orange. Just\nso with the head; but with this difference: about the head this\nenvelope, though not so thick, is of a boneless toughness, inestimable\nby any man who has not handled it. The severest pointed harpoon, the\nsharpest lance darted by the strongest human arm, impotently rebounds\nfrom it. It is as though the forehead of the Sperm Whale were paved\nwith horses' hoofs. I do not think that any sensation lurks in it.\n\nBethink yourself also of another thing. When two large, loaded\nIndiamen chance to crowd and crush towards each other in the docks,\nwhat do the sailors do? They do not suspend between them, at the point\nof coming contact, any merely hard substance, like iron or wood. No,\nthey hold there a large, round wad of tow and cork, enveloped in the\nthickest and toughest of ox-hide. That bravely and uninjured takes the\njam which would have snapped all their oaken handspikes and iron\ncrow-bars. By itself this sufficiently illustrates the obvious fact I\ndrive at. But supplementary to this, it has hypothetically occurred to\nme, that as ordinary fish possess what is called a swimming bladder in\nthem, capable, at will, of distension or contraction; and as the Sperm\nWhale, as far as I know, has no such provision in him; considering,\ntoo, the otherwise inexplicable manner in which he now depresses his\nhead altogether beneath the surface, and anon swims with it high\nelevated out of the water; considering the unobstructed elasticity of\nits envelope; considering the unique interior of his head; it has\nhypothetically occurred to me, I say, that those mystical lung-celled\nhoneycombs there may possibly have some hitherto unknown and\nunsuspected connexion with the outer air, so as to be susceptible to\natmospheric distension and contraction. If this be so, fancy the\nirresistibleness of that might, to which the most impalpable and\ndestructive of all elements contributes.\n\nNow, mark. Unerringly impelling this dead, impregnable, uninjurable\nwall, and this most buoyant thing within; there swims behind it all a\nmass of tremendous life, only to be adequately estimated as piled wood\nis  by the cord; and all obedient to one volition, as the smallest\ninsect. So that when I shall hereafter detail to you all the\nspecialities and concentrations of potency everywhere lurking in this\nexpansive monster; when I shall show you some of his more\ninconsiderable braining feats; I trust you will have renounced all\nignorant incredulity, and be ready to abide by this; that though the\nSperm Whale stove a passage through the Isthmus of Darien, and mixed\nthe Atlantic with the Pacific, you would not elevate one hair of your\neye-brow. For unless you own the whale, you are but a provincial and\nsentimentalist in Truth. But clear Truth is a thing for salamander\ngiants only to encounter; how small the chances for the provincials\nthen? What befell the weakling youth lifting the dread goddess's veil\nat Lais?\n\nCHAPTER 77 The Great Heidelburgh Tun.\n\nNow comes the Baling of the Case. But to comprehend it aright, you\nmust know something of the curious internal structure of the thing\noperated upon.\n\nRegarding the Sperm Whale's head as a solid oblong, you may, on an\ninclined plane, sideways divide it into two quoins, whereof the\nlower is the bony structure, forming the cranium and jaws, and the\nupper an unctuous mass wholly free from bones; its broad forward end\nforming the expanded vertical apparent forehead of the whale. At the\nmiddle of the forehead horizontally subdivide this upper quoin, and\nthen you have two almost equal parts, which before were naturally\ndivided by an internal wall of a thick tendinous substance.\n\nThe lower subdivided part, called the junk, is one immense honeycomb\nof oil, formed by the crossing and recrossing, into ten thousand\ninfiltrated cells, of tough elastic white fibres throughout its whole\nextent. The upper part, known as the Case, may be regarded as the\ngreat Heidelburgh Tun of the Sperm Whale. And as that famous great\ntierce is mystically carved in front, so the whale's vast plaited\nforehead forms innumerable strange devices for the emblematical\nadornment of his wondrous tun. Moreover, as that of Heidelburgh was\nalways replenished with the most excellent of the wines of the Rhenish\nvalleys, so the tun of the whale contains by far the most precious of\nall his oily vintages; namely, the highly-prized spermaceti, in its\nabsolutely pure, limpid, and odoriferous state. Nor is this precious\nsubstance found unalloyed in any other part of the creature. Though in\nlife it remains perfectly fluid, yet, upon exposure to the air, after\ndeath, it soon begins to concrete; sending forth beautiful crystalline\nshoots, as when the first thin delicate ice is just forming in\nwater. A large whale's case generally yields about five hundred\ngallons of sperm, though from unavoidable circumstances, considerable\nof it is spilled, leaks, and dribbles away, or is otherwise\nirrevocably lost in the ticklish business of securing what you can.\n\nI know not with what fine and costly material the Heidelburgh Tun was\ncoated within, but in superlative richness that coating could not\npossibly have compared with the silken pearl-coloured membrane, like\nthe lining of a fine pelisse, forming the inner surface of the Sperm\nWhale's case.\n\nIt will have been seen that the Heidelburgh Tun of the Sperm Whale\nembraces the entire length of the entire top of the head; and since\n as has been elsewhere set forth  the head embraces one third of\nthe whole length of the creature, then setting that length down at\neighty feet for a good sized whale, you have more than twenty-six feet\nfor the depth of the tun, when it is lengthwise hoisted up and down\nagainst a ship's side.\n\nAs in decapitating the whale, the operator's instrument is brought\nclose to the spot where an entrance is subsequently forced into the\nspermaceti magazine; he has, therefore, to be uncommonly heedful, lest\na careless, untimely stroke should invade the sanctuary and wastingly\nlet out its invaluable contents. It is this decapitated end of the\nhead, also, which is at last elevated out of the water, and retained\nin that position by the enormous cutting tackles, whose hempen\ncombinations, on one side, make quite a wilderness of ropes in that\nquarter.\n\nThus much being said, attend now, I pray you, to that marvellous and\n in this particular instance  almost fatal operation whereby the\nSperm Whale's great Heidelburgh Tun is tapped.\n\n Quoin is not a Euclidean term. It belongs to the pure nautical\nmathematics. I know not that it has been defined before. A quoin is a\nsolid which differs from a wedge in having its sharp end formed by the\nsteep inclination of one side, instead of the mutual tapering of both\nsides.\n\nCHAPTER 78 Cistern and Buckets.\n\nNimble as a cat, Tashtego mounts aloft; and without altering his erect\nposture, runs straight out upon the overhanging mainyard-arm, to the\npart where it exactly projects over the hoisted Tun. He has carried\nwith him a light tackle called a whip, consisting of only two parts,\ntravelling through a single-sheaved block. Securing this block, so\nthat it hangs down from the yard-arm, he swings one end of the rope,\ntill it is caught and firmly held by a hand on deck. Then,\nhand-over-hand, down the other part, the Indian drops through the air,\ntill dexterously he lands on the summit of the head. There  still\nhigh elevated above the rest of the company, to whom he vivaciously\ncries  he seems some Turkish Muezzin calling the good people to\nprayers from the top of a tower. A short-handled sharp spade being\nsent up to him, he diligently searches for the proper place to begin\nbreaking into the Tun. In this business he proceeds very heedfully,\nlike a treasure-hunter in some old house, sounding the walls to find\nwhere the gold is masoned in. By the time this cautious search is\nover, a stout iron-bound bucket, precisely like a well-bucket, has\nbeen attached to one end of the whip; while the other end, being\nstretched across the deck, is there held by two or three alert\nhands. These last now hoist the bucket within grasp of the Indian, to\nwhom another person has reached up a very long pole. Inserting this\npole into the bucket, Tashtego downward guides the bucket into the\nTun, till it entirely disappears; then giving the word to the seamen\nat the whip, up comes the bucket again, all bubbling like a\ndairy-maid's pail of new milk. Carefully lowered from its height, the\nfull-freighted vessel is caught by an appointed hand, and quickly\nemptied into a large tub. Then remounting aloft, it again goes through\nthe same round until the deep cistern will yield no more. Towards the\nend, Tashtego has to ram his long pole harder and harder, and deeper\nand deeper into the Tun, until some twenty feet of the pole have gone\ndown.\n\nNow, the people of the Pequod had been baling some time in this way;\nseveral tubs had been filled with the fragrant sperm; when all at once\na queer accident happened. Whether it was that Tashtego, that wild\nIndian, was so heedless and reckless as to let go for a moment his\none-handed hold on the great cabled tackles suspending the head; or\nwhether the place where he stood was so treacherous and oozy; or\nwhether the Evil One himself would have it to fall out so, without\nstating his particular reasons; how it was exactly, there is no\ntelling now; but, on a sudden, as the eightieth or ninetieth bucket\ncame suckingly up  my God! poor Tashtego  like the twin\nreciprocating bucket in a veritable well, dropped head-foremost down\ninto this great Tun of Heidelburgh, and with a horrible oily gurgling,\nwent clean out of sight!\n\n\"Man overboard!\" cried Daggoo, who amid the general consternation\nfirst came to his senses. \"Swing the bucket this way!\" and putting one\nfoot into it, so as the better to secure his slippery hand-hold on the\nwhip itself, the hoisters ran him high up to the top of the head,\nalmost before Tashtego could have reached its interior\nbottom. Meantime, there was a terrible tumult. Looking over the side,\nthey saw the before lifeless head throbbing and heaving just below the\nsurface of the sea, as if that moment seized with some momentous idea;\nwhereas it was only the poor Indian unconsciously revealing by those\nstruggles the perilous depth to which he had sunk.\n\nAt this instant, while Daggoo, on the summit of the head, was clearing\nthe whip  which had somehow got foul of the great cutting tackles\n a sharp cracking noise was heard; and to the unspeakable horror of\nall, one of the two enormous hooks suspending the head tore out, and\nwith a vast vibration the enormous mass sideways swung, till the drunk\nship reeled and shook as if smitten by an iceberg. The one remaining\nhook, upon which the entire strain now depended, seemed every instant\nto be on the point of giving way; an event still more likely from the\nviolent motions of the head.\n\n\"Come down, come down!\" yelled the seamen to Daggoo, but with one hand\nholding on to the heavy tackles, so that if the head should drop, he\nwould still remain suspended; the negro having cleared the foul line,\nrammed down the bucket into the now collapsed well, meaning that the\nburied harpooneer should grasp it, and so be hoisted out.\n\n\"In heaven's name, man,\" cried Stubb, \"are you ramming home a\ncartridge there?  Avast! How will that help him; jamming that\niron-bound bucket on top of his head? Avast, will ye!\"\n\n\"Stand clear of the tackle!\" cried a voice like the bursting of a\nrocket.\n\nAlmost in the same instant, with a thunder-boom, the enormous mass\ndropped into the sea, like Niagara's Table-Rock into the whirlpool;\nthe suddenly relieved hull rolled away from it, to far down her\nglittering copper; and all caught their breath, as half swinging \nnow over the sailors' heads, and now over the water  Daggoo,\nthrough a thick mist of spray, was dimly beheld clinging to the\npendulous tackles, while poor, buried-alive Tashtego was sinking\nutterly down to the bottom of the sea! But hardly had the blinding\nvapour cleared away, when a naked figure with a boarding-sword in his\nhand, was for one swift moment seen hovering over the bulwarks. The\nnext, a loud splash announced that my brave Queequeg had dived to the\nrescue. One packed rush was made to the side, and every eye counted\nevery ripple, as moment followed moment, and no sign of either the\nsinker or the diver could be seen. Some hands now jumped into a boat\nalongside, and pushed a little off from the ship.\n\n\"Ha! ha!\" cried Daggoo, all at once, from his now quiet, swinging\nperch overhead; and looking further off from the side, we saw an arm\nthrust upright from the blue waves; a sight strange to see, as an arm\nthrust forth from the grass over a grave.\n\n\"Both! both!  it is both!\"  cried Daggoo again with a joyful\nshout; and soon after, Queequeg was seen boldly striking out with one\nhand, and with the other clutching the long hair of the Indian. Drawn\ninto the waiting boat, they were quickly brought to the deck; but\nTashtego was long in coming to, and Queequeg did not look very brisk.\n\nNow, how had this noble rescue been accomplished? Why, diving after\nthe slowly descending head, Queequeg with his keen sword had made side\nlunges near its bottom, so as to scuttle a large hole there; then\ndropping his sword, had thrust his long arm far inwards and upwards,\nand so hauled out poor Tash by the head. He averred, that upon first\nthrusting in for him, a leg was presented; but well knowing that that\nwas not as it ought to be, and might occasion great trouble;  he\nhad thrust back the leg, and by a dexterous heave and toss, had\nwrought a somerset upon the Indian; so that with the next trial, he\ncame forth in the good old way  head foremost. As for the great\nhead itself, that was doing as well as could be expected.\n\nAnd thus, through the courage and great skill in obstetrics of\nQueequeg, the deliverance, or rather, delivery of Tashtego, was\nsuccessfully accomplished, in the teeth, too, of the most untoward and\napparently hopeless impediments; which is a lesson by no means to be\nforgotten. Midwifery should be taught in the same course with fencing\nand boxing, riding and rowing.\n\nI know that this queer adventure of the Gay-Header's will be sure to\nseem incredible to some landsmen, though they themselves may have\neither seen or heard of some one's falling into a cistern ashore; an\naccident which not seldom happens, and with much less reason too than\nthe Indian's, considering the exceeding slipperiness of the curb of\nthe Sperm Whale's well.\n\nBut, peradventure, it may be sagaciously urged, how is this? We\nthought the tissued, infiltrated head of the Sperm Whale, was the\nlightest and most corky part about him; and yet thou makest it sink in\nan element of a far greater specific gravity than itself. We have thee\nthere. Not at all, but I have ye; for at the time poor Tash fell in,\nthe case had been nearly emptied of its lighter contents, leaving\nlittle but the dense tendinous wall of the well  a double welded,\nhammered substance, as I have before said, much heavier than the sea\nwater, and a lump of which sinks in it like lead almost. But the\ntendency to rapid sinking in this substance was in the present\ninstance materially counteracted by the other parts of the head\nremaining undetached from it, so that it sank very slowly and\ndeliberately indeed, affording Queequeg a fair chance for performing\nhis agile obstetrics on the run, as you may say. Yes, it was a running\ndelivery, so it was.\n\nNow, had Tashtego perished in that head, it had been a very precious\nperishing; smothered in the very whitest and daintiest of fragrant\nspermaceti; coffined, hearsed, and tombed in the secret inner chamber\nand sanctum sanctorum of the whale. Only one sweeter end can readily\nbe recalled  the delicious death of an Ohio honey-hunter, who\nseeking honey in the crotch of a hollow tree, found such exceeding\nstore of it, that leaning too far over, it sucked him in, so that he\ndied embalmed. How many, think ye, have likewise fallen into Plato's\nhoney head, and sweetly perished there?\n\nCHAPTER 79 The Prairie.\n\nTo scan the lines of his face, or feel the bumps on the head of this\nLeviathan; this is a thing which no Physiognomist or Phrenologist has\nas yet undertaken. Such an enterprise would seem almost as hopeful as\nfor Lavater to have scrutinized the wrinkles on the Rock of Gibraltar,\nor for Gall to have mounted a ladder and manipulated the Dome of the\nPantheon. Still, in that famous work of his, Lavater not only treats\nof the various faces of men, but also attentively studies the faces of\nhorses, birds, serpents, and fish; and dwells in detail upon the\nmodifications of expression discernible therein. Nor have Gall and his\ndisciple Spurzheim failed to throw out some hints touching the\nphrenological characteristics of other beings than man. Therefore,\nthough I am but ill qualified for a pioneer, in the application of\nthese two semi-sciences to the whale, I will do my endeavor. I try all\nthings; I achieve what I can.\n\nPhysiognomically regarded, the Sperm Whale is an anomalous\ncreature. He has no proper nose. And since the nose is the central and\nmost conspicuous of the features; and since it perhaps most modifies\nand finally controls their combined expression; hence it would seem\nthat its entire absence, as an external appendage, must very largely\naffect the countenance of the whale. For as in landscape gardening, a\nspire, cupola, monument, or tower of some sort, is deemed almost\nindispensable to the completion of the scene; so no face can be\nphysiognomically in keeping without the elevated open-work belfry of\nthe nose. Dash the nose from Phidias's marble Jove, and what a sorry\nremainder! Nevertheless, Leviathan is of so mighty a magnitude, all\nhis proportions are so stately, that the same deficiency which in the\nsculptured Jove were hideous, in him is no blemish at all. Nay, it is\nan added grandeur. A nose to the whale would have been impertinent. As\non your physiognomical voyage you sail round his vast head in your\njolly-boat, your noble conceptions of him are never insulted by the\nreflection that he has a nose to be pulled. A pestilent conceit, which\nso often will insist upon obtruding even when beholding the mightiest\nroyal beadle on his throne.\n\nIn some particulars, perhaps the most imposing physiognomical view to\nbe had of the Sperm Whale, is that of the full front of his head. This\naspect is sublime.\n\nIn thought, a fine human brow is like the East when troubled with the\nmorning. In the repose of the pasture, the curled brow of the bull has\na touch of the grand in it. Pushing heavy cannon up mountain defiles,\nthe elephant's brow is majestic. Human or animal, the mystical brow is\nas that great golden seal affixed by the German Emperors to their\ndecrees. It signifies  \"God: done this day by my hand.\" But in most\ncreatures, nay in man himself, very often the brow is but a mere strip\nof alpine land lying along the snow line. Few are the foreheads which\nlike Shakespeare's or Melancthon's rise so high, and descend so low,\nthat the eyes themselves seem clear, eternal, tideless mountain lakes;\nand all above them in the forehead's wrinkles, you seem to track the\nantlered thoughts descending there to drink, as the Highland hunters\ntrack the snow prints of the deer. But in the great Sperm Whale, this\nhigh and mighty god-like dignity inherent in the brow is so immensely\namplified, that gazing on it, in that full front view, you feel the\nDeity and the dread powers more forcibly than in beholding any other\nobject in living nature. For you see no one point precisely; not one\ndistinct feature is revealed; no nose, eyes, ears, or mouth; no face;\nhe has none, proper; nothing but that one broad firmament of a\nforehead, pleated with riddles; dumbly lowering with the doom of\nboats, and ships, and men. Nor, in profile, does this wondrous brow\ndiminish; though that way viewed its grandeur does not domineer upon\nyou so. In profile, you plainly perceive that horizontal,\nsemi-crescentic depression in the forehead's middle, which, in man, is\nLavater's mark of genius.\n\nBut how? Genius in the Sperm Whale? Has the Sperm Whale ever written a\nbook, spoken a speech? No, his great genius is declared in his doing\nnothing particular to prove it. It is moreover declared in his\npyramidical silence. And this reminds me that had the great Sperm\nWhale been known to the young Orient World, he would have been deified\nby their child-magian thoughts. They deified the crocodile of the\nNile, because the crocodile is tongueless; and the Sperm Whale has no\ntongue, or at least it is so exceedingly small, as to be incapable of\nprotrusion. If hereafter any highly cultured, poetical nation shall\nlure back to their birth-right, the merry May-day gods of old; and\nlivingly enthrone them again in the now egotistical sky; in the now\nunhaunted hill; then be sure, exalted to Jove's high seat, the great\nSperm Whale shall lord it.\n\nChampollion deciphered the wrinkled granite hieroglyphics. But there\nis no Champollion to decipher the Egypt of every man's and every\nbeing's face. Physiognomy, like every other human science, is but a\npassing fable. If then, Sir William Jones, who read in thirty\nlanguages, could not read the simplest peasant's face in its\nprofounder and more subtle meanings, how may unlettered Ishmael hope\nto read the awful Chaldee of the Sperm Whale's brow? I but put that\nbrow before you. Read it if you can.\n\nCHAPTER 80 The Nut.\n\nIf the Sperm Whale be physiognomically a Sphinx, to the phrenologist\nhis brain seems that geometrical circle which it is impossible to\nsquare.\n\nIn the full-grown creature the skull will measure at least twenty feet\nin length. Unhinge the lower jaw, and the side view of this skull is\nas the side of a moderately inclined plane resting throughout on a\nlevel base. But in life  as we have elsewhere seen  this\ninclined plane is angularly filled up, and almost squared by the\nenormous superincumbent mass of the junk and sperm. At the high end\nthe skull forms a crater to bed that part of the mass; while under the\nlong floor of this crater  in another cavity seldom exceeding ten\ninches in length and as many in depth  reposes the mere handful of\nthis monster's brain. The brain is at least twenty feet from his\napparent forehead in life; it is hidden away behind its vast outworks,\nlike the innermost citadel within the amplified fortifications of\nQuebec. So like a choice casket is it secreted in him, that I have\nknown some whalemen who peremptorily deny that the Sperm Whale has any\nother brain than that palpable semblance of one formed by the\ncubic-yards of his sperm magazine. Lying in strange folds, courses,\nand convolutions, to their apprehensions, it seems more in keeping\nwith the idea of his general might to regard that mystic part of him\nas the seat of his intelligence.\n\nIt is plain, then, that phrenologically the head of this Leviathan, in\nthe creature's living intact state, is an entire delusion. As for his\ntrue brain, you can then see no indications of it, nor feel any. The\nwhale, like all things that are mighty, wears a false brow to the\ncommon world.\n\nIf you unload his skull of its spermy heaps and then take a rear view\nof its rear end, which is the high end, you will be struck by its\nresemblance to the human skull, beheld in the same situation, and from\nthe same point of view. Indeed, place this reversed skull (scaled down\nto the human magnitude) among a plate of men's skulls, and you would\ninvoluntarily confound it with them; and remarking the depressions on\none part of its summit, in phrenological phrase you would say  This\nman had no self-esteem, and no veneration. And by those negations,\nconsidered along with the affirmative fact of his prodigious bulk and\npower, you can best form to yourself the truest, though not the most\nexhilarating conception of what the most exalted potency is.\n\nBut if from the comparative dimensions of the whale's proper brain,\nyou deem it incapable of being adequately charted, then I have another\nidea for you. If you attentively regard almost any quadruped's spine,\nyou will be struck with the resemblance of its vertebrae to a strung\nnecklace of dwarfed skulls, all bearing rudimental resemblance to the\nskull proper. It is a German conceit, that the vertebrae are\nabsolutely undeveloped skulls. But the curious external resemblance, I\ntake it the Germans were not the first men to perceive. A foreign\nfriend once pointed it out to me, in the skeleton of a foe he had\nslain, and with the vertebrae of which he was inlaying, in a sort of\nbasso-relievo, the beaked prow of his canoe. Now, I consider that the\nphrenologists have omitted an important thing in not pushing their\ninvestigations from the cerebellum through the spinal canal. For I\nbelieve that much of a man's character will be found betokened in his\nbackbone. I would rather feel your spine than your skull, whoever you\nare. A thin joist of a spine never yet upheld a full and noble soul. I\nrejoice in my spine, as in the firm audacious staff of that flag which\nI fling half out to the world.\n\nApply this spinal branch of phrenology to the Sperm Whale. His cranial\ncavity is continuous with the first neck-vertebra; and in that\nvertebra the bottom of the spinal canal will measure ten inches\nacross, being eight in height, and of a triangular figure with the\nbase downwards. As it passes through the remaining vertebrae the canal\ntapers in size, but for a considerable distance remains of large\ncapacity. Now, of course, this canal is filled with much the same\nstrangely fibrous substance  the spinal cord  as the brain; and\ndirectly communicates with the brain. And what is still more, for many\nfeet after emerging from the brain's cavity, the spinal cord remains\nof an undecreasing girth, almost equal to that of the brain. Under all\nthese circumstances, would it be unreasonable to survey and map out\nthe whale's spine phrenologically? For, viewed in this light, the\nwonderful comparative smallness of his brain proper is more than\ncompensated by the wonderful comparative magnitude of his spinal cord.\n\nBut leaving this hint to operate as it may with the phrenologists, I\nwould merely assume the spinal theory for a moment, in reference to\nthe Sperm Whale's hump. This august hump, if I mistake not, rises over\none of the larger vertebrae, and is, therefore, in some sort, the\nouter convex mould of it. From its relative situation then, I should\ncall this high hump the organ of firmness or indomitableness in the\nSperm Whale. And that the great monster is indomitable, you will yet\nhave reason to know.\n\nCHAPTER 81 The Pequod Meets The Virgin.\n\nThe predestinated day arrived, and we duly met the ship Jungfrau,\nDerick De Deer, master, of Bremen.\n\nAt one time the greatest whaling people in the world, the Dutch and\nGermans are now among the least; but here and there at very wide\nintervals of latitude and longitude, you still occasionally meet with\ntheir flag in the Pacific.\n\nFor some reason, the Jungfrau seemed quite eager to pay her\nrespects. While yet some distance from the Pequod, she rounded to, and\ndropping a boat, her captain was impelled towards us, impatiently\nstanding in the bows instead of the stern.\n\n\"What has he in his hand there?\" cried Starbuck, pointing to something\nwavingly held by the German. \"Impossible!  a lamp-feeder!\"\n\n\"Not that,\" said Stubb, \"no, no, it's a coffee-pot, Mr. Starbuck; he's\ncoming off to make us our coffee, is the Yarman; don't you see that\nbig tin can there alongside of him?  that's his boiling water. Oh!\nhe's all right, is the Yarman.\"\n\n\"Go along with you,\" cried Flask, \"it's a lamp-feeder and an\noil-can. He's out of oil, and has come a-begging.\"\n\nHowever curious it may seem for an oil-ship to be borrowing oil on the\nwhale-ground, and however much it may invertedly contradict the old\nproverb about carrying coals to Newcastle, yet sometimes such a thing\nreally happens; and in the present case Captain Derick De Deer did\nindubitably conduct a lamp-feeder as Flask did declare.\n\nAs he mounted the deck, Ahab abruptly accosted him, without at all\nheeding what he had in his hand; but in his broken lingo, the German\nsoon evinced his complete ignorance of the White Whale; immediately\nturning the conversation to his lamp-feeder and oil can, with some\nremarks touching his having to turn into his hammock at night in\nprofound darkness  his last drop of Bremen oil being gone, and not\na single flying-fish yet captured to supply the deficiency; concluding\nby hinting that his ship was indeed what in the Fishery is technically\ncalled a clean one (that is, an empty one), well deserving the name of\nJungfrau or the Virgin.\n\nHis necessities supplied, Derick departed; but he had not gained his\nship's side, when whales were almost simultaneously raised from the\nmast-heads of both vessels; and so eager for the chase was Derick,\nthat without pausing to put his oil-can and lamp-feeder aboard, he\nslewed round his boat and made after the leviathan lamp-feeders.\n\nNow, the game having risen to leeward, he and the other three German\nboats that soon followed him, had considerably the start of the\nPequod's keels. There were eight whales, an average pod. Aware of\ntheir danger, they were going all abreast with great speed straight\nbefore the wind, rubbing their flanks as closely as so many spans of\nhorses in harness. They left a great, wide wake, as though continually\nunrolling a great wide parchment upon the sea.\n\nFull in this rapid wake, and many fathoms in the rear, swam a huge,\nhumped old bull, which by his comparatively slow progress, as well as\nby the unusual yellowish incrustations overgrowing him, seemed\nafflicted with the jaundice, or some other infirmity. Whether this\nwhale belonged to the pod in advance, seemed questionable; for it is\nnot customary for such venerable leviathans to be at all\nsocial. Nevertheless, he stuck to their wake, though indeed their back\nwater must have retarded him, because the white-bone or swell at his\nbroad muzzle was a dashed one, like the swell formed when two hostile\ncurrents meet. His spout was short, slow, and laborious; coming forth\nwith a choking sort of gush, and spending itself in torn shreds,\nfollowed by strange subterranean commotions in him, which seemed to\nhave egress at his other buried extremity, causing the waters behind\nhim to upbubble.\n\n\"Who's got some paregoric?\" said Stubb, \"he has the stomach-ache, I'm\nafraid. Lord, think of having half an acre of stomach-ache! Adverse\nwinds are holding mad Christmas in him, boys. It's the first foul wind\nI ever knew to blow from astern; but look, did ever whale yaw so\nbefore? it must be, he's lost his tiller.\"\n\nAs an overladen Indiaman bearing down the Hindostan coast with a deck\nload of frightened horses, careens, buries, rolls, and wallows on her\nway; so did this old whale heave his aged bulk, and now and then\npartly turning over on his cumbrous rib-ends, expose the cause of his\ndevious wake in the unnatural stump of his starboard fin. Whether he\nhad lost that fin in battle, or had been born without it, it were hard\nto say.\n\n\"Only wait a bit, old chap, and I'll give ye a sling for that wounded\narm,\" cried cruel Flask, pointing to the whale-line near him.\n\n\"Mind he don't sling thee with it,\" cried Starbuck. \"Give way, or the\nGerman will have him.\"\n\nWith one intent all the combined rival boats were pointed for this one\nfish, because not only was he the largest, and therefore the most\nvaluable whale, but he was nearest to them, and the other whales were\ngoing with such great velocity, moreover, as almost to defy pursuit\nfor the time. At this juncture the Pequod's keels had shot by the\nthree German boats last lowered; but from the great start he had had,\nDerick's boat still led the chase, though every moment neared by his\nforeign rivals. The only thing they feared, was, that from being\nalready so nigh to his mark, he would be enabled to dart his iron\nbefore they could completely overtake and pass him. As for Derick, he\nseemed quite confident that this would be the case, and occasionally\nwith a deriding gesture shook his lamp-feeder at the other boats.\n\n\"The ungracious and ungrateful dog!\" cried Starbuck; \"he mocks and\ndares me with the very poor-box I filled for him not five minutes\nago!\"  then in his old intense whisper  \"Give way, greyhounds!\nDog to it!\"\n\n\"I tell ye what it is, men\"  cried Stubb to his crew  \"it's\nagainst my religion to get mad; but I'd like to eat that villainous\nYarman  Pull  won't ye? Are ye going to let that rascal beat ye?\nDo ye love brandy? A hogshead of brandy, then, to the best man. Come,\nwhy don't some of ye burst a blood-vessel? Who's that been dropping an\nanchor overboard  we don't budge an inch  we're\nbecalmed. Halloo, here's grass growing in the boat's bottom  and by\nthe Lord, the mast there's budding. This won't do, boys. Look at that\nYarman! The short and long of it is, men, will ye spit fire or not?\"\n\n\"Oh! see the suds he makes!\" cried Flask, dancing up and down \n\"What a hump  Oh, do pile on the beef  lays like a log! Oh! my\nlads, do spring  slap-jacks and quahogs for supper, you know, my\nlads  baked clams and muffins  oh, do, do, spring,  he's a\nhundred barreller  don't lose him now  don't oh, don't  see\nthat Yarman  Oh, won't ye pull for your duff, my lads  such a\nsog! such a sogger! Don't ye love sperm? There goes three thousand\ndollars, men!  a bank!  a whole bank! The bank of England! \nOh, do, do, do!  What's that Yarman about now?\"\n\nAt this moment Derick was in the act of pitching his lamp-feeder at\nthe advancing boats, and also his oil-can; perhaps with the double\nview of retarding his rivals' way, and at the same time economically\naccelerating his own by the momentary impetus of the backward toss.\n\n\"The unmannerly Dutch dogger!\" cried Stubb. \"Pull now, men, like fifty\nthousand line-of-battle-ship loads of red-haired devils. What d'ye\nsay, Tashtego; are you the man to snap your spine in two-and-twenty\npieces for the honour of old Gayhead? What d'ye say?\"\n\n\"I say, pull like god-dam,\"  cried the Indian.\n\nFiercely, but evenly incited by the taunts of the German, the Pequod's\nthree boats now began ranging almost abreast; and, so disposed,\nmomentarily neared him. In that fine, loose, chivalrous attitude of\nthe headsman when drawing near to his prey, the three mates stood up\nproudly, occasionally backing the after oarsman with an exhilarating\ncry of, \"There she slides, now! Hurrah for the white-ash breeze! Down\nwith the Yarman! Sail over him!\"\n\nBut so decided an original start had Derick had, that spite of all\ntheir gallantry, he would have proved the victor in this race, had not\na righteous judgment descended upon him in a crab which caught the\nblade of his midship oarsman. While this clumsy lubber was striving to\nfree his white-ash, and while, in consequence, Derick's boat was nigh\nto capsizing, and he thundering away at his men in a mighty rage; \nthat was a good time for Starbuck, Stubb, and Flask. With a shout,\nthey took a mortal start forwards, and slantingly ranged up on the\nGerman's quarter. An instant more, and all four boats were\ndiagonically in the whale's immediate wake, while stretching from\nthem, on both sides, was the foaming swell that he made.\n\nIt was a terrific, most pitiable, and maddening sight. The whale was\nnow going head out, and sending his spout before him in a continual\ntormented jet; while his one poor fin beat his side in an agony of\nfright. Now to this hand, now to that, he yawed in his faltering\nflight, and still at every billow that he broke, he spasmodically sank\nin the sea, or sideways rolled towards the sky his one beating fin. So\nhave I seen a bird with clipped wing making affrighted broken circles\nin the air, vainly striving to escape the piratical hawks. But the\nbird has a voice, and with plaintive cries will make known her fear;\nbut the fear of this vast dumb brute of the sea, was chained up and\nenchanted in him; he had no voice, save that choking respiration\nthrough his spiracle, and this made the sight of him unspeakably\npitiable; while still, in his amazing bulk, portcullis jaw, and\nomnipotent tail, there was enough to appal the stoutest man who so\npitied.\n\nSeeing now that but a very few moments more would give the Pequod's\nboats the advantage, and rather than be thus foiled of his game,\nDerick chose to hazard what to him must have seemed a most unusually\nlong dart, ere the last chance would for ever escape.\n\nBut no sooner did his harpooneer stand up for the stroke, than all\nthree tigers  Queequeg, Tashtego, Daggoo  instinctively sprang\nto their feet, and standing in a diagonal row, simultaneously pointed\ntheir barbs; and darted over the head of the German harpooneer, their\nthree Nantucket irons entered the whale. Blinding vapours of foam and\nwhite-fire! The three boats, in the first fury of the whale's headlong\nrush, bumped the German's aside with such force, that both Derick and\nhis baffled harpooneer were spilled out, and sailed over by the three\nflying keels.\n\n\"Don't be afraid, my butter-boxes,\" cried Stubb, casting a passing\nglance upon them as he shot by; \"ye'll be picked up presently  all\nright  I saw some sharks astern  St. Bernard's dogs, you know\n relieve distressed travellers. Hurrah! this is the way to sail\nnow. Every keel a sunbeam! Hurrah!  Here we go like three tin\nkettles at the tail of a mad cougar! This puts me in mind of fastening\nto an elephant in a tilbury on a plain  makes the wheel-spokes fly,\nboys, when you fasten to him that way; and there's danger of being\npitched out too, when you strike a hill. Hurrah! this is the way a\nfellow feels when he's going to Davy Jones  all a rush down an\nendless inclined plane! Hurrah! this whale carries the everlasting\nmail!\"\n\nBut the monster's run was a brief one. Giving a sudden gasp, he\ntumultuously sounded. With a grating rush, the three lines flew round\nthe loggerheads with such a force as to gouge deep grooves in them;\nwhile so fearful were the harpooneers that this rapid sounding would\nsoon exhaust the lines, that using all their dexterous might, they\ncaught repeated smoking turns with the rope to hold on; till at last\n owing to the perpendicular strain from the lead-lined chocks of\nthe boats, whence the three ropes went straight down into the blue \nthe gunwales of the bows were almost even with the water, while the\nthree sterns tilted high in the air. And the whale soon ceasing to\nsound, for some time they remained in that attitude, fearful of\nexpending more line, though the position was a little ticklish. But\nthough boats have been taken down and lost in this way, yet it is this\n\"holding on,\" as it is called; this hooking up by the sharp barbs of\nhis live flesh from the back; this it is that often torments the\nLeviathan into soon rising again to meet the sharp lance of his\nfoes. Yet not to speak of the peril of the thing, it is to be doubted\nwhether this course is always the best; for it is but reasonable to\npresume, that the longer the stricken whale stays under water, the\nmore he is exhausted. Because, owing to the enormous surface of him\n in a full grown sperm whale something less than 2000 square feet\n the pressure of the water is immense. We all know what an\nastonishing atmospheric weight we ourselves stand up under; even here,\nabove-ground, in the air; how vast, then, the burden of a whale,\nbearing on his back a column of two hundred fathoms of ocean! It must\nat least equal the weight of fifty atmospheres. One whaleman has\nestimated it at the weight of twenty line-of-battle ships, with all\ntheir guns, and stores, and men on board.\n\nAs the three boats lay there on that gently rolling sea, gazing down\ninto its eternal blue noon; and as not a single groan or cry of any\nsort, nay, not so much as a ripple or a bubble came up from its\ndepths; what landsman would have thought, that beneath all that\nsilence and placidity, the utmost monster of the seas was writhing and\nwrenching in agony! Not eight inches of perpendicular rope were\nvisible at the bows. Seems it credible that by three such thin threads\nthe great Leviathan was suspended like the big weight to an eight day\nclock. Suspended? and to what? To three bits of board. Is this the\ncreature of whom it was once so triumphantly said  \"Canst thou fill\nhis skin with barbed irons? or his head with fish-spears? The sword of\nhim that layeth at him cannot hold, the spear, the dart, nor the\nhabergeon: he esteemeth iron as straw; the arrow cannot make him flee;\ndarts are counted as stubble; he laugheth at the shaking of a spear!\"\nThis the creature? this he? Oh! that unfulfilments should follow the\nprophets. For with the strength of a thousand thighs in his tail,\nLeviathan had run his head under the mountains of the sea, to hide him\nfrom the Pequod's fish-spears!\n\nIn that sloping afternoon sunlight, the shadows that the three boats\nsent down beneath the surface, must have been long enough and broad\nenough to shade half Xerxes' army. Who can tell how appalling to the\nwounded whale must have been such huge phantoms flitting over his\nhead!\n\n\"Stand by, men; he stirs,\" cried Starbuck, as the three lines suddenly\nvibrated in the water, distinctly conducting upwards to them, as by\nmagnetic wires, the life and death throbs of the whale, so that every\noarsman felt them in his seat. The next moment, relieved in great part\nfrom the downward strain at the bows, the boats gave a sudden bounce\nupwards, as a small icefield will, when a dense herd of white bears\nare scared from it into the sea.\n\n\"Haul in! Haul in!\" cried Starbuck again; \"he's rising.\"\n\nThe lines, of which, hardly an instant before, not one hand's breadth\ncould have been gained, were now in long quick coils flung back all\ndripping into the boats, and soon the whale broke water within two\nship's lengths of the hunters.\n\nHis motions plainly denoted his extreme exhaustion. In most land\nanimals there are certain valves or flood-gates in many of their\nveins, whereby when wounded, the blood is in some degree at least\ninstantly shut off in certain directions. Not so with the whale; one\nof whose peculiarities it is to have an entire non-valvular structure\nof the blood-vessels, so that when pierced even by so small a point as\na harpoon, a deadly drain is at once begun upon his whole arterial\nsystem; and when this is heightened by the extraordinary pressure of\nwater at a great distance below the surface, his life may be said to\npour from him in incessant streams. Yet so vast is the quantity of\nblood in him, and so distant and numerous its interior fountains, that\nhe will keep thus bleeding and bleeding for a considerable period;\neven as in a drought a river will flow, whose source is in the\nwell-springs of far-off and undiscernible hills. Even now, when the\nboats pulled upon this whale, and perilously drew over his swaying\nflukes, and the lances were darted into him, they were followed by\nsteady jets from the new made wound, which kept continually playing,\nwhile the natural spout-hole in his head was only at intervals,\nhowever rapid, sending its affrighted moisture into the air. From this\nlast vent no blood yet came, because no vital part of him had thus far\nbeen struck. His life, as they significantly call it, was untouched.\n\nAs the boats now more closely surrounded him, the whole upper part of\nhis form, with much of it that is ordinarily submerged, was plainly\nrevealed. His eyes, or rather the places where his eyes had been, were\nbeheld. As strange misgrown masses gather in the knot-holes of the\nnoblest oaks when prostrate, so from the points which the whale's eyes\nhad once occupied, now protruded blind bulbs, horribly pitiable to\nsee. But pity there was none. For all his old age, and his one arm,\nand his blind eyes, he must die the death and be murdered, in order to\nlight the gay bridals and other merry-makings of men, and also to\nilluminate the solemn churches that preach unconditional\ninoffensiveness by all to all. Still rolling in his blood, at last he\npartially disclosed a strangely discoloured bunch or protuberance, the\nsize of a bushel, low down on the flank.\n\n\"A nice spot,\" cried Flask; \"just let me prick him there once.\"\n\n\"Avast!\" cried Starbuck, \"there's no need of that!\"\n\nBut humane Starbuck was too late. At the instant of the dart an\nulcerous jet shot from this cruel wound, and goaded by it into more\nthan sufferable anguish, the whale now spouting thick blood, with\nswift fury blindly darted at the craft, bespattering them and their\nglorying crews all over with showers of gore, capsizing Flask's boat\nand marring the bows. It was his death stroke. For, by this time, so\nspent was he by loss of blood, that he helplessly rolled away from the\nwreck he had made; lay panting on his side, impotently flapped with\nhis stumped fin, then over and over slowly revolved like a waning\nworld; turned up the white secrets of his belly; lay like a log, and\ndied. It was most piteous, that last expiring spout. As when by unseen\nhands the water is gradually drawn off from some mighty fountain, and\nwith half-stifled melancholy gurglings the spray-column lowers and\nlowers to the ground  so the last long dying spout of the whale.\n\nSoon, while the crews were awaiting the arrival of the ship, the body\nshowed symptoms of sinking with all its treasures\nunrifled. Immediately, by Starbuck's orders, lines were secured to it\nat different points, so that ere long every boat was a buoy; the\nsunken whale being suspended a few inches beneath them by the\ncords. By very heedful management, when the ship drew nigh, the whale\nwas transferred to her side, and was strongly secured there by the\nstiffest fluke-chains, for it was plain that unless artificially\nupheld, the body would at once sink to the bottom.\n\nIt so chanced that almost upon first cutting into him with the spade,\nthe entire length of a corroded harpoon was found imbedded in his\nflesh, on the lower part of the bunch before described. But as the\nstumps of harpoons are frequently found in the dead bodies of captured\nwhales, with the flesh perfectly healed around them, and no prominence\nof any kind to denote their place; therefore, there must needs have\nbeen some other unknown reason in the present case fully to account\nfor the ulceration alluded to. But still more curious was the fact of\na lance-head of stone being found in him, not far from the buried\niron, the flesh perfectly firm about it. Who had darted that stone\nlance? And when? It might have been darted by some Nor' West Indian\nlong before America was discovered.\n\nWhat other marvels might have been rummaged out of this monstrous\ncabinet there is no telling. But a sudden stop was put to further\ndiscoveries, by the ship's being unprecedentedly dragged over sideways\nto the sea, owing to the body's immensely increasing tendency to\nsink. However, Starbuck, who had the ordering of affairs, hung on to\nit to the last; hung on to it so resolutely, indeed, that when at\nlength the ship would have been capsized, if still persisting in\nlocking arms with the body; then, when the command was given to break\nclear from it, such was the immovable strain upon the timber-heads to\nwhich the fluke-chains and cables were fastened, that it was\nimpossible to cast them off. Meantime everything in the Pequod was\naslant. To cross to the other side of the deck was like walking up the\nsteep gabled roof of a house. The ship groaned and gasped. Many of the\nivory inlayings of her bulwarks and cabins were started from their\nplaces, by the unnatural dislocation. In vain handspikes and crows\nwere brought to bear upon the immovable fluke-chains, to pry them\nadrift from the timberheads; and so low had the whale now settled that\nthe submerged ends could not be at all approached, while every moment\nwhole tons of ponderosity seemed added to the sinking bulk, and the\nship seemed on the point of going over.\n\n\"Hold on, hold on, won't ye?\" cried Stubb to the body, \"don't be in\nsuch a devil of a hurry to sink! By thunder, men, we must do something\nor go for it. No use prying there; avast, I say with your handspikes,\nand run one of ye for a prayer book and a pen-knife, and cut the big\nchains.\"\n\n\"Knife? Aye, aye,\" cried Queequeg, and seizing the carpenter's heavy\nhatchet, he leaned out of a porthole, and steel to iron, began\nslashing at the largest fluke-chains. But a few strokes, full of\nsparks, were given, when the exceeding strain effected the rest. With\na terrific snap, every fastening went adrift; the ship righted, the\ncarcase sank.\n\nNow, this occasional inevitable sinking of the recently killed Sperm\nWhale is a very curious thing; nor has any fisherman yet adequately\naccounted for it. Usually the dead Sperm Whale floats with great\nbuoyancy, with its side or belly considerably elevated above the\nsurface. If the only whales that thus sank were old, meagre, and\nbroken-hearted creatures, their pads of lard diminished and all their\nbones heavy and rheumatic; then you might with some reason assert that\nthis sinking is caused by an uncommon specific gravity in the fish so\nsinking, consequent upon this absence of buoyant matter in him. But it\nis not so. For young whales, in the highest health, and swelling with\nnoble aspirations, prematurely cut off in the warm flush and May of\nlife, with all their panting lard about them; even these brawny,\nbuoyant heroes do sometimes sink.\n\nBe it said, however, that the Sperm Whale is far less liable to this\naccident than any other species. Where one of that sort go down,\ntwenty Right Whales do. This difference in the species is no doubt\nimputable in no small degree to the greater quantity of bone in the\nRight Whale; his Venetian blinds alone sometimes weighing more than a\nton; from this incumbrance the Sperm Whale is wholly free. But there\nare instances where, after the lapse of many hours or several days,\nthe sunken whale again rises, more buoyant than in life. But the\nreason of this is obvious. Gases are generated in him; he swells to a\nprodigious magnitude; becomes a sort of animal balloon. A\nline-of-battle ship could hardly keep him under then. In the Shore\nWhaling, on soundings, among the Bays of New Zealand, when a Right\nWhale gives token of sinking, they fasten buoys to him, with plenty of\nrope; so that when the body has gone down, they know where to look for\nit when it shall have ascended again.\n\nIt was not long after the sinking of the body that a cry was heard\nfrom the Pequod's mast-heads, announcing that the Jungfrau was again\nlowering her boats; though the only spout in sight was that of a\nFin-Back, belonging to the species of uncapturable whales, because of\nits incredible power of swimming. Nevertheless, the Fin-Back's spout\nis so similar to the Sperm Whale's, that by unskilful fishermen it is\noften mistaken for it. And consequently Derick and all his host were\nnow in valiant chase of this unnearable brute. The Virgin crowding all\nsail, made after her four young keels, and thus they all disappeared\nfar to leeward, still in bold, hopeful chase.\n\nOh! many are the Fin-Backs, and many are the Dericks, my friend.\n\nCHAPTER 82 The Honour and Glory of Whaling.\n\nThere are some enterprises in which a careful disorderliness is the\ntrue method.\n\nThe more I dive into this matter of whaling, and push my researches up\nto the very spring-head of it so much the more am I impressed with its\ngreat honourableness and antiquity; and especially when I find so many\ngreat demi-gods and heroes, prophets of all sorts, who one way or\nother have shed distinction upon it, I am transported with the\nreflection that I myself belong, though but subordinately, to so\nemblazoned a fraternity.\n\nThe gallant Perseus, a son of Jupiter, was the first whaleman; and to\nthe eternal honour of our calling be it said, that the first whale\nattacked by our brotherhood was not killed with any sordid\nintent. Those were the knightly days of our profession, when we only\nbore arms to succor the distressed, and not to fill men's\nlamp-feeders. Every one knows the fine story of Perseus and Andromeda;\nhow the lovely Andromeda, the daughter of a king, was tied to a rock\non the sea-coast, and as Leviathan was in the very act of carrying her\noff, Perseus, the prince of whalemen, intrepidly advancing, harpooned\nthe monster, and delivered and married the maid. It was an admirable\nartistic exploit, rarely achieved by the best harpooneers of the\npresent day; inasmuch as this Leviathan was slain at the very first\ndart. And let no man doubt this Arkite story; for in the ancient\nJoppa, now Jaffa, on the Syrian coast, in one of the Pagan temples,\nthere stood for many ages the vast skeleton of a whale, which the\ncity's legends and all the inhabitants asserted to be the identical\nbones of the monster that Perseus slew. When the Romans took Joppa,\nthe same skeleton was carried to Italy in triumph. What seems most\nsingular and suggestively important in this story, is this: it was\nfrom Joppa that Jonah set sail.\n\nAkin to the adventure of Perseus and Andromeda  indeed, by some\nsupposed to be indirectly derived from it  is that famous story of\nSt. George and the Dragon; which dragon I maintain to have been a\nwhale; for in many old chronicles whales and dragons are strangely\njumbled together, and often stand for each other. \"Thou art as a lion\nof the waters, and as a dragon of the sea,\" saith Ezekiel; hereby,\nplainly meaning a whale; in truth, some versions of the Bible use that\nword itself. Besides, it would much subtract from the glory of the\nexploit had St. George but encountered a crawling reptile of the land,\ninstead of doing battle with the great monster of the deep. Any man\nmay kill a snake, but only a Perseus, a St. George, a Coffin, have the\nheart in them to march boldly up to a whale.\n\nLet not the modern paintings of this scene mislead us; for though the\ncreature encountered by that valiant whaleman of old is vaguely\nrepresented of a griffin-like shape, and though the battle is depicted\non land and the saint on horseback, yet considering the great\nignorance of those times, when the true form of the whale was unknown\nto artists; and considering that as in Perseus' case, St. George's\nwhale might have crawled up out of the sea on the beach; and\nconsidering that the animal ridden by St. George might have been only\na large seal, or sea-horse; bearing all this in mind, it will not\nappear altogether incompatible with the sacred legend and the\nancientest draughts of the scene, to hold this so-called dragon no\nother than the great Leviathan himself. In fact, placed before the\nstrict and piercing truth, this whole story will fare like that fish,\nflesh, and fowl idol of the Philistines, Dagon by name; who being\nplanted before the ark of Israel, his horse's head and both the palms\nof his hands fell off from him, and only the stump or fishy part of\nhim remained. Thus, then, one of our own noble stamp, even a whaleman,\nis the tutelary guardian of England; and by good rights, we\nharpooneers of Nantucket should be enrolled in the most noble order of\nSt. George. And therefore, let not the knights of that honourable\ncompany (none of whom, I venture to say, have ever had to do with a\nwhale like their great patron), let them never eye a Nantucketer with\ndisdain, since even in our woollen frocks and tarred trowsers we are\nmuch better entitled to St. George's decoration than they.\n\nWhether to admit Hercules among us or not, concerning this I long\nremained dubious: for though according to the Greek mythologies, that\nantique Crockett and Kit Carson  that brawny doer of rejoicing good\ndeeds, was swallowed down and thrown up by a whale; still, whether\nthat strictly makes a whaleman of him, that might be mooted. It\nnowhere appears that he ever actually harpooned his fish, unless,\nindeed, from the inside. Nevertheless, he may be deemed a sort of\ninvoluntary whaleman; at any rate the whale caught him, if he did not\nthe whale. I claim him for one of our clan.\n\nBut, by the best contradictory authorities, this Grecian story of\nHercules and the whale is considered to be derived from the still more\nancient Hebrew story of Jonah and the whale; and vice versa; certainly\nthey are very similar. If I claim the demigod then, why not the\nprophet?\n\nNor do heroes, saints, demigods, and prophets alone comprise the whole\nroll of our order. Our grand master is still to be named; for like\nroyal kings of old times, we find the head waters of our fraternity in\nnothing short of the great gods themselves. That wondrous oriental\nstory is now to be rehearsed from the Shaster, which gives us the\ndread Vishnoo, one of the three persons in the godhead of the Hindoos;\ngives us this divine Vishnoo himself for our Lord;  Vishnoo, who,\nby the first of his ten earthly incarnations, has for ever set apart\nand sanctified the whale. When Brahma, or the God of Gods, saith the\nShaster, resolved to recreate the world after one of its periodical\ndissolutions, he gave birth to Vishnoo, to preside over the work; but\nthe Vedas, or mystical books, whose perusal would seem to have been\nindispensable to Vishnoo before beginning the creation, and which\ntherefore must have contained something in the shape of practical\nhints to young architects, these Vedas were lying at the bottom of the\nwaters; so Vishnoo became incarnate in a whale, and sounding down in\nhim to the uttermost depths, rescued the sacred volumes. Was not this\nVishnoo a whaleman, then? even as a man who rides a horse is called a\nhorseman?\n\nPerseus, St. George, Hercules, Jonah, and Vishnoo! there's a\nmember-roll for you! What club but the whaleman's can head off like\nthat?\n\nCHAPTER 83 Jonah Historically Regarded.\n\nReference was made to the historical story of Jonah and the whale in\nthe preceding chapter. Now some Nantucketers rather distrust this\nhistorical story of Jonah and the whale. But then there were some\nsceptical Greeks and Romans, who, standing out from the orthodox\npagans of their times, equally doubted the story of Hercules and the\nwhale, and Arion and the dolphin; and yet their doubting those\ntraditions did not make those traditions one whit the less facts, for\nall that.\n\nOne old Sag-Harbor whaleman's chief reason for questioning the Hebrew\nstory was this:  He had one of those quaint old-fashioned Bibles,\nembellished with curious, unscientific plates; one of which\nrepresented Jonah's whale with two spouts in his head  a\npeculiarity only true with respect to a species of the Leviathan (the\nRight Whale, and the varieties of that order), concerning which the\nfishermen have this saying, \"A penny roll would choke him\"; his\nswallow is so very small. But, to this, Bishop Jebb's anticipative\nanswer is ready. It is not necessary, hints the Bishop, that we\nconsider Jonah as tombed in the whale's belly, but as temporarily\nlodged in some part of his mouth. And this seems reasonable enough in\nthe good Bishop. For truly, the Right Whale's mouth would accommodate\na couple of whist-tables, and comfortably seat all the\nplayers. Possibly, too, Jonah might have ensconced himself in a hollow\ntooth; but, on second thoughts, the Right Whale is toothless.\n\nAnother reason which Sag-Harbor (he went by that name) urged for his\nwant of faith in this matter of the prophet, was something obscurely\nin reference to his incarcerated body and the whale's gastric\njuices. But this objection likewise falls to the ground, because a\nGerman exegetist supposes that Jonah must have taken refuge in the\nfloating body of a DEAD whale  even as the French soldiers in the\nRussian campaign turned their dead horses into tents, and crawled into\nthem. Besides, it has been divined by other continental commentators,\nthat when Jonah was thrown overboard from the Joppa ship, he\nstraightway effected his escape to another vessel near by, some vessel\nwith a whale for a figure-head; and, I would add, possibly called \"The\nWhale,\" as some craft are nowadays christened the \"Shark,\" the \"Gull,\"\nthe \"Eagle.\" Nor have there been wanting learned exegetists who have\nopined that the whale mentioned in the book of Jonah merely meant a\nlife-preserver  an inflated bag of wind  which the endangered\nprophet swam to, and so was saved from a watery doom. Poor Sag-Harbor,\ntherefore, seems worsted all round. But he had still another reason\nfor his want of faith. It was this, if I remember right: Jonah was\nswallowed by the whale in the Mediterranean Sea, and after three days\nhe was vomited up somewhere within three days' journey of Nineveh, a\ncity on the Tigris, very much more than three days' journey across\nfrom the nearest point of the Mediterranean coast. How is that?\n\nBut was there no other way for the whale to land the prophet within\nthat short distance of Nineveh? Yes. He might have carried him round\nby the way of the Cape of Good Hope. But not to speak of the passage\nthrough the whole length of the Mediterranean, and another passage up\nthe Persian Gulf and Red Sea, such a supposition would involve the\ncomplete circumnavigation of all Africa in three days, not to speak of\nthe Tigris waters, near the site of Nineveh, being too shallow for any\nwhale to swim in. Besides, this idea of Jonah's weathering the Cape of\nGood Hope at so early a day would wrest the honour of the discovery of\nthat great headland from Bartholomew Diaz, its reputed discoverer, and\nso make modern history a liar.\n\nBut all these foolish arguments of old Sag-Harbor only evinced his\nfoolish pride of reason  a thing still more reprehensible in him,\nseeing that he had but little learning except what he had picked up\nfrom the sun and the sea. I say it only shows his foolish, impious\npride, and abominable, devilish rebellion against the reverend\nclergy. For by a Portuguese Catholic priest, this very idea of Jonah's\ngoing to Nineveh via the Cape of Good Hope was advanced as a signal\nmagnification of the general miracle. And so it was. Besides, to this\nday, the highly enlightened Turks devoutly believe in the historical\nstory of Jonah. And some three centuries ago, an English traveller in\nold Harris's Voyages, speaks of a Turkish Mosque built in honour of\nJonah, in which Mosque was a miraculous lamp that burnt without any\noil.\n\nCHAPTER 84 Pitchpoling.\n\nTo make them run easily and swiftly, the axles of carriages are\nanointed; and for much the same purpose, some whalers perform an\nanalogous operation upon their boat; they grease the bottom. Nor is it\nto be doubted that as such a procedure can do no harm, it may possibly\nbe of no contemptible advantage; considering that oil and water are\nhostile; that oil is a sliding thing, and that the object in view is\nto make the boat slide bravely. Queequeg believed strongly in\nanointing his boat, and one morning not long after the German ship\nJungfrau disappeared, took more than customary pains in that\noccupation; crawling under its bottom, where it hung over the side,\nand rubbing in the unctuousness as though diligently seeking to insure\na crop of hair from the craft's bald keel. He seemed to be working in\nobedience to some particular presentiment. Nor did it remain\nunwarranted by the event.\n\nTowards noon whales were raised; but so soon as the ship sailed down\nto them, they turned and fled with swift precipitancy; a disordered\nflight, as of Cleopatra's barges from Actium.\n\nNevertheless, the boats pursued, and Stubb's was foremost. By great\nexertion, Tashtego at last succeeded in planting one iron; but the\nstricken whale, without at all sounding, still continued his\nhorizontal flight, with added fleetness. Such unintermitted strainings\nupon the planted iron must sooner or later inevitably extract it. It\nbecame imperative to lance the flying whale, or be content to lose\nhim. But to haul the boat up to his flank was impossible, he swam so\nfast and furious. What then remained?\n\nOf all the wondrous devices and dexterities, the sleights of hand and\ncountless subtleties, to which the veteran whaleman is so often\nforced, none exceed that fine manoeuvre with the lance called\npitchpoling. Small sword, or broad sword, in all its exercises boasts\nnothing like it. It is only indispensable with an inveterate running\nwhale; its grand fact and feature is the wonderful distance to which\nthe long lance is accurately darted from a violently rocking, jerking\nboat, under extreme headway. Steel and wood included, the entire spear\nis some ten or twelve feet in length; the staff is much slighter than\nthat of the harpoon, and also of a lighter material  pine. It is\nfurnished with a small rope called a warp, of considerable length, by\nwhich it can be hauled back to the hand after darting.\n\nBut before going further, it is important to mention here, that though\nthe harpoon may be pitchpoled in the same way with the lance, yet it\nis seldom done; and when done, is still less frequently successful, on\naccount of the greater weight and inferior length of the harpoon as\ncompared with the lance, which in effect become serious drawbacks. As\na general thing, therefore, you must first get fast to a whale, before\nany pitchpoling comes into play.\n\nLook now at Stubb; a man who from his humorous, deliberate coolness\nand equanimity in the direst emergencies, was specially qualified to\nexcel in pitchpoling. Look at him; he stands upright in the tossed bow\nof the flying boat; wrapt in fleecy foam, the towing whale is forty\nfeet ahead. Handling the long lance lightly, glancing twice or thrice\nalong its length to see if it be exactly straight, Stubb whistlingly\ngathers up the coil of the warp in one hand, so as to secure its free\nend in his grasp, leaving the rest unobstructed. Then holding the\nlance full before his waistband's middle, he levels it at the whale;\nwhen, covering him with it, he steadily depresses the butt-end in his\nhand, thereby elevating the point till the weapon stands fairly\nbalanced upon his palm, fifteen feet in the air. He minds you somewhat\nof a juggler, balancing a long staff on his chin. Next moment with a\nrapid, nameless impulse, in a superb lofty arch the bright steel spans\nthe foaming distance, and quivers in the life spot of the\nwhale. Instead of sparkling water, he now spouts red blood.\n\n\"That drove the spigot out of him!\" cried Stubb. \"'Tis July's immortal\nFourth; all fountains must run wine today! Would now, it were old\nOrleans whiskey, or old Ohio, or unspeakable old Monongahela! Then,\nTashtego, lad, I'd have ye hold a canakin to the jet, and we'd drink\nround it! Yea, verily, hearts alive, we'd brew choice punch in the\nspread of his spout-hole there, and from that live punch-bowl quaff\nthe living stuff.\"\n\nAgain and again to such gamesome talk, the dexterous dart is repeated,\nthe spear returning to its master like a greyhound held in skilful\nleash. The agonized whale goes into his flurry; the tow-line is\nslackened, and the pitchpoler dropping astern, folds his hands, and\nmutely watches the monster die.\n\nCHAPTER 85 The Fountain.\n\nThat for six thousand years  and no one knows how many millions of\nages before  the great whales should have been spouting all over\nthe sea, and sprinkling and mistifying the gardens of the deep, as\nwith so many sprinkling or mistifying pots; and that for some\ncenturies back, thousands of hunters should have been close by the\nfountain of the whale, watching these sprinklings and spoutings \nthat all this should be, and yet, that down to this blessed minute\n(fifteen and a quarter minutes past one o'clock P.M. of this sixteenth\nday of December, A.D. 1851), it should still remain a problem, whether\nthese spoutings are, after all, really water, or nothing but vapour\n this is surely a noteworthy thing.\n\nLet us, then, look at this matter, along with some interesting items\ncontingent. Every one knows that by the peculiar cunning of their\ngills, the finny tribes in general breathe the air which at all times\nis combined with the element in which they swim; hence, a herring or a\ncod might live a century, and never once raise its head above the\nsurface. But owing to his marked internal structure which gives him\nregular lungs, like a human being's, the whale can only live by\ninhaling the disengaged air in the open atmosphere. Wherefore the\nnecessity for his periodical visits to the upper world. But he cannot\nin any degree breathe through his mouth, for, in his ordinary\nattitude, the Sperm Whale's mouth is buried at least eight feet\nbeneath the surface; and what is still more, his windpipe has no\nconnexion with his mouth. No, he breathes through his spiracle alone;\nand this is on the top of his head.\n\nIf I say, that in any creature breathing is only a function\nindispensable to vitality, inasmuch as it withdraws from the air a\ncertain element, which being subsequently brought into contact with\nthe blood imparts to the blood its vivifying principle, I do not think\nI shall err; though I may possibly use some superfluous scientific\nwords. Assume it, and it follows that if all the blood in a man could\nbe aerated with one breath, he might then seal up his nostrils and not\nfetch another for a considerable time. That is to say, he would then\nlive without breathing. Anomalous as it may seem, this is precisely\nthe case with the whale, who systematically lives, by intervals, his\nfull hour and more (when at the bottom) without drawing a single\nbreath, or so much as in any way inhaling a particle of air; for,\nremember, he has no gills. How is this? Between his ribs and on each\nside of his spine he is supplied with a remarkable involved Cretan\nlabyrinth of vermicelli-like vessels, which vessels, when he quits the\nsurface, are completely distended with oxygenated blood. So that for\nan hour or more, a thousand fathoms in the sea, he carries a surplus\nstock of vitality in him, just as the camel crossing the waterless\ndesert carries a surplus supply of drink for future use in its four\nsupplementary stomachs. The anatomical fact of this labyrinth is\nindisputable; and that the supposition founded upon it is reasonable\nand true, seems the more cogent to me, when I consider the otherwise\ninexplicable obstinacy of that leviathan in having his spoutings out,\nas the fishermen phrase it. This is what I mean. If unmolested, upon\nrising to the surface, the Sperm Whale will continue there for a\nperiod of time exactly uniform with all his other unmolested\nrisings. Say he stays eleven minutes, and jets seventy times, that is,\nrespires seventy breaths; then whenever he rises again, he will be\nsure to have his seventy breaths over again, to a minute. Now, if\nafter he fetches a few breaths you alarm him, so that he sounds, he\nwill be always dodging up again to make good his regular allowance of\nair. And not till those seventy breaths are told, will he finally go\ndown to stay out his full term below. Remark, however, that in\ndifferent individuals these rates are different; but in any one they\nare alike. Now, why should the whale thus insist upon having his\nspoutings out, unless it be to replenish his reservoir of air, ere\ndescending for good? How obvious is it, too, that this necessity for\nthe whale's rising exposes him to all the fatal hazards of the\nchase. For not by hook or by net could this vast leviathan be caught,\nwhen sailing a thousand fathoms beneath the sunlight. Not so much thy\nskill, then, O hunter, as the great necessities that strike the\nvictory to thee!\n\nIn man, breathing is incessantly going on  one breath only serving\nfor two or three pulsations; so that whatever other business he has to\nattend to, waking or sleeping, breathe he must, or die he will. But\nthe Sperm Whale only breathes about one seventh or Sunday of his time.\n\nIt has been said that the whale only breathes through his spout-hole;\nif it could truthfully be added that his spouts are mixed with water,\nthen I opine we should be furnished with the reason why his sense of\nsmell seems obliterated in him; for the only thing about him that at\nall answers to his nose is that identical spout-hole; and being so\nclogged with two elements, it could not be expected to have the power\nof smelling. But owing to the mystery of the spout  whether it be\nwater or whether it be vapour  no absolute certainty can as yet be\narrived at on this head. Sure it is, nevertheless, that the Sperm\nWhale has no proper olfactories. But what does he want of them? No\nroses, no violets, no Cologne-water in the sea.\n\nFurthermore, as his windpipe solely opens into the tube of his\nspouting canal, and as that long canal  like the grand Erie Canal\n is furnished with a sort of locks (that open and shut) for the\ndownward retention of air or the upward exclusion of water, therefore\nthe whale has no voice; unless you insult him by saying, that when he\nso strangely rumbles, he talks through his nose. But then again, what\nhas the whale to say? Seldom have I known any profound being that had\nanything to say to this world, unless forced to stammer out something\nby way of getting a living. Oh! happy that the world is such an\nexcellent listener!\n\nNow, the spouting canal of the Sperm Whale, chiefly intended as it is\nfor the conveyance of air, and for several feet laid along,\nhorizontally, just beneath the upper surface of his head, and a little\nto one side; this curious canal is very much like a gas-pipe laid down\nin a city on one side of a street. But the question returns whether\nthis gas-pipe is also a water-pipe; in other words, whether the spout\nof the Sperm Whale is the mere vapour of the exhaled breath, or\nwhether that exhaled breath is mixed with water taken in at the mouth,\nand discharged through the spiracle. It is certain that the mouth\nindirectly communicates with the spouting canal; but it cannot be\nproved that this is for the purpose of discharging water through the\nspiracle. Because the greatest necessity for so doing would seem to\nbe, when in feeding he accidentally takes in water. But the Sperm\nWhale's food is far beneath the surface, and there he cannot spout\neven if he would. Besides, if you regard him very closely, and time\nhim with your watch, you will find that when unmolested, there is an\nundeviating rhyme between the periods of his jets and the ordinary\nperiods of respiration.\n\nBut why pester one with all this reasoning on the subject? Speak out!\nYou have seen him spout; then declare what the spout is; can you not\ntell water from air? My dear sir, in this world it is not so easy to\nsettle these plain things. I have ever found your plain things the\nknottiest of all. And as for this whale spout, you might almost stand\nin it, and yet be undecided as to what it is precisely.\n\nThe central body of it is hidden in the snowy sparkling mist\nenveloping it; and how can you certainly tell whether any water falls\nfrom it, when, always, when you are close enough to a whale to get a\nclose view of his spout, he is in a prodigious commotion, the water\ncascading all around him. And if at such times you should think that\nyou really perceived drops of moisture in the spout, how do you know\nthat they are not merely condensed from its vapour; or how do you know\nthat they are not those identical drops superficially lodged in the\nspout-hole fissure, which is countersunk into the summit of the\nwhale's head? For even when tranquilly swimming through the mid-day\nsea in a calm, with his elevated hump sun-dried as a dromedary's in\nthe desert; even then, the whale always carries a small basin of water\non his head, as under a blazing sun you will sometimes see a cavity in\na rock filled up with rain.\n\nNor is it at all prudent for the hunter to be over curious touching\nthe precise nature of the whale spout. It will not do for him to be\npeering into it, and putting his face in it. You cannot go with your\npitcher to this fountain and fill it, and bring it away. For even when\ncoming into slight contact with the outer, vapoury shreds of the jet,\nwhich will often happen, your skin will feverishly smart, from the\nacridness of the thing so touching it. And I know one, who coming into\nstill closer contact with the spout, whether with some scientific\nobject in view, or otherwise, I cannot say, the skin peeled off from\nhis cheek and arm. Wherefore, among whalemen, the spout is deemed\npoisonous; they try to evade it. Another thing; I have heard it said,\nand I do not much doubt it, that if the jet is fairly spouted into\nyour eyes, it will blind you. The wisest thing the investigator can do\nthen, it seems to me, is to let this deadly spout alone.\n\nStill, we can hypothesize, even if we cannot prove and establish. My\nhypothesis is this: that the spout is nothing but mist. And besides\nother reasons, to this conclusion I am impelled, by considerations\ntouching the great inherent dignity and sublimity of the Sperm Whale;\nI account him no common, shallow being, inasmuch as it is an\nundisputed fact that he is never found on soundings, or near shores;\nall other whales sometimes are. He is both ponderous and profound. And\nI am convinced that from the heads of all ponderous profound beings,\nsuch as Plato, Pyrrho, the Devil, Jupiter, Dante, and so on, there\nalways goes up a certain semi-visible steam, while in the act of\nthinking deep thoughts. While composing a little treatise on Eternity,\nI had the curiosity to place a mirror before me; and ere long saw\nreflected there, a curious involved worming and undulation in the\natmosphere over my head. The invariable moisture of my hair, while\nplunged in deep thought, after six cups of hot tea in my thin shingled\nattic, of an August noon; this seems an additional argument for the\nabove supposition.\n\nAnd how nobly it raises our conceit of the mighty, misty monster, to\nbehold him solemnly sailing through a calm tropical sea; his vast,\nmild head overhung by a canopy of vapour, engendered by his\nincommunicable contemplations, and that vapour  as you will\nsometimes see it  glorified by a rainbow, as if Heaven itself had\nput its seal upon his thoughts. For, d'ye see, rainbows do not visit\nthe clear air; they only irradiate vapour. And so, through all the\nthick mists of the dim doubts in my mind, divine intuitions now and\nthen shoot, enkindling my fog with a heavenly ray. And for this I\nthank God; for all have doubts; many deny; but doubts or denials, few\nalong with them, have intuitions. Doubts of all things earthly, and\nintuitions of some things heavenly; this combination makes neither\nbeliever nor infidel, but makes a man who regards them both with equal\neye.\n\nCHAPTER 86 The Tail.\n\nOther poets have warbled the praises of the soft eye of the antelope,\nand the lovely plumage of the bird that never alights; less celestial,\nI celebrate a tail.\n\nReckoning the largest sized Sperm Whale's tail to begin at that point\nof the trunk where it tapers to about the girth of a man, it comprises\nupon its upper surface alone, an area of at least fifty square\nfeet. The compact round body of its root expands into two broad, firm,\nflat palms or flukes, gradually shoaling away to less than an inch in\nthickness. At the crotch or junction, these flukes slightly overlap,\nthen sideways recede from each other like wings, leaving a wide\nvacancy between. In no living thing are the lines of beauty more\nexquisitely defined than in the crescentic borders of these flukes. At\nits utmost expansion in the full grown whale, the tail will\nconsiderably exceed twenty feet across.\n\nThe entire member seems a dense webbed bed of welded sinews; but cut\ninto it, and you find that three distinct strata compose it: \nupper, middle, and lower. The fibres in the upper and lower layers,\nare long and horizontal; those of the middle one, very short, and\nrunning crosswise between the outside layers. This triune structure,\nas much as anything else, imparts power to the tail. To the student of\nold Roman walls, the middle layer will furnish a curious parallel to\nthe thin course of tiles always alternating with the stone in those\nwonderful relics of the antique, and which undoubtedly contribute so\nmuch to the great strength of the masonry.\n\nBut as if this vast local power in the tendinous tail were not enough,\nthe whole bulk of the leviathan is knit over with a warp and woof of\nmuscular fibres and filaments, which passing on either side the loins\nand running down into the flukes, insensibly blend with them, and\nlargely contribute to their might; so that in the tail the confluent\nmeasureless force of the whole whale seems concentrated to a\npoint. Could annihilation occur to matter, this were the thing to do\nit.\n\nNor does this  its amazing strength, at all tend to cripple the\ngraceful flexion of its motions; where infantileness of ease undulates\nthrough a Titanism of power. On the contrary, those motions derive\ntheir most appalling beauty from it. Real strength never impairs\nbeauty or harmony, but it often bestows it; and in everything\nimposingly beautiful, strength has much to do with the magic. Take\naway the tied tendons that all over seem bursting from the marble in\nthe carved Hercules, and its charm would be gone. As devout Eckerman\nlifted the linen sheet from the naked corpse of Goethe, he was\noverwhelmed with the massive chest of the man, that seemed as a Roman\ntriumphal arch. When Angelo paints even God the Father in human form,\nmark what robustness is there. And whatever they may reveal of the\ndivine love in the Son, the soft, curled, hermaphroditical Italian\npictures, in which his idea has been most successfully embodied; these\npictures, so destitute as they are of all brawniness, hint nothing of\nany power, but the mere negative, feminine one of submission and\nendurance, which on all hands it is conceded, form the peculiar\npractical virtues of his teachings.\n\nSuch is the subtle elasticity of the organ I treat of, that whether\nwielded in sport, or in earnest, or in anger, whatever be the mood it\nbe in, its flexions are invariably marked by exceeding grace. Therein\nno fairy's arm can transcend it.\n\nFive great motions are peculiar to it. First, when used as a fin for\nprogression; Second, when used as a mace in battle; Third, in\nsweeping; Fourth, in lobtailing; Fifth, in peaking flukes.\n\nFirst: Being horizontal in its position, the Leviathan's tail acts in\na different manner from the tails of all other sea creatures. It never\nwriggles. In man or fish, wriggling is a sign of inferiority. To the\nwhale, his tail is the sole means of propulsion. Scroll-wise coiled\nforwards beneath the body, and then rapidly sprung backwards, it is\nthis which gives that singular darting, leaping motion to the monster\nwhen furiously swimming. His side-fins only serve to steer by.\n\nSecond: It is a little significant, that while one sperm whale only\nfights another sperm whale with his head and jaw, nevertheless, in his\nconflicts with man, he chiefly and contemptuously uses his tail. In\nstriking at a boat, he swiftly curves away his flukes from it, and the\nblow is only inflicted by the recoil. If it be made in the\nunobstructed air, especially if it descend to its mark, the stroke is\nthen simply irresistible. No ribs of man or boat can withstand\nit. Your only salvation lies in eluding it; but if it comes sideways\nthrough the opposing water, then partly owing to the light buoyancy of\nthe whale boat, and the elasticity of its materials, a cracked rib or\na dashed plank or two, a sort of stitch in the side, is generally the\nmost serious result. These submerged side blows are so often received\nin the fishery, that they are accounted mere child's play. Some one\nstrips off a frock, and the hole is stopped.\n\nThird: I cannot demonstrate it, but it seems to me, that in the whale\nthe sense of touch is concentrated in the tail; for in this respect\nthere is a delicacy in it only equalled by the daintiness of the\nelephant's trunk. This delicacy is chiefly evinced in the action of\nsweeping, when in maidenly gentleness the whale with a certain soft\nslowness moves his immense flukes from side to side upon the surface\nof the sea; and if he feel but a sailor's whisker, woe to that sailor,\nwhiskers and all. What tenderness there is in that preliminary touch!\nHad this tail any prehensile power, I should straightway bethink me of\nDarmonodes' elephant that so frequented the flower-market, and with\nlow salutations presented nosegays to damsels, and then caressed their\nzones. On more accounts than one, a pity it is that the whale does not\npossess this prehensile virtue in his tail; for I have heard of yet\nanother elephant, that when wounded in the fight, curved round his\ntrunk and extracted the dart.\n\nFourth: Stealing unawares upon the whale in the fancied security of\nthe middle of solitary seas, you find him unbent from the vast\ncorpulence of his dignity, and kitten-like, he plays on the ocean as\nif it were a hearth. But still you see his power in his play. The\nbroad palms of his tail are flirted high into the air; then smiting\nthe surface, the thunderous concussion resounds for miles. You would\nalmost think a great gun had been discharged; and if you noticed the\nlight wreath of vapour from the spiracle at his other extremity, you\nwould think that that was the smoke from the touch-hole.\n\nFifth: As in the ordinary floating posture of the leviathan the flukes\nlie considerably below the level of his back, they are then completely\nout of sight beneath the surface; but when he is about to plunge into\nthe deeps, his entire flukes with at least thirty feet of his body are\ntossed erect in the air, and so remain vibrating a moment, till they\ndownwards shoot out of view. Excepting the sublime breach \nsomewhere else to be described  this peaking of the whale's flukes\nis perhaps the grandest sight to be seen in all animated nature. Out\nof the bottomless profundities the gigantic tail seems spasmodically\nsnatching at the highest heaven. So in dreams, have I seen majestic\nSatan thrusting forth his tormented colossal claw from the flame\nBaltic of Hell. But in gazing at such scenes, it is all in all what\nmood you are in; if in the Dantean, the devils will occur to you; if\nin that of Isaiah, the archangels. Standing at the mast-head of my\nship during a sunrise that crimsoned sky and sea, I once saw a large\nherd of whales in the east, all heading towards the sun, and for a\nmoment vibrating in concert with peaked flukes. As it seemed to me at\nthe time, such a grand embodiment of adoration of the gods was never\nbeheld, even in Persia, the home of the fire worshippers. As Ptolemy\nPhilopater testified of the African elephant, I then testified of the\nwhale, pronouncing him the most devout of all beings. For according to\nKing Juba, the military elephants of antiquity often hailed the\nmorning with their trunks uplifted in the profoundest silence.\n\nThe chance comparison in this chapter, between the whale and the\nelephant, so far as some aspects of the tail of the one and the trunk\nof the other are concerned, should not tend to place those two\nopposite organs on an equality, much less the creatures to which they\nrespectively belong. For as the mightiest elephant is but a terrier to\nLeviathan, so, compared with Leviathan's tail, his trunk is but the\nstalk of a lily. The most direful blow from the elephant's trunk were\nas the playful tap of a fan, compared with the measureless crush and\ncrash of the sperm whale's ponderous flukes, which in repeated\ninstances have one after the other hurled entire boats with all their\noars and crews into the air, very much as an Indian juggler tosses his\nballs.\n\nThe more I consider this mighty tail, the more do I deplore my\ninability to express it. At times there are gestures in it, which,\nthough they would well grace the hand of man, remain wholly\ninexplicable. In an extensive herd, so remarkable, occasionally, are\nthese mystic gestures, that I have heard hunters who have declared\nthem akin to Free-Mason signs and symbols; that the whale, indeed, by\nthese methods intelligently conversed with the world. Nor are there\nwanting other motions of the whale in his general body, full of\nstrangeness, and unaccountable to his most experienced\nassailant. Dissect him how I may, then, I but go skin deep; I know him\nnot, and never will. But if I know not even the tail of this whale,\nhow understand his head? much more, how comprehend his face, when face\nhe has none? Thou shalt see my back parts, my tail, he seems to say,\nbut my face shall not be seen. But I cannot completely make out his\nback parts; and hint what he will about his face, I say again he has\nno face.\n\n Though all comparison in the way of general bulk between the whale\nand the elephant is preposterous, inasmuch as in that particular the\nelephant stands in much the same respect to the whale that a dog does\nto the elephant; nevertheless, there are not wanting some points of\ncurious similitude; among these is the spout. It is well known that\nthe elephant will often draw up water or dust in his trunk, and then\nelevating it, jet it forth in a stream.\n\nCHAPTER 87 The Grand Armada.\n\nThe long and narrow peninsula of Malacca, extending south-eastward\nfrom the territories of Birmah, forms the most southerly point of all\nAsia. In a continuous line from that peninsula stretch the long\nislands of Sumatra, Java, Bally, and Timor; which, with many others,\nform a vast mole, or rampart, lengthwise connecting Asia with\nAustralia, and dividing the long unbroken Indian ocean from the\nthickly studded oriental archipelagoes. This rampart is pierced by\nseveral sally-ports for the convenience of ships and whales;\nconspicuous among which are the straits of Sunda and Malacca. By the\nstraits of Sunda, chiefly, vessels bound to China from the west,\nemerge into the China seas.\n\nThose narrow straits of Sunda divide Sumatra from Java; and standing\nmidway in that vast rampart of islands, buttressed by that bold green\npromontory, known to seamen as Java Head; they not a little correspond\nto the central gateway opening into some vast walled empire: and\nconsidering the inexhaustible wealth of spices, and silks, and jewels,\nand gold, and ivory, with which the thousand islands of that oriental\nsea are enriched, it seems a significant provision of nature, that\nsuch treasures, by the very formation of the land, should at least\nbear the appearance, however ineffectual, of being guarded from the\nall-grasping western world. The shores of the Straits of Sunda are\nunsupplied with those domineering fortresses which guard the entrances\nto the Mediterranean, the Baltic, and the Propontis. Unlike the Danes,\nthese Orientals do not demand the obsequious homage of lowered\ntop-sails from the endless procession of ships before the wind, which\nfor centuries past, by night and by day, have passed between the\nislands of Sumatra and Java, freighted with the costliest cargoes of\nthe east. But while they freely waive a ceremonial like this, they do\nby no means renounce their claim to more solid tribute.\n\nTime out of mind the piratical proas of the Malays, lurking among the\nlow shaded coves and islets of Sumatra, have sallied out upon the\nvessels sailing through the straits, fiercely demanding tribute at the\npoint of their spears. Though by the repeated bloody chastisements\nthey have received at the hands of European cruisers, the audacity of\nthese corsairs has of late been somewhat repressed; yet, even at the\npresent day, we occasionally hear of English and American vessels,\nwhich, in those waters, have been remorselessly boarded and pillaged.\n\nWith a fair, fresh wind, the Pequod was now drawing nigh to these\nstraits; Ahab purposing to pass through them into the Javan sea, and\nthence, cruising northwards, over waters known to be frequented here\nand there by the Sperm Whale, sweep inshore by the Philippine Islands,\nand gain the far coast of Japan, in time for the great whaling season\nthere. By these means, the circumnavigating Pequod would sweep almost\nall the known Sperm Whale cruising grounds of the world, previous to\ndescending upon the Line in the Pacific; where Ahab, though everywhere\nelse foiled in his pursuit, firmly counted upon giving battle to Moby\nDick, in the sea he was most known to frequent; and at a season when\nhe might most reasonably be presumed to be haunting it.\n\nBut how now? in this zoned quest, does Ahab touch no land? does his\ncrew drink air? Surely, he will stop for water. Nay. For a long time,\nnow, the circus-running sun has raced within his fiery ring, and needs\nno sustenance but what's in himself. So Ahab. Mark this, too, in the\nwhaler. While other hulls are loaded down with alien stuff, to be\ntransferred to foreign wharves; the world-wandering whale-ship carries\nno cargo but herself and crew, their weapons and their wants. She has\na whole lake's contents bottled in her ample hold. She is ballasted\nwith utilities; not altogether with unusable pig-lead and\nkentledge. She carries years' water in her. Clear old prime Nantucket\nwater; which, when three years afloat, the Nantucketer, in the\nPacific, prefers to drink before the brackish fluid, but yesterday\nrafted off in casks, from the Peruvian or Indian streams. Hence it is,\nthat, while other ships may have gone to China from New York, and back\nagain, touching at a score of ports, the whale-ship, in all that\ninterval, may not have sighted one grain of soil; her crew having seen\nno man but floating seamen like themselves. So that did you carry them\nthe news that another flood had come; they would only answer \n\"Well, boys, here's the ark!\"\n\nNow, as many Sperm Whales had been captured off the western coast of\nJava, in the near vicinity of the Straits of Sunda; indeed, as most of\nthe ground, roundabout, was generally recognised by the fishermen as\nan excellent spot for cruising; therefore, as the Pequod gained more\nand more upon Java Head, the look-outs were repeatedly hailed, and\nadmonished to keep wide awake. But though the green palmy cliffs of\nthe land soon loomed on the starboard bow, and with delighted nostrils\nthe fresh cinnamon was snuffed in the air, yet not a single jet was\ndescried. Almost renouncing all thought of falling in with any game\nhereabouts, the ship had well nigh entered the straits, when the\ncustomary cheering cry was heard from aloft, and ere long a spectacle\nof singular magnificence saluted us.\n\nBut here be it premised, that owing to the unwearied activity with\nwhich of late they have been hunted over all four oceans, the Sperm\nWhales, instead of almost invariably sailing in small detached\ncompanies, as in former times, are now frequently met with in\nextensive herds, sometimes embracing so great a multitude, that it\nwould almost seem as if numerous nations of them had sworn solemn\nleague and covenant for mutual assistance and protection. To this\naggregation of the Sperm Whale into such immense caravans, may be\nimputed the circumstance that even in the best cruising grounds, you\nmay now sometimes sail for weeks and months together, without being\ngreeted by a single spout; and then be suddenly saluted by what\nsometimes seems thousands on thousands.\n\nBroad on both bows, at the distance of some two or three miles, and\nforming a great semicircle, embracing one half of the level horizon, a\ncontinuous chain of whale-jets were up-playing and sparkling in the\nnoon-day air. Unlike the straight perpendicular twin-jets of the Right\nWhale, which, dividing at top, fall over in two branches, like the\ncleft drooping boughs of a willow, the single forward-slanting spout\nof the Sperm Whale presents a thick curled bush of white mist,\ncontinually rising and falling away to leeward.\n\nSeen from the Pequod's deck, then, as she would rise on a high hill of\nthe sea, this host of vapoury spouts, individually curling up into the\nair, and beheld through a blending atmosphere of bluish haze, showed\nlike the thousand cheerful chimneys of some dense metropolis, descried\nof a balmy autumnal morning, by some horseman on a height.\n\nAs marching armies approaching an unfriendly defile in the mountains,\naccelerate their march, all eagerness to place that perilous passage\nin their rear, and once more expand in comparative security upon the\nplain; even so did this vast fleet of whales now seem hurrying forward\nthrough the straits; gradually contracting the wings of their\nsemicircle, and swimming on, in one solid, but still crescentic\ncentre.\n\nCrowding all sail the Pequod pressed after them; the harpooneers\nhandling their weapons, and loudly cheering from the heads of their\nyet suspended boats. If the wind only held, little doubt had they,\nthat chased through these Straits of Sunda, the vast host would only\ndeploy into the Oriental seas to witness the capture of not a few of\ntheir number. And who could tell whether, in that congregated caravan,\nMoby Dick himself might not temporarily be swimming, like the\nworshipped white-elephant in the coronation procession of the Siamese!\nSo with stun-sail piled on stun-sail, we sailed along, driving these\nleviathans before us; when, of a sudden, the voice of Tashtego was\nheard, loudly directing attention to something in our wake.\n\nCorresponding to the crescent in our van, we beheld another in our\nrear. It seemed formed of detached white vapours, rising and falling\nsomething like the spouts of the whales; only they did not so\ncompletely come and go; for they constantly hovered, without finally\ndisappearing. Levelling his glass at this sight, Ahab quickly revolved\nin his pivot-hole, crying, \"Aloft there, and rig whips and buckets to\nwet the sails;  Malays, sir, and after us!\"\n\nAs if too long lurking behind the headlands, till the Pequod should\nfairly have entered the straits, these rascally Asiatics were now in\nhot pursuit, to make up for their over-cautious delay. But when the\nswift Pequod, with a fresh leading wind, was herself in hot chase; how\nvery kind of these tawny philanthropists to assist in speeding her on\nto her own chosen pursuit,  mere riding-whips and rowels to her,\nthat they were. As with glass under arm, Ahab to-and-fro paced the\ndeck; in his forward turn beholding the monsters he chased, and in the\nafter one the bloodthirsty pirates chasing him; some such fancy as the\nabove seemed his. And when he glanced upon the green walls of the\nwatery defile in which the ship was then sailing, and bethought him\nthat through that gate lay the route to his vengeance, and beheld, how\nthat through that same gate he was now both chasing and being chased\nto his deadly end; and not only that, but a herd of remorseless wild\npirates and inhuman atheistical devils were infernally cheering him on\nwith their curses;  when all these conceits had passed through his\nbrain, Ahab's brow was left gaunt and ribbed, like the black sand\nbeach after some stormy tide has been gnawing it, without being able\nto drag the firm thing from its place.\n\nBut thoughts like these troubled very few of the reckless crew; and\nwhen, after steadily dropping and dropping the pirates astern, the\nPequod at last shot by the vivid green Cockatoo Point on the Sumatra\nside, emerging at last upon the broad waters beyond; then, the\nharpooneers seemed more to grieve that the swift whales had been\ngaining upon the ship, than to rejoice that the ship had so\nvictoriously gained upon the Malays. But still driving on in the wake\nof the whales, at length they seemed abating their speed; gradually\nthe ship neared them; and the wind now dying away, word was passed to\nspring to the boats. But no sooner did the herd, by some presumed\nwonderful instinct of the Sperm Whale, become notified of the three\nkeels that were after them,  though as yet a mile in their rear,\n than they rallied again, and forming in close ranks and\nbattalions, so that their spouts all looked like flashing lines of\nstacked bayonets, moved on with redoubled velocity.\n\nStripped to our shirts and drawers, we sprang to the white-ash, and\nafter several hours' pulling were almost disposed to renounce the\nchase, when a general pausing commotion among the whales gave\nanimating token that they were now at last under the influence of that\nstrange perplexity of inert irresolution, which, when the fishermen\nperceive it in the whale, they say he is gallied. The compact martial\ncolumns in which they had been hitherto rapidly and steadily swimming,\nwere now broken up in one measureless rout; and like King Porus'\nelephants in the Indian battle with Alexander, they seemed going mad\nwith consternation. In all directions expanding in vast irregular\ncircles, and aimlessly swimming hither and thither, by their short\nthick spoutings, they plainly betrayed their distraction of\npanic. This was still more strangely evinced by those of their number,\nwho, completely paralysed as it were, helplessly floated like\nwater-logged dismantled ships on the sea. Had these Leviathans been\nbut a flock of simple sheep, pursued over the pasture by three fierce\nwolves, they could not possibly have evinced such excessive\ndismay. But this occasional timidity is characteristic of almost all\nherding creatures. Though banding together in tens of thousands, the\nlion-maned buffaloes of the West have fled before a solitary\nhorseman. Witness, too, all human beings, how when herded together in\nthe sheepfold of a theatre's pit, they will, at the slightest alarm of\nfire, rush helter-skelter for the outlets, crowding, trampling,\njamming, and remorselessly dashing each other to death. Best,\ntherefore, withhold any amazement at the strangely gallied whales\nbefore us, for there is no folly of the beasts of the earth which is\nnot infinitely outdone by the madness of men.\n\nThough many of the whales, as has been said, were in violent motion,\nyet it is to be observed that as a whole the herd neither advanced nor\nretreated, but collectively remained in one place. As is customary in\nthose cases, the boats at once separated, each making for some one\nlone whale on the outskirts of the shoal. In about three minutes'\ntime, Queequeg's harpoon was flung; the stricken fish darted blinding\nspray in our faces, and then running away with us like light, steered\nstraight for the heart of the herd. Though such a movement on the part\nof the whale struck under such circumstances, is in no wise\nunprecedented; and indeed is almost always more or less anticipated;\nyet does it present one of the more perilous vicissitudes of the\nfishery. For as the swift monster drags you deeper and deeper into the\nfrantic shoal, you bid adieu to circumspect life and only exist in a\ndelirious throb.\n\nAs, blind and deaf, the whale plunged forward, as if by sheer power of\nspeed to rid himself of the iron leech that had fastened to him; as we\nthus tore a white gash in the sea, on all sides menaced as we flew, by\nthe crazed creatures to and fro rushing about us; our beset boat was\nlike a ship mobbed by ice-isles in a tempest, and striving to steer\nthrough their complicated channels and straits, knowing not at what\nmoment it may be locked in and crushed.\n\nBut not a bit daunted, Queequeg steered us manfully; now sheering off\nfrom this monster directly across our route in advance; now edging\naway from that, whose colossal flukes were suspended overhead, while\nall the time, Starbuck stood up in the bows, lance in hand, pricking\nout of our way whatever whales he could reach by short darts, for\nthere was no time to make long ones. Nor were the oarsmen quite idle,\nthough their wonted duty was now altogether dispensed with. They\nchiefly attended to the shouting part of the business. \"Out of the\nway, Commodore!\" cried one, to a great dromedary that of a sudden rose\nbodily to the surface, and for an instant threatened to swamp\nus. \"Hard down with your tail, there!\" cried a second to another,\nwhich, close to our gunwale, seemed calmly cooling himself with his\nown fan-like extremity.\n\nAll whaleboats carry certain curious contrivances, originally invented\nby the Nantucket Indians, called druggs. Two thick squares of wood of\nequal size are stoutly clenched together, so that they cross each\nother's grain at right angles; a line of considerable length is then\nattached to the middle of this block, and the other end of the line\nbeing looped, it can in a moment be fastened to a harpoon. It is\nchiefly among gallied whales that this drugg is used. For then, more\nwhales are close round you than you can possibly chase at one\ntime. But sperm whales are not every day encountered; while you may,\nthen, you must kill all you can. And if you cannot kill them all at\nonce, you must wing them, so that they can be afterwards killed at\nyour leisure. Hence it is, that at times like these the drugg, comes\ninto requisition. Our boat was furnished with three of them. The first\nand second were successfully darted, and we saw the whales\nstaggeringly running off, fettered by the enormous sidelong resistance\nof the towing drugg. They were cramped like malefactors with the chain\nand ball. But upon flinging the third, in the act of tossing overboard\nthe clumsy wooden block, it caught under one of the seats of the boat,\nand in an instant tore it out and carried it away, dropping the\noarsman in the boat's bottom as the seat slid from under him. On both\nsides the sea came in at the wounded planks, but we stuffed two or\nthree drawers and shirts in, and so stopped the leaks for the time.\n\nIt had been next to impossible to dart these drugged-harpoons, were it\nnot that as we advanced into the herd, our whale's way greatly\ndiminished; moreover, that as we went still further and further from\nthe circumference of commotion, the direful disorders seemed\nwaning. So that when at last the jerking harpoon drew out, and the\ntowing whale sideways vanished; then, with the tapering force of his\nparting momentum, we glided between two whales into the innermost\nheart of the shoal, as if from some mountain torrent we had slid into\na serene valley lake. Here the storms in the roaring glens between the\noutermost whales, were heard but not felt. In this central expanse the\nsea presented that smooth satin-like surface, called a sleek, produced\nby the subtle moisture thrown off by the whale in his more quiet\nmoods. Yes, we were now in that enchanted calm which they say lurks at\nthe heart of every commotion. And still in the distracted distance we\nbeheld the tumults of the outer concentric circles, and saw successive\npods of whales, eight or ten in each, swiftly going round and round,\nlike multiplied spans of horses in a ring; and so closely shoulder to\nshoulder, that a Titanic circus-rider might easily have over-arched\nthe middle ones, and so have gone round on their backs. Owing to the\ndensity of the crowd of reposing whales, more immediately surrounding\nthe embayed axis of the herd, no possible chance of escape was at\npresent afforded us. We must watch for a breach in the living wall\nthat hemmed us in; the wall that had only admitted us in order to shut\nus up. Keeping at the centre of the lake, we were occasionally visited\nby small tame cows and calves; the women and children of this routed\nhost.\n\nNow, inclusive of the occasional wide intervals between the revolving\nouter circles, and inclusive of the spaces between the various pods in\nany one of those circles, the entire area at this juncture, embraced\nby the whole multitude, must have contained at least two or three\nsquare miles. At any rate  though indeed such a test at such a time\nmight be deceptive  spoutings might be discovered from our low boat\nthat seemed playing up almost from the rim of the horizon. I mention\nthis circumstance, because, as if the cows and calves had been\npurposely locked up in this innermost fold; and as if the wide extent\nof the herd had hitherto prevented them from learning the precise\ncause of its stopping; or, possibly, being so young, unsophisticated,\nand every way innocent and inexperienced; however it may have been,\nthese smaller whales  now and then visiting our becalmed boat from\nthe margin of the lake  evinced a wondrous fearlessness and\nconfidence, or else a still becharmed panic which it was impossible\nnot to marvel at. Like household dogs they came snuffling round us,\nright up to our gunwales, and touching them; till it almost seemed\nthat some spell had suddenly domesticated them. Queequeg patted their\nforeheads; Starbuck scratched their backs with his lance; but fearful\nof the consequences, for the time refrained from darting it.\n\nBut far beneath this wondrous world upon the surface, another and\nstill stranger world met our eyes as we gazed over the side. For,\nsuspended in those watery vaults, floated the forms of the nursing\nmothers of the whales, and those that by their enormous girth seemed\nshortly to become mothers. The lake, as I have hinted, was to a\nconsiderable depth exceedingly transparent; and as human infants while\nsuckling will calmly and fixedly gaze away from the breast, as if\nleading two different lives at the time; and while yet drawing mortal\nnourishment, be still spiritually feasting upon some unearthly\nreminiscence;  even so did the young of these whales seem looking\nup towards us, but not at us, as if we were but a bit of Gulfweed in\ntheir new-born sight. Floating on their sides, the mothers also seemed\nquietly eyeing us. One of these little infants, that from certain\nqueer tokens seemed hardly a day old, might have measured some\nfourteen feet in length, and some six feet in girth. He was a little\nfrisky; though as yet his body seemed scarce yet recovered from that\nirksome position it had so lately occupied in the maternal reticule;\nwhere, tail to head, and all ready for the final spring, the unborn\nwhale lies bent like a Tartar's bow. The delicate side-fins, and the\npalms of his flukes, still freshly retained the plaited crumpled\nappearance of a baby's ears newly arrived from foreign parts.\n\n\"Line! line!\" cried Queequeg, looking over the gunwale; \"him fast! him\nfast!  Who line him! Who struck?  Two whale; one big, one\nlittle!\"\n\n\"What ails ye, man?\" cried Starbuck.\n\n\"Look-e here,\" said Queequeg, pointing down.\n\nAs when the stricken whale, that from the tub has reeled out hundreds\nof fathoms of rope; as, after deep sounding, he floats up again, and\nshows the slackened curling line buoyantly rising and spiralling\ntowards the air; so now, Starbuck saw long coils of the umbilical cord\nof Madame Leviathan, by which the young cub seemed still tethered to\nits dam. Not seldom in the rapid vicissitudes of the chase, this\nnatural line, with the maternal end loose, becomes entangled with the\nhempen one, so that the cub is thereby trapped. Some of the subtlest\nsecrets of the seas seemed divulged to us in this enchanted pond. We\nsaw young Leviathan amours in the deep.\n\nAnd thus, though surrounded by circle upon circle of consternations\nand affrights, did these inscrutable creatures at the centre freely\nand fearlessly indulge in all peaceful concernments; yea, serenely\nrevelled in dalliance and delight. But even so, amid the tornadoed\nAtlantic of my being, do I myself still for ever centrally disport in\nmute calm; and while ponderous planets of unwaning woe revolve round\nme, deep down and deep inland there I still bathe me in eternal\nmildness of joy.\n\nMeanwhile, as we thus lay entranced, the occasional sudden frantic\nspectacles in the distance evinced the activity of the other boats,\nstill engaged in drugging the whales on the frontier of the host; or\npossibly carrying on the war within the first circle, where abundance\nof room and some convenient retreats were afforded them. But the sight\nof the enraged drugged whales now and then blindly darting to and fro\nacross the circles, was nothing to what at last met our eyes. It is\nsometimes the custom when fast to a whale more than commonly powerful\nand alert, to seek to hamstring him, as it were, by sundering or\nmaiming his gigantic tail-tendon. It is done by darting a\nshort-handled cutting-spade, to which is attached a rope for hauling\nit back again. A whale wounded (as we afterwards learned) in this\npart, but not effectually, as it seemed, had broken away from the\nboat, carrying along with him half of the harpoon line; and in the\nextraordinary agony of the wound, he was now dashing among the\nrevolving circles like the lone mounted desperado Arnold, at the\nbattle of Saratoga, carrying dismay wherever he went.\n\nBut agonizing as was the wound of this whale, and an appalling\nspectacle enough, any way; yet the peculiar horror with which he\nseemed to inspire the rest of the herd, was owing to a cause which at\nfirst the intervening distance obscured from us. But at length we\nperceived that by one of the unimaginable accidents of the fishery,\nthis whale had become entangled in the harpoon-line that he towed; he\nhad also run away with the cutting-spade in him; and while the free\nend of the rope attached to that weapon, had permanently caught in the\ncoils of the harpoon-line round his tail, the cutting-spade itself had\nworked loose from his flesh. So that tormented to madness, he was now\nchurning through the water, violently flailing with his flexible tail,\nand tossing the keen spade about him, wounding and murdering his own\ncomrades.\n\nThis terrific object seemed to recall the whole herd from their\nstationary fright. First, the whales forming the margin of our lake\nbegan to crowd a little, and tumble against each other, as if lifted\nby half spent billows from afar; then the lake itself began faintly to\nheave and swell; the submarine bridal-chambers and nurseries vanished;\nin more and more contracting orbits the whales in the more central\ncircles began to swim in thickening clusters. Yes, the long calm was\ndeparting. A low advancing hum was soon heard; and then like to the\ntumultuous masses of block-ice when the great river Hudson breaks up\nin Spring, the entire host of whales came tumbling upon their inner\ncentre, as if to pile themselves up in one common mountain. Instantly\nStarbuck and Queequeg changed places; Starbuck taking the stern.\n\n\"Oars! Oars!\" he intensely whispered, seizing the helm  \"gripe your\noars, and clutch your souls, now! My God, men, stand by! Shove him\noff, you Queequeg  the whale there!  prick him!  hit him!\nStand up  stand up, and stay so! Spring, men  pull, men; never\nmind their backs  scrape them!  scrape away!\"\n\nThe boat was now all but jammed between two vast black bulks, leaving\na narrow Dardanelles between their long lengths. But by desperate\nendeavor we at last shot into a temporary opening; then giving way\nrapidly, and at the same time earnestly watching for another\noutlet. After many similar hair-breadth escapes, we at last swiftly\nglided into what had just been one of the outer circles, but now\ncrossed by random whales, all violently making for one centre. This\nlucky salvation was cheaply purchased by the loss of Queequeg's hat,\nwho, while standing in the bows to prick the fugitive whales, had his\nhat taken clean from his head by the air-eddy made by the sudden\ntossing of a pair of broad flukes close by.\n\nRiotous and disordered as the universal commotion now was, it soon\nresolved itself into what seemed a systematic movement; for having\nclumped together at last in one dense body, they then renewed their\nonward flight with augmented fleetness. Further pursuit was useless;\nbut the boats still lingered in their wake to pick up what drugged\nwhales might be dropped astern, and likewise to secure one which Flask\nhad killed and waifed. The waif is a pennoned pole, two or three of\nwhich are carried by every boat; and which, when additional game is at\nhand, are inserted upright into the floating body of a dead whale,\nboth to mark its place on the sea, and also as token of prior\npossession, should the boats of any other ship draw near.\n\nThe result of this lowering was somewhat illustrative of that\nsagacious saying in the Fishery,  the more whales the less fish. Of\nall the drugged whales only one was captured. The rest contrived to\nescape for the time, but only to be taken, as will hereafter be seen,\nby some other craft than the Pequod.\n\n The sperm whale, as with all other species of the Leviathan, but\nunlike most other fish, breeds indifferently at all seasons; after a\ngestation which may probably be set down at nine months, producing but\none at a time; though in some few known instances giving birth to an\nEsau and Jacob:  a contingency provided for in suckling by two\nteats, curiously situated, one on each side of the anus; but the\nbreasts themselves extend upwards from that. When by chance these\nprecious parts in a nursing whale are cut by the hunter's lance, the\nmother's pouring milk and blood rivallingly discolour the sea for\nrods. The milk is very sweet and rich; it has been tasted by man; it\nmight do well with strawberries. When overflowing with mutual esteem,\nthe whales salute more hominum.\n\nCHAPTER 88 Schools and Schoolmasters.\n\nThe previous chapter gave account of an immense body or herd of Sperm\nWhales, and there was also then given the probable cause inducing\nthose vast aggregations.\n\nNow, though such great bodies are at times encountered, yet, as must\nhave been seen, even at the present day, small detached bands are\noccasionally observed, embracing from twenty to fifty individuals\neach. Such bands are known as schools. They generally are of two\nsorts; those composed almost entirely of females, and those mustering\nnone but young vigorous males, or bulls, as they are familiarly\ndesignated.\n\nIn cavalier attendance upon the school of females, you invariably see\na male of full grown magnitude, but not old; who, upon any alarm,\nevinces his gallantry by falling in the rear and covering the flight\nof his ladies. In truth, this gentleman is a luxurious Ottoman,\nswimming about over the watery world, surroundingly accompanied by all\nthe solaces and endearments of the harem. The contrast between this\nOttoman and his concubines is striking; because, while he is always of\nthe largest leviathanic proportions, the ladies, even at full growth,\nare not more than one-third of the bulk of an average-sized male. They\nare comparatively delicate, indeed; I dare say, not to exceed half a\ndozen yards round the waist. Nevertheless, it cannot be denied, that\nupon the whole they are hereditarily entitled to EMBONPOINT.\n\nIt is very curious to watch this harem and its lord in their indolent\nramblings. Like fashionables, they are for ever on the move in\nleisurely search of variety. You meet them on the Line in time for the\nfull flower of the Equatorial feeding season, having just returned,\nperhaps, from spending the summer in the Northern seas, and so\ncheating summer of all unpleasant weariness and warmth. By the time\nthey have lounged up and down the promenade of the Equator awhile,\nthey start for the Oriental waters in anticipation of the cool season\nthere, and so evade the other excessive temperature of the year.\n\nWhen serenely advancing on one of these journeys, if any strange\nsuspicious sights are seen, my lord whale keeps a wary eye on his\ninteresting family. Should any unwarrantably pert young Leviathan\ncoming that way, presume to draw confidentially close to one of the\nladies, with what prodigious fury the Bashaw assails him, and chases\nhim away! High times, indeed, if unprincipled young rakes like him are\nto be permitted to invade the sanctity of domestic bliss; though do\nwhat the Bashaw will, he cannot keep the most notorious Lothario out\nof his bed; for, alas! all fish bed in common. As ashore, the ladies\noften cause the most terrible duels among their rival admirers; just\nso with the whales, who sometimes come to deadly battle, and all for\nlove. They fence with their long lower jaws, sometimes locking them\ntogether, and so striving for the supremacy like elks that warringly\ninterweave their antlers. Not a few are captured having the deep scars\nof these encounters,  furrowed heads, broken teeth, scolloped fins;\nand in some instances, wrenched and dislocated mouths.\n\nBut supposing the invader of domestic bliss to betake himself away at\nthe first rush of the harem's lord, then is it very diverting to watch\nthat lord. Gently he insinuates his vast bulk among them again and\nrevels there awhile, still in tantalizing vicinity to young Lothario,\nlike pious Solomon devoutly worshipping among his thousand\nconcubines. Granting other whales to be in sight, the fishermen will\nseldom give chase to one of these Grand Turks; for these Grand Turks\nare too lavish of their strength, and hence their unctuousness is\nsmall. As for the sons and the daughters they beget, why, those sons\nand daughters must take care of themselves; at least, with only the\nmaternal help. For like certain other omnivorous roving lovers that\nmight be named, my Lord Whale has no taste for the nursery, however\nmuch for the bower; and so, being a great traveller, he leaves his\nanonymous babies all over the world; every baby an exotic. In good\ntime, nevertheless, as the ardour of youth declines; as years and\ndumps increase; as reflection lends her solemn pauses; in short, as a\ngeneral lassitude overtakes the sated Turk; then a love of ease and\nvirtue supplants the love for maidens; our Ottoman enters upon the\nimpotent, repentant, admonitory stage of life, forswears, disbands the\nharem, and grown to an exemplary, sulky old soul, goes about all alone\namong the meridians and parallels saying his prayers, and warning each\nyoung Leviathan from his amorous errors.\n\nNow, as the harem of whales is called by the fishermen a school, so is\nthe lord and master of that school technically known as the\nschoolmaster. It is therefore not in strict character, however\nadmirably satirical, that after going to school himself, he should\nthen go abroad inculcating not what he learned there, but the folly of\nit. His title, schoolmaster, would very naturally seem derived from\nthe name bestowed upon the harem itself, but some have surmised that\nthe man who first thus entitled this sort of Ottoman whale, must have\nread the memoirs of Vidocq, and informed himself what sort of a\ncountry-schoolmaster that famous Frenchman was in his younger days,\nand what was the nature of those occult lessons he inculcated into\nsome of his pupils.\n\nThe same secludedness and isolation to which the schoolmaster whale\nbetakes himself in his advancing years, is true of all aged Sperm\nWhales. Almost universally, a lone whale  as a solitary Leviathan\nis called  proves an ancient one. Like venerable moss-bearded\nDaniel Boone, he will have no one near him but Nature herself; and her\nhe takes to wife in the wilderness of waters, and the best of wives\nshe is, though she keeps so many moody secrets.\n\nThe schools composing none but young and vigorous males, previously\nmentioned, offer a strong contrast to the harem schools. For while\nthose female whales are characteristically timid, the young males, or\nforty-barrel-bulls, as they call them, are by far the most pugnacious\nof all Leviathans, and proverbially the most dangerous to encounter;\nexcepting those wondrous grey-headed, grizzled whales, sometimes met,\nand these will fight you like grim fiends exasperated by a penal gout.\n\nThe Forty-barrel-bull schools are larger than the harem schools. Like\na mob of young collegians, they are full of fight, fun, and\nwickedness, tumbling round the world at such a reckless, rollicking\nrate, that no prudent underwriter would insure them any more than he\nwould a riotous lad at Yale or Harvard. They soon relinquish this\nturbulence though, and when about three-fourths grown, break up, and\nseparately go about in quest of settlements, that is, harems.\n\nAnother point of difference between the male and female schools is\nstill more characteristic of the sexes. Say you strike a\nForty-barrel-bull  poor devil! all his comrades quit him. But\nstrike a member of the harem school, and her companions swim around\nher with every token of concern, sometimes lingering so near her and\nso long, as themselves to fall a prey.\n\nCHAPTER 89 Fast-Fish and Loose-Fish.\n\nThe allusion to the waif and waif-poles in the last chapter but one,\nnecessitates some account of the laws and regulations of the whale\nfishery, of which the waif may be deemed the grand symbol and badge.\n\nIt frequently happens that when several ships are cruising in company,\na whale may be struck by one vessel, then escape, and be finally\nkilled and captured by another vessel; and herein are indirectly\ncomprised many minor contingencies, all partaking of this one grand\nfeature. For example,  after a weary and perilous chase and capture\nof a whale, the body may get loose from the ship by reason of a\nviolent storm; and drifting far away to leeward, be retaken by a\nsecond whaler, who, in a calm, snugly tows it alongside, without risk\nof life or line. Thus the most vexatious and violent disputes would\noften arise between the fishermen, were there not some written or\nunwritten, universal, undisputed law applicable to all cases.\n\nPerhaps the only formal whaling code authorized by legislative\nenactment, was that of Holland. It was decreed by the States-General\nin A.D. 1695. But though no other nation has ever had any written\nwhaling law, yet the American fishermen have been their own\nlegislators and lawyers in this matter. They have provided a system\nwhich for terse comprehensiveness surpasses Justinian's Pandects and\nthe By-laws of the Chinese Society for the Suppression of Meddling\nwith other People's Business. Yes; these laws might be engraven on a\nQueen Anne's forthing, or the barb of a harpoon, and worn round the\nneck, so small are they.\n\nI. A Fast-Fish belongs to the party fast to it.\n\nII. A Loose-Fish is fair game for anybody who can soonest catch it.\n\nBut what plays the mischief with this masterly code is the admirable\nbrevity of it, which necessitates a vast volume of commentaries to\nexpound it.\n\nFirst: What is a Fast-Fish? Alive or dead a fish is technically fast,\nwhen it is connected with an occupied ship or boat, by any medium at\nall controllable by the occupant or occupants,  a mast, an oar, a\nnine-inch cable, a telegraph wire, or a strand of cobweb, it is all\nthe same. Likewise a fish is technically fast when it bears a waif, or\nany other recognised symbol of possession; so long as the party\nwaifing it plainly evince their ability at any time to take it\nalongside, as well as their intention so to do.\n\nThese are scientific commentaries; but the commentaries of the\nwhalemen themselves sometimes consist in hard words and harder knocks\n the Coke-upon-Littleton of the fist. True, among the more upright\nand honourable whalemen allowances are always made for peculiar cases,\nwhere it would be an outrageous moral injustice for one party to claim\npossession of a whale previously chased or killed by another\nparty. But others are by no means so scrupulous.\n\nSome fifty years ago there was a curious case of whale-trover\nlitigated in England, wherein the plaintiffs set forth that after a\nhard chase of a whale in the Northern seas; and when indeed they (the\nplaintiffs) had succeeded in harpooning the fish; they were at last,\nthrough peril of their lives, obliged to forsake not only their lines,\nbut their boat itself. Ultimately the defendants (the crew of another\nship) came up with the whale, struck, killed, seized, and finally\nappropriated it before the very eyes of the plaintiffs. And when those\ndefendants were remonstrated with, their captain snapped his fingers\nin the plaintiffs' teeth, and assured them that by way of doxology to\nthe deed he had done, he would now retain their line, harpoons, and\nboat, which had remained attached to the whale at the time of the\nseizure. Wherefore the plaintiffs now sued for the recovery of the\nvalue of their whale, line, harpoons, and boat.\n\nMr. Erskine was counsel for the defendants; Lord Ellenborough was the\njudge. In the course of the defence, the witty Erskine went on to\nillustrate his position, by alluding to a recent crim. con. case,\nwherein a gentleman, after in vain trying to bridle his wife's\nviciousness, had at last abandoned her upon the seas of life; but in\nthe course of years, repenting of that step, he instituted an action\nto recover possession of her. Erskine was on the other side; and he\nthen supported it by saying, that though the gentleman had originally\nharpooned the lady, and had once had her fast, and only by reason of\nthe great stress of her plunging viciousness, had at last abandoned\nher; yet abandon her he did, so that she became a loose-fish; and\ntherefore when a subsequent gentleman re-harpooned her, the lady then\nbecame that subsequent gentleman's property, along with whatever\nharpoon might have been found sticking in her.\n\nNow in the present case Erskine contended that the examples of the\nwhale and the lady were reciprocally illustrative of each other.\n\nThese pleadings, and the counter pleadings, being duly heard, the very\nlearned Judge in set terms decided, to wit,  That as for the boat,\nhe awarded it to the plaintiffs, because they had merely abandoned it\nto save their lives; but that with regard to the controverted whale,\nharpoons, and line, they belonged to the defendants; the whale,\nbecause it was a Loose-Fish at the time of the final capture; and the\nharpoons and line because when the fish made off with them, it (the\nfish) acquired a property in those articles; and hence anybody who\nafterwards took the fish had a right to them. Now the defendants\nafterwards took the fish; ergo, the aforesaid articles were theirs.\n\nA common man looking at this decision of the very learned Judge, might\npossibly object to it. But ploughed up to the primary rock of the\nmatter, the two great principles laid down in the twin whaling laws\npreviously quoted, and applied and elucidated by Lord Ellenborough in\nthe above cited case; these two laws touching Fast-Fish and\nLoose-Fish, I say, will, on reflection, be found the fundamentals of\nall human jurisprudence; for notwithstanding its complicated tracery\nof sculpture, the Temple of the Law, like the Temple of the\nPhilistines, has but two props to stand on.\n\nIs it not a saying in every one's mouth, Possession is half of the\nlaw: that is, regardless of how the thing came into possession? But\noften possession is the whole of the law. What are the sinews and\nsouls of Russian serfs and Republican slaves but Fast-Fish, whereof\npossession is the whole of the law? What to the rapacious landlord is\nthe widow's last mite but a Fast-Fish? What is yonder undetected\nvillain's marble mansion with a door-plate for a waif; what is that\nbut a Fast-Fish? What is the ruinous discount which Mordecai, the\nbroker, gets from poor Woebegone, the bankrupt, on a loan to keep\nWoebegone's family from starvation; what is that ruinous discount but\na Fast-Fish? What is the Archbishop of Savesoul's income of 100,000\nseized from the scant bread and cheese of hundreds of thousands of\nbroken-backed laborers (all sure of heaven without any of Savesoul's\nhelp) what is that globular 100,000 but a Fast-Fish? What are the\nDuke of Dunder's hereditary towns and hamlets but Fast-Fish? What to\nthat redoubted harpooneer, John Bull, is poor Ireland, but a\nFast-Fish? What to that apostolic lancer, Brother Jonathan, is Texas\nbut a Fast-Fish? And concerning all these, is not Possession the whole\nof the law?\n\nBut if the doctrine of Fast-Fish be pretty generally applicable, the\nkindred doctrine of Loose-Fish is still more widely so. That is\ninternationally and universally applicable.\n\nWhat was America in 1492 but a Loose-Fish, in which Columbus struck\nthe Spanish standard by way of waifing it for his royal master and\nmistress? What was Poland to the Czar? What Greece to the Turk? What\nIndia to England? What at last will Mexico be to the United States?\nAll Loose-Fish.\n\nWhat are the Rights of Man and the Liberties of the World but\nLoose-Fish? What all men's minds and opinions but Loose-Fish? What is\nthe principle of religious belief in them but a Loose-Fish? What to\nthe ostentatious smuggling verbalists are the thoughts of thinkers but\nLoose-Fish? What is the great globe itself but a Loose-Fish? And what\nare you, reader, but a Loose-Fish and a Fast-Fish, too?\n\nCHAPTER 90 Heads or Tails.\n\n\"De balena vero sufficit, si rex habeat caput, et regina caudam.\"\nBracton, l. 3, c. 3.\n\nLatin from the books of the Laws of England, which taken along with\nthe context, means, that of all whales captured by anybody on the\ncoast of that land, the King, as Honourary Grand Harpooneer, must have\nthe head, and the Queen be respectfully presented with the tail. A\ndivision which, in the whale, is much like halving an apple; there is\nno intermediate remainder. Now as this law, under a modified form, is\nto this day in force in England; and as it offers in various respects\na strange anomaly touching the general law of Fast and Loose-Fish, it\nis here treated of in a separate chapter, on the same courteous\nprinciple that prompts the English railways to be at the expense of a\nseparate car, specially reserved for the accommodation of royalty. In\nthe first place, in curious proof of the fact that the above-mentioned\nlaw is still in force, I proceed to lay before you a circumstance that\nhappened within the last two years.\n\nIt seems that some honest mariners of Dover, or Sandwich, or some one\nof the Cinque Ports, had after a hard chase succeeded in killing and\nbeaching a fine whale which they had originally descried afar off from\nthe shore. Now the Cinque Ports are partially or somehow under the\njurisdiction of a sort of policeman or beadle, called a Lord\nWarden. Holding the office directly from the crown, I believe, all the\nroyal emoluments incident to the Cinque Port territories become by\nassignment his. By some writers this office is called a sinecure. But\nnot so. Because the Lord Warden is busily employed at times in fobbing\nhis perquisites; which are his chiefly by virtue of that same fobbing\nof them.\n\nNow when these poor sun-burnt mariners, bare-footed, and with their\ntrowsers rolled high up on their eely legs, had wearily hauled their\nfat fish high and dry, promising themselves a good 150 from the\nprecious oil and bone; and in fantasy sipping rare tea with their\nwives, and good ale with their cronies, upon the strength of their\nrespective shares; up steps a very learned and most Christian and\ncharitable gentleman, with a copy of Blackstone under his arm; and\nlaying it upon the whale's head, he says  \"Hands off! this fish, my\nmasters, is a Fast-Fish. I seize it as the Lord Warden's.\" Upon this\nthe poor mariners in their respectful consternation  so truly\nEnglish  knowing not what to say, fall to vigorously scratching\ntheir heads all round; meanwhile ruefully glancing from the whale to\nthe stranger. But that did in nowise mend the matter, or at all soften\nthe hard heart of the learned gentleman with the copy of\nBlackstone. At length one of them, after long scratching about for his\nideas, made bold to speak,\n\n\"Please, sir, who is the Lord Warden?\"\n\n\"The Duke.\"\n\n\"But the duke had nothing to do with taking this fish?\"\n\n\"It is his.\"\n\n\"We have been at great trouble, and peril, and some expense, and is\nall that to go to the Duke's benefit; we getting nothing at all for\nour pains but our blisters?\"\n\n\"It is his.\"\n\n\"Is the Duke so very poor as to be forced to this desperate mode of\ngetting a livelihood?\"\n\n\"It is his.\"\n\n\"I thought to relieve my old bed-ridden mother by part of my share of\nthis whale.\"\n\n\"It is his.\"\n\n\"Won't the Duke be content with a quarter or a half?\"\n\n\"It is his.\"\n\nIn a word, the whale was seized and sold, and his Grace the Duke of\nWellington received the money. Thinking that viewed in some particular\nlights, the case might by a bare possibility in some small degree be\ndeemed, under the circumstances, a rather hard one, an honest\nclergyman of the town respectfully addressed a note to his Grace,\nbegging him to take the case of those unfortunate mariners into full\nconsideration. To which my Lord Duke in substance replied (both\nletters were published) that he had already done so, and received the\nmoney, and would be obliged to the reverend gentleman if for the\nfuture he (the reverend gentleman) would decline meddling with other\npeople's business. Is this the still militant old man, standing at the\ncorners of the three kingdoms, on all hands coercing alms of beggars?\n\nIt will readily be seen that in this case the alleged right of the\nDuke to the whale was a delegated one from the Sovereign. We must\nneeds inquire then on what principle the Sovereign is originally\ninvested with that right. The law itself has already been set\nforth. But Plowdon gives us the reason for it. Says Plowdon, the whale\nso caught belongs to the King and Queen, \"because of its superior\nexcellence.\" And by the soundest commentators this has ever been held\na cogent argument in such matters.\n\nBut why should the King have the head, and the Queen the tail? A\nreason for that, ye lawyers!\n\nIn his treatise on \"Queen-Gold,\" or Queen-pinmoney, an old King's\nBench author, one William Prynne, thus discourseth: \"Ye tail is ye\nQueen's, that ye Queen's wardrobe may be supplied with ye whalebone.\"\nNow this was written at a time when the black limber bone of the\nGreenland or Right whale was largely used in ladies' bodices. But this\nsame bone is not in the tail; it is in the head, which is a sad\nmistake for a sagacious lawyer like Prynne. But is the Queen a\nmermaid, to be presented with a tail? An allegorical meaning may lurk\nhere.\n\nThere are two royal fish so styled by the English law writers  the\nwhale and the sturgeon; both royal property under certain limitations,\nand nominally supplying the tenth branch of the crown's ordinary\nrevenue. I know not that any other author has hinted of the matter;\nbut by inference it seems to me that the sturgeon must be divided in\nthe same way as the whale, the King receiving the highly dense and\nelastic head peculiar to that fish, which, symbolically regarded, may\npossibly be humorously grounded upon some presumed congeniality. And\nthus there seems a reason in all things, even in law.\n\nCHAPTER 91 The Pequod Meets The Rose-Bud.\n\n\"In vain it was to rake for Ambergriese in the paunch of this\nLeviathan, insufferable fetor denying not inquiry.\" Sir T. Browne,\nV.E.\n\nIt was a week or two after the last whaling scene recounted, and when\nwe were slowly sailing over a sleepy, vapoury, mid-day sea, that the\nmany noses on the Pequod's deck proved more vigilant discoverers than\nthe three pairs of eyes aloft. A peculiar and not very pleasant smell\nwas smelt in the sea.\n\n\"I will bet something now,\" said Stubb, \"that somewhere hereabouts are\nsome of those drugged whales we tickled the other day. I thought they\nwould keel up before long.\"\n\nPresently, the vapours in advance slid aside; and there in the\ndistance lay a ship, whose furled sails betokened that some sort of\nwhale must be alongside. As we glided nearer, the stranger showed\nFrench colours from his peak; and by the eddying cloud of vulture\nsea-fowl that circled, and hovered, and swooped around him, it was\nplain that the whale alongside must be what the fishermen call a\nblasted whale, that is, a whale that has died unmolested on the sea,\nand so floated an unappropriated corpse. It may well be conceived,\nwhat an unsavory odor such a mass must exhale; worse than an Assyrian\ncity in the plague, when the living are incompetent to bury the\ndeparted. So intolerable indeed is it regarded by some, that no\ncupidity could persuade them to moor alongside of it. Yet are there\nthose who will still do it; notwithstanding the fact that the oil\nobtained from such subjects is of a very inferior quality, and by no\nmeans of the nature of attar-of-rose.\n\nComing still nearer with the expiring breeze, we saw that the\nFrenchman had a second whale alongside; and this second whale seemed\neven more of a nosegay than the first. In truth, it turned out to be\none of those problematical whales that seem to dry up and die with a\nsort of prodigious dyspepsia, or indigestion; leaving their defunct\nbodies almost entirely bankrupt of anything like oil. Nevertheless, in\nthe proper place we shall see that no knowing fisherman will ever turn\nup his nose at such a whale as this, however much he may shun blasted\nwhales in general.\n\nThe Pequod had now swept so nigh to the stranger, that Stubb vowed he\nrecognised his cutting spade-pole entangled in the lines that were\nknotted round the tail of one of these whales.\n\n\"There's a pretty fellow, now,\" he banteringly laughed, standing in\nthe ship's bows, \"there's a jackal for ye! I well know that these\nCrappoes of Frenchmen are but poor devils in the fishery; sometimes\nlowering their boats for breakers, mistaking them for Sperm Whale\nspouts; yes, and sometimes sailing from their port with their hold\nfull of boxes of tallow candles, and cases of snuffers, foreseeing\nthat all the oil they will get won't be enough to dip the Captain's\nwick into; aye, we all know these things; but look ye, here's a Crappo\nthat is content with our leavings, the drugged whale there, I mean;\naye, and is content too with scraping the dry bones of that other\nprecious fish he has there. Poor devil! I say, pass round a hat, some\none, and let's make him a present of a little oil for dear charity's\nsake. For what oil he'll get from that drugged whale there, wouldn't\nbe fit to burn in a jail; no, not in a condemned cell. And as for the\nother whale, why, I'll agree to get more oil by chopping up and trying\nout these three masts of ours, than he'll get from that bundle of\nbones; though, now that I think of it, it may contain something worth\na good deal more than oil; yes, ambergris. I wonder now if our old man\nhas thought of that. It's worth trying. Yes, I'm for it;\" and so\nsaying he started for the quarter-deck.\n\nBy this time the faint air had become a complete calm; so that whether\nor no, the Pequod was now fairly entrapped in the smell, with no hope\nof escaping except by its breezing up again. Issuing from the cabin,\nStubb now called his boat's crew, and pulled off for the\nstranger. Drawing across her bow, he perceived that in accordance with\nthe fanciful French taste, the upper part of her stem-piece was carved\nin the likeness of a huge drooping stalk, was painted green, and for\nthorns had copper spikes projecting from it here and there; the whole\nterminating in a symmetrical folded bulb of a bright red colour. Upon\nher head boards, in large gilt letters, he read \"Bouton de Rose,\" \nRose-button, or Rose-bud; and this was the romantic name of this\naromatic ship.\n\nThough Stubb did not understand the Bouton part of the inscription,\nyet the word rose, and the bulbous figure-head put together,\nsufficiently explained the whole to him.\n\n\"A wooden rose-bud, eh?\" he cried with his hand to his nose, \"that\nwill do very well; but how like all creation it smells!\"\n\nNow in order to hold direct communication with the people on deck, he\nhad to pull round the bows to the starboard side, and thus come close\nto the blasted whale; and so talk over it.\n\nArrived then at this spot, with one hand still to his nose, he bawled\n \"Bouton-de-Rose, ahoy! are there any of you Bouton-de-Roses that\nspeak English?\"\n\n\"Yes,\" rejoined a Guernsey-man from the bulwarks, who turned out to be\nthe chief-mate.\n\n\"Well, then, my Bouton-de-Rose-bud, have you seen the White Whale?\"\n\n\"WHAT whale?\"\n\n\"The WHITE Whale  a Sperm Whale  Moby Dick, have ye seen him?\n\n\"Never heard of such a whale. Cachalot Blanche! White Whale  no.\"\n\n\"Very good, then; good bye now, and I'll call again in a minute.\"\n\nThen rapidly pulling back towards the Pequod, and seeing Ahab leaning\nover the quarter-deck rail awaiting his report, he moulded his two\nhands into a trumpet and shouted  \"No, Sir! No!\" Upon which Ahab\nretired, and Stubb returned to the Frenchman.\n\nHe now perceived that the Guernsey-man, who had just got into the\nchains, and was using a cutting-spade, had slung his nose in a sort of\nbag.\n\n\"What's the matter with your nose, there?\" said Stubb. \"Broke it?\"\n\n\"I wish it was broken, or that I didn't have any nose at all!\"\nanswered the Guernsey-man, who did not seem to relish the job he was\nat very much. \"But what are you holding yours for?\"\n\n\"Oh, nothing! It's a wax nose; I have to hold it on. Fine day, ain't\nit? Air rather gardenny, I should say; throw us a bunch of posies,\nwill ye, Bouton-de-Rose?\"\n\n\"What in the devil's name do you want here?\" roared the Guernseyman,\nflying into a sudden passion.\n\n\"Oh! keep cool  cool? yes, that's the word! why don't you pack\nthose whales in ice while you're working at 'em? But joking aside,\nthough; do you know, Rose-bud, that it's all nonsense trying to get\nany oil out of such whales? As for that dried up one, there, he hasn't\na gill in his whole carcase.\"\n\n\"I know that well enough; but, d'ye see, the Captain here won't\nbelieve it; this is his first voyage; he was a Cologne manufacturer\nbefore. But come aboard, and mayhap he'll believe you, if he won't me;\nand so I'll get out of this dirty scrape.\"\n\n\"Anything to oblige ye, my sweet and pleasant fellow,\" rejoined Stubb,\nand with that he soon mounted to the deck. There a queer scene\npresented itself. The sailors, in tasselled caps of red worsted, were\ngetting the heavy tackles in readiness for the whales. But they worked\nrather slow and talked very fast, and seemed in anything but a good\nhumor. All their noses upwardly projected from their faces like so\nmany jib-booms. Now and then pairs of them would drop their work, and\nrun up to the mast-head to get some fresh air. Some thinking they\nwould catch the plague, dipped oakum in coal-tar, and at intervals\nheld it to their nostrils. Others having broken the stems of their\npipes almost short off at the bowl, were vigorously puffing\ntobacco-smoke, so that it constantly filled their olfactories.\n\nStubb was struck by a shower of outcries and anathemas proceeding from\nthe Captain's round-house abaft; and looking in that direction saw a\nfiery face thrust from behind the door, which was held ajar from\nwithin. This was the tormented surgeon, who, after in vain\nremonstrating against the proceedings of the day, had betaken himself\nto the Captain's round-house (cabinet he called it) to avoid the pest;\nbut still, could not help yelling out his entreaties and indignations\nat times.\n\nMarking all this, Stubb argued well for his scheme, and turning to the\nGuernsey-man had a little chat with him, during which the stranger\nmate expressed his detestation of his Captain as a conceited\nignoramus, who had brought them all into so unsavory and unprofitable\na pickle. Sounding him carefully, Stubb further perceived that the\nGuernsey-man had not the slightest suspicion concerning the\nambergris. He therefore held his peace on that head, but otherwise was\nquite frank and confidential with him, so that the two quickly\nconcocted a little plan for both circumventing and satirizing the\nCaptain, without his at all dreaming of distrusting their\nsincerity. According to this little plan of theirs, the Guernsey-man,\nunder cover of an interpreter's office, was to tell the Captain what\nhe pleased, but as coming from Stubb; and as for Stubb, he was to\nutter any nonsense that should come uppermost in him during the\ninterview.\n\nBy this time their destined victim appeared from his cabin. He was a\nsmall and dark, but rather delicate looking man for a sea-captain,\nwith large whiskers and moustache, however; and wore a red cotton\nvelvet vest with watch-seals at his side. To this gentleman, Stubb was\nnow politely introduced by the Guernsey-man, who at once\nostentatiously put on the aspect of interpreting between them.\n\n\"What shall I say to him first?\" said he.\n\n\"Why,\" said Stubb, eyeing the velvet vest and the watch and seals,\n\"you may as well begin by telling him that he looks a sort of babyish\nto me, though I don't pretend to be a judge.\"\n\n\"He says, Monsieur,\" said the Guernsey-man, in French, turning to his\ncaptain, \"that only yesterday his ship spoke a vessel, whose captain\nand chief-mate, with six sailors, had all died of a fever caught from\na blasted whale they had brought alongside.\"\n\nUpon this the captain started, and eagerly desired to know more.\n\n\"What now?\" said the Guernsey-man to Stubb.\n\n\"Why, since he takes it so easy, tell him that now I have eyed him\ncarefully, I'm quite certain that he's no more fit to command a\nwhale-ship than a St. Jago monkey. In fact, tell him from me he's a\nbaboon.\"\n\n\"He vows and declares, Monsieur, that the other whale, the dried one,\nis far more deadly than the blasted one; in fine, Monsieur, he\nconjures us, as we value our lives, to cut loose from these fish.\"\n\nInstantly the captain ran forward, and in a loud voice commanded his\ncrew to desist from hoisting the cutting-tackles, and at once cast\nloose the cables and chains confining the whales to the ship.\n\n\"What now?\" said the Guernsey-man, when the Captain had returned to\nthem.\n\n\"Why, let me see; yes, you may as well tell him now that  that \nin fact, tell him I've diddled him, and (aside to himself) perhaps\nsomebody else.\"\n\n\"He says, Monsieur, that he's very happy to have been of any service\nto us.\"\n\nHearing this, the captain vowed that they were the grateful parties\n(meaning himself and mate) and concluded by inviting Stubb down into\nhis cabin to drink a bottle of Bordeaux.\n\n\"He wants you to take a glass of wine with him,\" said the interpreter.\n\n\"Thank him heartily; but tell him it's against my principles to drink\nwith the man I've diddled. In fact, tell him I must go.\"\n\n\"He says, Monsieur, that his principles won't admit of his drinking;\nbut that if Monsieur wants to live another day to drink, then Monsieur\nhad best drop all four boats, and pull the ship away from these\nwhales, for it's so calm they won't drift.\"\n\nBy this time Stubb was over the side, and getting into his boat,\nhailed the Guernsey-man to this effect,  that having a long\ntow-line in his boat, he would do what he could to help them, by\npulling out the lighter whale of the two from the ship's side. While\nthe Frenchman's boats, then, were engaged in towing the ship one way,\nStubb benevolently towed away at his whale the other way,\nostentatiously slacking out a most unusually long tow-line.\n\nPresently a breeze sprang up; Stubb feigned to cast off from the\nwhale; hoisting his boats, the Frenchman soon increased his distance,\nwhile the Pequod slid in between him and Stubb's whale. Whereupon\nStubb quickly pulled to the floating body, and hailing the Pequod to\ngive notice of his intentions, at once proceeded to reap the fruit of\nhis unrighteous cunning. Seizing his sharp boat-spade, he commenced an\nexcavation in the body, a little behind the side fin. You would almost\nhave thought he was digging a cellar there in the sea; and when at\nlength his spade struck against the gaunt ribs, it was like turning up\nold Roman tiles and pottery buried in fat English loam. His boat's\ncrew were all in high excitement, eagerly helping their chief, and\nlooking as anxious as gold-hunters.\n\nAnd all the time numberless fowls were diving, and ducking, and\nscreaming, and yelling, and fighting around them. Stubb was beginning\nto look disappointed, especially as the horrible nosegay increased,\nwhen suddenly from out the very heart of this plague, there stole a\nfaint stream of perfume, which flowed through the tide of bad smells\nwithout being absorbed by it, as one river will flow into and then\nalong with another, without at all blending with it for a time.\n\n\"I have it, I have it,\" cried Stubb, with delight, striking something\nin the subterranean regions, \"a purse! a purse!\"\n\nDropping his spade, he thrust both hands in, and drew out handfuls of\nsomething that looked like ripe Windsor soap, or rich mottled old\ncheese; very unctuous and savory withal. You might easily dent it with\nyour thumb; it is of a hue between yellow and ash colour. And this,\ngood friends, is ambergris, worth a gold guinea an ounce to any\ndruggist. Some six handfuls were obtained; but more was unavoidably\nlost in the sea, and still more, perhaps, might have been secured were\nit not for impatient Ahab's loud command to Stubb to desist, and come\non board, else the ship would bid them good bye.\n\nCHAPTER 92 Ambergris.\n\nNow this ambergris is a very curious substance, and so important as an\narticle of commerce, that in 1791 a certain Nantucket-born Captain\nCoffin was examined at the bar of the English House of Commons on that\nsubject. For at that time, and indeed until a comparatively late day,\nthe precise origin of ambergris remained, like amber itself, a problem\nto the learned. Though the word ambergris is but the French compound\nfor grey amber, yet the two substances are quite distinct. For amber,\nthough at times found on the sea-coast, is also dug up in some far\ninland soils, whereas ambergris is never found except upon the\nsea. Besides, amber is a hard, transparent, brittle, odorless\nsubstance, used for mouth-pieces to pipes, for beads and ornaments;\nbut ambergris is soft, waxy, and so highly fragrant and spicy, that it\nis largely used in perfumery, in pastiles, precious candles,\nhair-powders, and pomatum. The Turks use it in cooking, and also carry\nit to Mecca, for the same purpose that frankincense is carried to\nSt. Peter's in Rome. Some wine merchants drop a few grains into\nclaret, to flavor it.\n\nWho would think, then, that such fine ladies and gentlemen should\nregale themselves with an essence found in the inglorious bowels of a\nsick whale! Yet so it is. By some, ambergris is supposed to be the\ncause, and by others the effect, of the dyspepsia in the whale. How to\ncure such a dyspepsia it were hard to say, unless by administering\nthree or four boat loads of Brandreth's pills, and then running out of\nharm's way, as laborers do in blasting rocks.\n\nI have forgotten to say that there were found in this ambergris,\ncertain hard, round, bony plates, which at first Stubb thought might\nbe sailors' trowsers buttons; but it afterwards turned out that they\nwere nothing more than pieces of small squid bones embalmed in that\nmanner.\n\nNow that the incorruption of this most fragrant ambergris should be\nfound in the heart of such decay; is this nothing? Bethink thee of\nthat saying of St. Paul in Corinthians, about corruption and\nincorruption; how that we are sown in dishonour, but raised in\nglory. And likewise call to mind that saying of Paracelsus about what\nit is that maketh the best musk. Also forget not the strange fact that\nof all things of ill-savor, Cologne-water, in its rudimental\nmanufacturing stages, is the worst.\n\nI should like to conclude the chapter with the above appeal, but\ncannot, owing to my anxiety to repel a charge often made against\nwhalemen, and which, in the estimation of some already biased minds,\nmight be considered as indirectly substantiated by what has been said\nof the Frenchman's two whales. Elsewhere in this volume the slanderous\naspersion has been disproved, that the vocation of whaling is\nthroughout a slatternly, untidy business. But there is another thing\nto rebut. They hint that all whales always smell bad. Now how did this\nodious stigma originate?\n\nI opine, that it is plainly traceable to the first arrival of the\nGreenland whaling ships in London, more than two centuries\nago. Because those whalemen did not then, and do not now, try out\ntheir oil at sea as the Southern ships have always done; but cutting\nup the fresh blubber in small bits, thrust it through the bung holes\nof large casks, and carry it home in that manner; the shortness of the\nseason in those Icy Seas, and the sudden and violent storms to which\nthey are exposed, forbidding any other course. The consequence is,\nthat upon breaking into the hold, and unloading one of these whale\ncemeteries, in the Greenland dock, a savor is given forth somewhat\nsimilar to that arising from excavating an old city grave-yard, for\nthe foundations of a Lying-in-Hospital.\n\nI partly surmise also, that this wicked charge against whalers may be\nlikewise imputed to the existence on the coast of Greenland, in former\ntimes, of a Dutch village called Schmerenburgh or Smeerenberg, which\nlatter name is the one used by the learned Fogo Von Slack, in his\ngreat work on Smells, a text-book on that subject. As its name imports\n(smeer, fat; berg, to put up), this village was founded in order to\nafford a place for the blubber of the Dutch whale fleet to be tried\nout, without being taken home to Holland for that purpose. It was a\ncollection of furnaces, fat-kettles, and oil sheds; and when the works\nwere in full operation certainly gave forth no very pleasant\nsavor. But all this is quite different with a South Sea Sperm Whaler;\nwhich in a voyage of four years perhaps, after completely filling her\nhold with oil, does not, perhaps, consume fifty days in the business\nof boiling out; and in the state that it is casked, the oil is nearly\nscentless. The truth is, that living or dead, if but decently treated,\nwhales as a species are by no means creatures of ill odor; nor can\nwhalemen be recognised, as the people of the middle ages affected to\ndetect a Jew in the company, by the nose. Nor indeed can the whale\npossibly be otherwise than fragrant, when, as a general thing, he\nenjoys such high health; taking abundance of exercise; always out of\ndoors; though, it is true, seldom in the open air. I say, that the\nmotion of a Sperm Whale's flukes above water dispenses a perfume, as\nwhen a musk-scented lady rustles her dress in a warm parlor. What then\nshall I liken the Sperm Whale to for fragrance, considering his\nmagnitude? Must it not be to that famous elephant, with jewelled\ntusks, and redolent with myrrh, which was led out of an Indian town to\ndo honour to Alexander the Great?\n\nCHAPTER 93 The Castaway.\n\nIt was but some few days after encountering the Frenchman, that a most\nsignificant event befell the most insignificant of the Pequod's crew;\nan event most lamentable; and which ended in providing the sometimes\nmadly merry and predestinated craft with a living and ever\naccompanying prophecy of whatever shattered sequel might prove her\nown.\n\nNow, in the whale ship, it is not every one that goes in the\nboats. Some few hands are reserved called ship-keepers, whose province\nit is to work the vessel while the boats are pursuing the whale. As a\ngeneral thing, these ship-keepers are as hardy fellows as the men\ncomprising the boats' crews. But if there happen to be an unduly\nslender, clumsy, or timorous wight in the ship, that wight is certain\nto be made a ship-keeper. It was so in the Pequod with the little\nnegro Pippin by nick-name, Pip by abbreviation. Poor Pip! ye have\nheard of him before; ye must remember his tambourine on that dramatic\nmidnight, so gloomy-jolly.\n\nIn outer aspect, Pip and Dough-Boy made a match, like a black pony and\na white one, of equal developments, though of dissimilar colour,\ndriven in one eccentric span. But while hapless Dough-Boy was by\nnature dull and torpid in his intellects, Pip, though over\ntender-hearted, was at bottom very bright, with that pleasant, genial,\njolly brightness peculiar to his tribe; a tribe, which ever enjoy all\nholidays and festivities with finer, freer relish than any other\nrace. For blacks, the year's calendar should show naught but three\nhundred and sixty-five Fourth of Julys and New Year's Days. Nor smile\nso, while I write that this little black was brilliant, for even\nblackness has its brilliancy; behold yon lustrous ebony, panelled in\nking's cabinets. But Pip loved life, and all life's peaceable\nsecurities; so that the panic-striking business in which he had\nsomehow unaccountably become entrapped, had most sadly blurred his\nbrightness; though, as ere long will be seen, what was thus\ntemporarily subdued in him, in the end was destined to be luridly\nillumined by strange wild fires, that fictitiously showed him off to\nten times the natural lustre with which in his native Tolland County\nin Connecticut, he had once enlivened many a fiddler's frolic on the\ngreen; and at melodious even-tide, with his gay ha-ha! had turned the\nround horizon into one star-belled tambourine. So, though in the clear\nair of day, suspended against a blue-veined neck, the pure-watered\ndiamond drop will healthful glow; yet, when the cunning jeweller would\nshow you the diamond in its most impressive lustre, he lays it against\na gloomy ground, and then lights it up, not by the sun, but by some\nunnatural gases. Then come out those fiery effulgences, infernally\nsuperb; then the evil-blazing diamond, once the divinest symbol of the\ncrystal skies, looks like some crown-jewel stolen from the King of\nHell. But let us to the story.\n\nIt came to pass, that in the ambergris affair Stubb's after-oarsman\nchanced so to sprain his hand, as for a time to become quite maimed;\nand, temporarily, Pip was put into his place.\n\nThe first time Stubb lowered with him, Pip evinced much nervousness;\nbut happily, for that time, escaped close contact with the whale; and\ntherefore came off not altogether discreditably; though Stubb\nobserving him, took care, afterwards, to exhort him to cherish his\ncourageousness to the utmost, for he might often find it needful.\n\nNow upon the second lowering, the boat paddled upon the whale; and as\nthe fish received the darted iron, it gave its customary rap, which\nhappened, in this instance, to be right under poor Pip's seat. The\ninvoluntary consternation of the moment caused him to leap, paddle in\nhand, out of the boat; and in such a way, that part of the slack whale\nline coming against his chest, he breasted it overboard with him, so\nas to become entangled in it, when at last plumping into the\nwater. That instant the stricken whale started on a fierce run, the\nline swiftly straightened; and presto! poor Pip came all foaming up to\nthe chocks of the boat, remorselessly dragged there by the line, which\nhad taken several turns around his chest and neck.\n\nTashtego stood in the bows. He was full of the fire of the hunt. He\nhated Pip for a poltroon. Snatching the boat-knife from its sheath, he\nsuspended its sharp edge over the line, and turning towards Stubb,\nexclaimed interrogatively, \"Cut?\" Meantime Pip's blue, choked face\nplainly looked, Do, for God's sake! All passed in a flash. In less\nthan half a minute, this entire thing happened.\n\n\"Damn him, cut!\" roared Stubb; and so the whale was lost and Pip was\nsaved.\n\nSo soon as he recovered himself, the poor little negro was assailed by\nyells and execrations from the crew. Tranquilly permitting these\nirregular cursings to evaporate, Stubb then in a plain, business-like,\nbut still half humorous manner, cursed Pip officially; and that done,\nunofficially gave him much wholesome advice. The substance was, Never\njump from a boat, Pip, except  but all the rest was indefinite, as\nthe soundest advice ever is. Now, in general, Stick to the boat, is\nyour true motto in whaling; but cases will sometimes happen when Leap\nfrom the boat, is still better. Moreover, as if perceiving at last\nthat if he should give undiluted conscientious advice to Pip, he would\nbe leaving him too wide a margin to jump in for the future; Stubb\nsuddenly dropped all advice, and concluded with a peremptory command,\n\"Stick to the boat, Pip, or by the Lord, I won't pick you up if you\njump; mind that. We can't afford to lose whales by the likes of you; a\nwhale would sell for thirty times what you would, Pip, in\nAlabama. Bear that in mind, and don't jump any more.\" Hereby perhaps\nStubb indirectly hinted, that though man loved his fellow, yet man is\na money-making animal, which propensity too often interferes with his\nbenevolence.\n\nBut we are all in the hands of the Gods; and Pip jumped again. It was\nunder very similar circumstances to the first performance; but this\ntime he did not breast out the line; and hence, when the whale started\nto run, Pip was left behind on the sea, like a hurried traveller's\ntrunk. Alas! Stubb was but too true to his word. It was a beautiful,\nbounteous, blue day; the spangled sea calm and cool, and flatly\nstretching away, all round, to the horizon, like gold-beater's skin\nhammered out to the extremest. Bobbing up and down in that sea, Pip's\nebon head showed like a head of cloves. No boat-knife was lifted when\nhe fell so rapidly astern. Stubb's inexorable back was turned upon\nhim; and the whale was winged. In three minutes, a whole mile of\nshoreless ocean was between Pip and Stubb. Out from the centre of the\nsea, poor Pip turned his crisp, curling, black head to the sun,\nanother lonely castaway, though the loftiest and the brightest.\n\nNow, in calm weather, to swim in the open ocean is as easy to the\npractised swimmer as to ride in a spring-carriage ashore. But the\nawful lonesomeness is intolerable. The intense concentration of self\nin the middle of such a heartless immensity, my God! who can tell it?\nMark, how when sailors in a dead calm bathe in the open sea  mark\nhow closely they hug their ship and only coast along her sides.\n\nBut had Stubb really abandoned the poor little negro to his fate? No;\nhe did not mean to, at least. Because there were two boats in his\nwake, and he supposed, no doubt, that they would of course come up to\nPip very quickly, and pick him up; though, indeed, such considerations\ntowards oarsmen jeopardized through their own timidity, is not always\nmanifested by the hunters in all similar instances; and such instances\nnot unfrequently occur; almost invariably in the fishery, a coward, so\ncalled, is marked with the same ruthless detestation peculiar to\nmilitary navies and armies.\n\nBut it so happened, that those boats, without seeing Pip, suddenly\nspying whales close to them on one side, turned, and gave chase; and\nStubb's boat was now so far away, and he and all his crew so intent\nupon his fish, that Pip's ringed horizon began to expand around him\nmiserably. By the merest chance the ship itself at last rescued him;\nbut from that hour the little negro went about the deck an idiot;\nsuch, at least, they said he was. The sea had jeeringly kept his\nfinite body up, but drowned the infinite of his soul. Not drowned\nentirely, though. Rather carried down alive to wondrous depths, where\nstrange shapes of the unwarped primal world glided to and fro before\nhis passive eyes; and the miser-merman, Wisdom, revealed his hoarded\nheaps; and among the joyous, heartless, ever-juvenile eternities, Pip\nsaw the multitudinous, God-omnipresent, coral insects, that out of the\nfirmament of waters heaved the colossal orbs. He saw God's foot upon\nthe treadle of the loom, and spoke it; and therefore his shipmates\ncalled him mad. So man's insanity is heaven's sense; and wandering\nfrom all mortal reason, man comes at last to that celestial thought,\nwhich, to reason, is absurd and frantic; and weal or woe, feels then\nuncompromised, indifferent as his God.\n\nFor the rest, blame not Stubb too hardly. The thing is common in that\nfishery; and in the sequel of the narrative, it will then be seen what\nlike abandonment befell myself.\n\nCHAPTER 94 A Squeeze of the Hand.\n\nThat whale of Stubb's, so dearly purchased, was duly brought to the\nPequod's side, where all those cutting and hoisting operations\npreviously detailed, were regularly gone through, even to the baling\nof the Heidelburgh Tun, or Case.\n\nWhile some were occupied with this latter duty, others were employed\nin dragging away the larger tubs, so soon as filled with the sperm;\nand when the proper time arrived, this same sperm was carefully\nmanipulated ere going to the try-works, of which anon.\n\nIt had cooled and crystallized to such a degree, that when, with\nseveral others, I sat down before a large Constantine's bath of it, I\nfound it strangely concreted into lumps, here and there rolling about\nin the liquid part. It was our business to squeeze these lumps back\ninto fluid. A sweet and unctuous duty! No wonder that in old times\nthis sperm was such a favourite cosmetic. Such a clearer! such a\nsweetener! such a softener! such a delicious molifier! After having my\nhands in it for only a few minutes, my fingers felt like eels, and\nbegan, as it were, to serpentine and spiralise.\n\nAs I sat there at my ease, cross-legged on the deck; after the bitter\nexertion at the windlass; under a blue tranquil sky; the ship under\nindolent sail, and gliding so serenely along; as I bathed my hands\namong those soft, gentle globules of infiltrated tissues, woven almost\nwithin the hour; as they richly broke to my fingers, and discharged\nall their opulence, like fully ripe grapes their wine; as I snuffed up\nthat uncontaminated aroma,  literally and truly, like the smell of\nspring violets; I declare to you, that for the time I lived as in a\nmusky meadow; I forgot all about our horrible oath; in that\ninexpressible sperm, I washed my hands and my heart of it; I almost\nbegan to credit the old Paracelsan superstition that sperm is of rare\nvirtue in allaying the heat of anger; while bathing in that bath, I\nfelt divinely free from all ill-will, or petulance, or malice, of any\nsort whatsoever.\n\nSqueeze! squeeze! squeeze! all the morning long; I squeezed that sperm\ntill I myself almost melted into it; I squeezed that sperm till a\nstrange sort of insanity came over me; and I found myself unwittingly\nsqueezing my co-laborers' hands in it, mistaking their hands for the\ngentle globules. Such an abounding, affectionate, friendly, loving\nfeeling did this avocation beget; that at last I was continually\nsqueezing their hands, and looking up into their eyes sentimentally;\nas much as to say,  Oh! my dear fellow beings, why should we longer\ncherish any social acerbities, or know the slightest ill-humor or\nenvy! Come; let us squeeze hands all round; nay, let us all squeeze\nourselves into each other; let us squeeze ourselves universally into\nthe very milk and sperm of kindness.\n\nWould that I could keep squeezing that sperm for ever! For now, since\nby many prolonged, repeated experiences, I have perceived that in all\ncases man must eventually lower, or at least shift, his conceit of\nattainable felicity; not placing it anywhere in the intellect or the\nfancy; but in the wife, the heart, the bed, the table, the saddle, the\nfireside, the country; now that I have perceived all this, I am ready\nto squeeze case eternally. In thoughts of the visions of the night, I\nsaw long rows of angels in paradise, each with his hands in a jar of\nspermaceti.\n\nNow, while discoursing of sperm, it behooves to speak of other things\nakin to it, in the business of preparing the sperm whale for the\ntry-works.\n\nFirst comes white-horse, so called, which is obtained from the\ntapering part of the fish, and also from the thicker portions of his\nflukes. It is tough with congealed tendons  a wad of muscle  but\nstill contains some oil. After being severed from the whale, the\nwhite-horse is first cut into portable oblongs ere going to the\nmincer. They look much like blocks of Berkshire marble.\n\nPlum-pudding is the term bestowed upon certain fragmentary parts of\nthe whale's flesh, here and there adhering to the blanket of blubber,\nand often participating to a considerable degree in its\nunctuousness. It is a most refreshing, convivial, beautiful object to\nbehold. As its name imports, it is of an exceedingly rich, mottled\ntint, with a bestreaked snowy and golden ground, dotted with spots of\nthe deepest crimson and purple. It is plums of rubies, in pictures of\ncitron. Spite of reason, it is hard to keep yourself from eating it. I\nconfess, that once I stole behind the foremast to try it. It tasted\nsomething as I should conceive a royal cutlet from the thigh of Louis\nle Gros might have tasted, supposing him to have been killed the first\nday after the venison season, and that particular venison season\ncontemporary with an unusually fine vintage of the vineyards of\nChampagne.\n\nThere is another substance, and a very singular one, which turns up in\nthe course of this business, but which I feel it to be very puzzling\nadequately to describe. It is called slobgollion; an appellation\noriginal with the whalemen, and even so is the nature of the\nsubstance. It is an ineffably oozy, stringy affair, most frequently\nfound in the tubs of sperm, after a prolonged squeezing, and\nsubsequent decanting. I hold it to be the wondrously thin, ruptured\nmembranes of the case, coalescing.\n\nGurry, so called, is a term properly belonging to right whalemen, but\nsometimes incidentally used by the sperm fishermen. It designates the\ndark, glutinous substance which is scraped off the back of the\nGreenland or right whale, and much of which covers the decks of those\ninferior souls who hunt that ignoble Leviathan.\n\nNippers. Strictly this word is not indigenous to the whale's\nvocabulary. But as applied by whalemen, it becomes so. A whaleman's\nnipper is a short firm strip of tendinous stuff cut from the tapering\npart of Leviathan's tail: it averages an inch in thickness, and for\nthe rest, is about the size of the iron part of a hoe. Edgewise moved\nalong the oily deck, it operates like a leathern squilgee; and by\nnameless blandishments, as of magic, allures along with it all\nimpurities.\n\nBut to learn all about these recondite matters, your best way is at\nonce to descend into the blubber-room, and have a long talk with its\ninmates. This place has previously been mentioned as the receptacle\nfor the blanket-pieces, when stript and hoisted from the whale. When\nthe proper time arrives for cutting up its contents, this apartment is\na scene of terror to all tyros, especially by night. On one side, lit\nby a dull lantern, a space has been left clear for the workmen. They\ngenerally go in pairs,  a pike-and-gaffman and a spade-man. The\nwhaling-pike is similar to a frigate's boarding-weapon of the same\nname. The gaff is something like a boat-hook. With his gaff, the\ngaffman hooks on to a sheet of blubber, and strives to hold it from\nslipping, as the ship pitches and lurches about. Meanwhile, the\nspade-man stands on the sheet itself, perpendicularly chopping it into\nthe portable horse-pieces. This spade is sharp as hone can make it;\nthe spademan's feet are shoeless; the thing he stands on will\nsometimes irresistibly slide away from him, like a sledge. If he cuts\noff one of his own toes, or one of his assistants', would you be very\nmuch astonished? Toes are scarce among veteran blubber-room men.\n\nCHAPTER 95 The Cassock.\n\nHad you stepped on board the Pequod at a certain juncture of this\npost-mortemizing of the whale; and had you strolled forward nigh the\nwindlass, pretty sure am I that you would have scanned with no small\ncuriosity a very strange, enigmatical object, which you would have\nseen there, lying along lengthwise in the lee scuppers. Not the\nwondrous cistern in the whale's huge head; not the prodigy of his\nunhinged lower jaw; not the miracle of his symmetrical tail; none of\nthese would so surprise you, as half a glimpse of that unaccountable\ncone,  longer than a Kentuckian is tall, nigh a foot in diameter at\nthe base, and jet-black as Yojo, the ebony idol of Queequeg. And an\nidol, indeed, it is; or, rather, in old times, its likeness was. Such\nan idol as that found in the secret groves of Queen Maachah in Judea;\nand for worshipping which, King Asa, her son, did depose her, and\ndestroyed the idol, and burnt it for an abomination at the brook\nKedron, as darkly set forth in the 15th chapter of the First Book of\nKings.\n\nLook at the sailor, called the mincer, who now comes along, and\nassisted by two allies, heavily backs the grandissimus, as the\nmariners call it, and with bowed shoulders, staggers off with it as if\nhe were a grenadier carrying a dead comrade from the field. Extending\nit upon the forecastle deck, he now proceeds cylindrically to remove\nits dark pelt, as an African hunter the pelt of a boa. This done he\nturns the pelt inside out, like a pantaloon leg; gives it a good\nstretching, so as almost to double its diameter; and at last hangs it,\nwell spread, in the rigging, to dry. Ere long, it is taken down; when\nremoving some three feet of it, towards the pointed extremity, and\nthen cutting two slits for arm-holes at the other end, he lengthwise\nslips himself bodily into it. The mincer now stands before you\ninvested in the full canonicals of his calling. Immemorial to all his\norder, this investiture alone will adequately protect him, while\nemployed in the peculiar functions of his office.\n\nThat office consists in mincing the horse-pieces of blubber for the\npots; an operation which is conducted at a curious wooden horse,\nplanted endwise against the bulwarks, and with a capacious tub beneath\nit, into which the minced pieces drop, fast as the sheets from a rapt\norator's desk. Arrayed in decent black; occupying a conspicuous\npulpit; intent on bible leaves; what a candidate for an archbishopric,\nwhat a lad for a Pope were this mincer!\n\n Bible leaves! Bible leaves! This is the invariable cry from the\nmates to the mincer. It enjoins him to be careful, and cut his work\ninto as thin slices as possible, inasmuch as by so doing the business\nof boiling out the oil is much accelerated, and its quantity\nconsiderably increased, besides perhaps improving it in quality.\n\nCHAPTER 96\n\nBesides her hoisted boats, an American whaler is outwardly\ndistinguished by her try-works. She presents the curious anomaly of\nthe most solid masonry joining with oak and hemp in constituting the\ncompleted ship. It is as if from the open field a brick-kiln were\ntransported to her planks.\n\nThe try-works are planted between the foremast and mainmast, the most\nroomy part of the deck. The timbers beneath are of a peculiar\nstrength, fitted to sustain the weight of an almost solid mass of\nbrick and mortar, some ten feet by eight square, and five in\nheight. The foundation does not penetrate the deck, but the masonry is\nfirmly secured to the surface by ponderous knees of iron bracing it on\nall sides, and screwing it down to the timbers. On the flanks it is\ncased with wood, and at top completely covered by a large, sloping,\nbattened hatchway. Removing this hatch we expose the great try-pots,\ntwo in number, and each of several barrels' capacity. When not in use,\nthey are kept remarkably clean. Sometimes they are polished with\nsoapstone and sand, till they shine within like silver\npunch-bowls. During the night-watches some cynical old sailors will\ncrawl into them and coil themselves away there for a nap. While\nemployed in polishing them  one man in each pot, side by side \nmany confidential communications are carried on, over the iron\nlips. It is a place also for profound mathematical meditation. It was\nin the left hand try-pot of the Pequod, with the soapstone diligently\ncircling round me, that I was first indirectly struck by the\nremarkable fact, that in geometry all bodies gliding along the\ncycloid, my soapstone for example, will descend from any point in\nprecisely the same time.\n\nRemoving the fire-board from the front of the try-works, the bare\nmasonry of that side is exposed, penetrated by the two iron mouths of\nthe furnaces, directly underneath the pots. These mouths are fitted\nwith heavy doors of iron. The intense heat of the fire is prevented\nfrom communicating itself to the deck, by means of a shallow reservoir\nextending under the entire inclosed surface of the works. By a tunnel\ninserted at the rear, this reservoir is kept replenished with water as\nfast as it evaporates. There are no external chimneys; they open\ndirect from the rear wall. And here let us go back for a moment.\n\nIt was about nine o'clock at night that the Pequod's try-works were\nfirst started on this present voyage. It belonged to Stubb to oversee\nthe business.\n\n\"All ready there? Off hatch, then, and start her. You cook, fire the\nworks.\" This was an easy thing, for the carpenter had been thrusting\nhis shavings into the furnace throughout the passage. Here be it said\nthat in a whaling voyage the first fire in the try-works has to be fed\nfor a time with wood. After that no wood is used, except as a means of\nquick ignition to the staple fuel. In a word, after being tried out,\nthe crisp, shrivelled blubber, now called scraps or fritters, still\ncontains considerable of its unctuous properties. These fritters feed\nthe flames. Like a plethoric burning martyr, or a self-consuming\nmisanthrope, once ignited, the whale supplies his own fuel and burns\nby his own body. Would that he consumed his own smoke! for his smoke\nis horrible to inhale, and inhale it you must, and not only that, but\nyou must live in it for the time. It has an unspeakable, wild, Hindoo\nodor about it, such as may lurk in the vicinity of funereal pyres. It\nsmells like the left wing of the day of judgment; it is an argument\nfor the pit.\n\nBy midnight the works were in full operation. We were clear from the\ncarcase; sail had been made; the wind was freshening; the wild ocean\ndarkness was intense. But that darkness was licked up by the fierce\nflames, which at intervals forked forth from the sooty flues, and\nilluminated every lofty rope in the rigging, as with the famed Greek\nfire. The burning ship drove on, as if remorselessly commissioned to\nsome vengeful deed. So the pitch and sulphur-freighted brigs of the\nbold Hydriote, Canaris, issuing from their midnight harbors, with\nbroad sheets of flame for sails, bore down upon the Turkish frigates,\nand folded them in conflagrations.\n\nThe hatch, removed from the top of the works, now afforded a wide\nhearth in front of them. Standing on this were the Tartarean shapes of\nthe pagan harpooneers, always the whale-ship's stokers. With huge\npronged poles they pitched hissing masses of blubber into the scalding\npots, or stirred up the fires beneath, till the snaky flames darted,\ncurling, out of the doors to catch them by the feet. The smoke rolled\naway in sullen heaps. To every pitch of the ship there was a pitch of\nthe boiling oil, which seemed all eagerness to leap into their\nfaces. Opposite the mouth of the works, on the further side of the\nwide wooden hearth, was the windlass. This served for a sea-sofa. Here\nlounged the watch, when not otherwise employed, looking into the red\nheat of the fire, till their eyes felt scorched in their heads. Their\ntawny features, now all begrimed with smoke and sweat, their matted\nbeards, and the contrasting barbaric brilliancy of their teeth, all\nthese were strangely revealed in the capricious emblazonings of the\nworks. As they narrated to each other their unholy adventures, their\ntales of terror told in words of mirth; as their uncivilized laughter\nforked upwards out of them, like the flames from the furnace; as to\nand fro, in their front, the harpooneers wildly gesticulated with\ntheir huge pronged forks and dippers; as the wind howled on, and the\nsea leaped, and the ship groaned and dived, and yet steadfastly shot\nher red hell further and further into the blackness of the sea and the\nnight, and scornfully champed the white bone in her mouth, and\nviciously spat round her on all sides; then the rushing Pequod,\nfreighted with savages, and laden with fire, and burning a corpse, and\nplunging into that blackness of darkness, seemed the material\ncounterpart of her monomaniac commander's soul.\n\nSo seemed it to me, as I stood at her helm, and for long hours\nsilently guided the way of this fire-ship on the sea. Wrapped, for\nthat interval, in darkness myself, I but the better saw the redness,\nthe madness, the ghastliness of others. The continual sight of the\nfiend shapes before me, capering half in smoke and half in fire, these\nat last begat kindred visions in my soul, so soon as I began to yield\nto that unaccountable drowsiness which ever would come over me at a\nmidnight helm.\n\nBut that night, in particular, a strange (and ever since inexplicable)\nthing occurred to me. Starting from a brief standing sleep, I was\nhorribly conscious of something fatally wrong. The jaw-bone tiller\nsmote my side, which leaned against it; in my ears was the low hum of\nsails, just beginning to shake in the wind; I thought my eyes were\nopen; I was half conscious of putting my fingers to the lids and\nmechanically stretching them still further apart. But, spite of all\nthis, I could see no compass before me to steer by; though it seemed\nbut a minute since I had been watching the card, by the steady\nbinnacle lamp illuminating it. Nothing seemed before me but a jet\ngloom, now and then made ghastly by flashes of redness. Uppermost was\nthe impression, that whatever swift, rushing thing I stood on was not\nso much bound to any haven ahead as rushing from all havens astern. A\nstark, bewildered feeling, as of death, came over me. Convulsively my\nhands grasped the tiller, but with the crazy conceit that the tiller\nwas, somehow, in some enchanted way, inverted. My God! what is the\nmatter with me? thought I. Lo! in my brief sleep I had turned myself\nabout, and was fronting the ship's stern, with my back to her prow and\nthe compass. In an instant I faced back, just in time to prevent the\nvessel from flying up into the wind, and very probably capsizing\nher. How glad and how grateful the relief from this unnatural\nhallucination of the night, and the fatal contingency of being brought\nby the lee!\n\nLook not too long in the face of the fire, O man! Never dream with thy\nhand on the helm! Turn not thy back to the compass; accept the first\nhint of the hitching tiller; believe not the artificial fire, when its\nredness makes all things look ghastly. To-morrow, in the natural sun,\nthe skies will be bright; those who glared like devils in the forking\nflames, the morn will show in far other, at least gentler, relief; the\nglorious, golden, glad sun, the only true lamp  all others but\nliars!\n\nNevertheless the sun hides not Virginia's Dismal Swamp, nor Rome's\naccursed Campagna, nor wide Sahara, nor all the millions of miles of\ndeserts and of griefs beneath the moon. The sun hides not the ocean,\nwhich is the dark side of this earth, and which is two thirds of this\nearth. So, therefore, that mortal man who hath more of joy than sorrow\nin him, that mortal man cannot be true  not true, or\nundeveloped. With books the same. The truest of all men was the Man of\nSorrows, and the truest of all books is Solomon's, and Ecclesiastes is\nthe fine hammered steel of woe. \"All is vanity.\" ALL. This wilful\nworld hath not got hold of unchristian Solomon's wisdom yet. But he\nwho dodges hospitals and jails, and walks fast crossing graveyards,\nand would rather talk of operas than hell; calls Cowper, Young,\nPascal, Rousseau, poor devils all of sick men; and throughout a\ncare-free lifetime swears by Rabelais as passing wise, and therefore\njolly;  not that man is fitted to sit down on tomb-stones, and\nbreak the green damp mould with unfathomably wondrous Solomon.\n\nBut even Solomon, he says, \"the man that wandereth out of the way of\nunderstanding shall remain\" (i.e., even while living) \"in the\ncongregation of the dead.\" Give not thyself up, then, to fire, lest it\ninvert thee, deaden thee; as for the time it did me. There is a wisdom\nthat is woe; but there is a woe that is madness. And there is a\nCatskill eagle in some souls that can alike dive down into the\nblackest gorges, and soar out of them again and become invisible in\nthe sunny spaces. And even if he for ever flies within the gorge, that\ngorge is in the mountains; so that even in his lowest swoop the\nmountain eagle is still higher than other birds upon the plain, even\nthough they soar.\n\nCHAPTER 97 The Lamp.\n\nHad you descended from the Pequod's try-works to the Pequod's\nforecastle, where the off duty watch were sleeping, for one single\nmoment you would have almost thought you were standing in some\nilluminated shrine of canonized kings and counsellors. There they lay\nin their triangular oaken vaults, each mariner a chiselled muteness; a\nscore of lamps flashing upon his hooded eyes.\n\nIn merchantmen, oil for the sailor is more scarce than the milk of\nqueens. To dress in the dark, and eat in the dark, and stumble in\ndarkness to his pallet, this is his usual lot. But the whaleman, as he\nseeks the food of light, so he lives in light. He makes his berth an\nAladdin's lamp, and lays him down in it; so that in the pitchiest\nnight the ship's black hull still houses an illumination.\n\nSee with what entire freedom the whaleman takes his handful of lamps\n often but old bottles and vials, though  to the copper cooler\nat the try-works, and replenishes them there, as mugs of ale at a\nvat. He burns, too, the purest of oil, in its unmanufactured, and,\ntherefore, unvitiated state; a fluid unknown to solar, lunar, or\nastral contrivances ashore. It is sweet as early grass butter in\nApril. He goes and hunts for his oil, so as to be sure of its\nfreshness and genuineness, even as the traveller on the prairie hunts\nup his own supper of game.\n\nCHAPTER 98 Stowing Down and Clearing Up.\n\nAlready has it been related how the great leviathan is afar off\ndescried from the mast-head; how he is chased over the watery moors,\nand slaughtered in the valleys of the deep; how he is then towed\nalongside and beheaded; and how (on the principle which entitled the\nheadsman of old to the garments in which the beheaded was killed) his\ngreat padded surtout becomes the property of his executioner; how, in\ndue time, he is condemned to the pots, and, like Shadrach, Meshach,\nand Abednego, his spermaceti, oil, and bone pass unscathed through the\nfire;  but now it remains to conclude the last chapter of this part\nof the description by rehearsing  singing, if I may  the\nromantic proceeding of decanting off his oil into the casks and\nstriking them down into the hold, where once again leviathan returns\nto his native profundities, sliding along beneath the surface as\nbefore; but, alas! never more to rise and blow.\n\nWhile still warm, the oil, like hot punch, is received into the\nsix-barrel casks; and while, perhaps, the ship is pitching and rolling\nthis way and that in the midnight sea, the enormous casks are slewed\nround and headed over, end for end, and sometimes perilously scoot\nacross the slippery deck, like so many land slides, till at last\nman-handled and stayed in their course; and all round the hoops, rap,\nrap, go as many hammers as can play upon them, for now, ex officio,\nevery sailor is a cooper.\n\nAt length, when the last pint is casked, and all is cool, then the\ngreat hatchways are unsealed, the bowels of the ship are thrown open,\nand down go the casks to their final rest in the sea. This done, the\nhatches are replaced, and hermetically closed, like a closet walled\nup.\n\nIn the sperm fishery, this is perhaps one of the most remarkable\nincidents in all the business of whaling. One day the planks stream\nwith freshets of blood and oil; on the sacred quarter-deck enormous\nmasses of the whale's head are profanely piled; great rusty casks lie\nabout, as in a brewery yard; the smoke from the try-works has besooted\nall the bulwarks; the mariners go about suffused with unctuousness;\nthe entire ship seems great leviathan himself; while on all hands the\ndin is deafening.\n\nBut a day or two after, you look about you, and prick your ears in\nthis self-same ship; and were it not for the tell-tale boats and\ntry-works, you would all but swear you trod some silent merchant\nvessel, with a most scrupulously neat commander. The unmanufactured\nsperm oil possesses a singularly cleansing virtue. This is the reason\nwhy the decks never look so white as just after what they call an\naffair of oil. Besides, from the ashes of the burned scraps of the\nwhale, a potent lye is readily made; and whenever any adhesiveness\nfrom the back of the whale remains clinging to the side, that lye\nquickly exterminates it. Hands go diligently along the bulwarks, and\nwith buckets of water and rags restore them to their full\ntidiness. The soot is brushed from the lower rigging. All the numerous\nimplements which have been in use are likewise faithfully cleansed and\nput away. The great hatch is scrubbed and placed upon the try-works,\ncompletely hiding the pots; every cask is out of sight; all tackles\nare coiled in unseen nooks; and when by the combined and simultaneous\nindustry of almost the entire ship's company, the whole of this\nconscientious duty is at last concluded, then the crew themselves\nproceed to their own ablutions; shift themselves from top to toe; and\nfinally issue to the immaculate deck, fresh and all aglow, as\nbridegrooms new-leaped from out the daintiest Holland.\n\nNow, with elated step, they pace the planks in twos and threes, and\nhumorously discourse of parlors, sofas, carpets, and fine cambrics;\npropose to mat the deck; think of having hanging to the top; object\nnot to taking tea by moonlight on the piazza of the forecastle. To\nhint to such musked mariners of oil, and bone, and blubber, were\nlittle short of audacity. They know not the thing you distantly allude\nto. Away, and bring us napkins!\n\nBut mark: aloft there, at the three mast heads, stand three men intent\non spying out more whales, which, if caught, infallibly will again\nsoil the old oaken furniture, and drop at least one small grease-spot\nsomewhere. Yes; and many is the time, when, after the severest\nuninterrupted labors, which know no night; continuing straight through\nfor ninety-six hours; when from the boat, where they have swelled\ntheir wrists with all day rowing on the Line,  they only step to\nthe deck to carry vast chains, and heave the heavy windlass, and cut\nand slash, yea, and in their very sweatings to be smoked and burned\nanew by the combined fires of the equatorial sun and the equatorial\ntry-works; when, on the heel of all this, they have finally bestirred\nthemselves to cleanse the ship, and make a spotless dairy room of it;\nmany is the time the poor fellows, just buttoning the necks of their\nclean frocks, are startled by the cry of \"There she blows!\" and away\nthey fly to fight another whale, and go through the whole weary thing\nagain. Oh! my friends, but this is man-killing! Yet this is life. For\nhardly have we mortals by long toilings extracted from this world's\nvast bulk its small but valuable sperm; and then, with weary patience,\ncleansed ourselves from its defilements, and learned to live here in\nclean tabernacles of the soul; hardly is this done, when  There she\nblows!  the ghost is spouted up, and away we sail to fight some\nother world, and go through young life's old routine again.\n\nOh! the metempsychosis! Oh! Pythagoras, that in bright Greece, two\nthousand years ago, did die, so good, so wise, so mild; I sailed with\nthee along the Peruvian coast last voyage  and, foolish as I am,\ntaught thee, a green simple boy, how to splice a rope!\n\nCHAPTER 99 The Doubloon.\n\nEre now it has been related how Ahab was wont to pace his\nquarter-deck, taking regular turns at either limit, the binnacle and\nmainmast; but in the multiplicity of other things requiring narration\nit has not been added how that sometimes in these walks, when most\nplunged in his mood, he was wont to pause in turn at each spot, and\nstand there strangely eyeing the particular object before him. When he\nhalted before the binnacle, with his glance fastened on the pointed\nneedle in the compass, that glance shot like a javelin with the\npointed intensity of his purpose; and when resuming his walk he again\npaused before the mainmast, then, as the same riveted glance fastened\nupon the riveted gold coin there, he still wore the same aspect of\nnailed firmness, only dashed with a certain wild longing, if not\nhopefulness.\n\nBut one morning, turning to pass the doubloon, he seemed to be newly\nattracted by the strange figures and inscriptions stamped on it, as\nthough now for the first time beginning to interpret for himself in\nsome monomaniac way whatever significance might lurk in them. And some\ncertain significance lurks in all things, else all things are little\nworth, and the round world itself but an empty cipher, except to sell\nby the cartload, as they do hills about Boston, to fill up some morass\nin the Milky Way.\n\nNow this doubloon was of purest, virgin gold, raked somewhere out of\nthe heart of gorgeous hills, whence, east and west, over golden sands,\nthe head-waters of many a Pactolus flows. And though now nailed amidst\nall the rustiness of iron bolts and the verdigris of copper spikes,\nyet, untouchable and immaculate to any foulness, it still preserved\nits Quito glow. Nor, though placed amongst a ruthless crew and every\nhour passed by ruthless hands, and through the livelong nights\nshrouded with thick darkness which might cover any pilfering approach,\nnevertheless every sunrise found the doubloon where the sunset left it\nlast. For it was set apart and sanctified to one awe-striking end; and\nhowever wanton in their sailor ways, one and all, the mariners revered\nit as the white whale's talisman. Sometimes they talked it over in the\nweary watch by night, wondering whose it was to be at last, and\nwhether he would ever live to spend it.\n\nNow those noble golden coins of South America are as medals of the sun\nand tropic token-pieces. Here palms, alpacas, and volcanoes; sun's\ndisks and stars; ecliptics, horns-of-plenty, and rich banners waving,\nare in luxuriant profusion stamped; so that the precious gold seems\nalmost to derive an added preciousness and enhancing glories, by\npassing through those fancy mints, so Spanishly poetic.\n\nIt so chanced that the doubloon of the Pequod was a most wealthy\nexample of these things. On its round border it bore the letters,\nREPUBLICA DEL ECUADOR: QUITO. So this bright coin came from a country\nplanted in the middle of the world, and beneath the great equator, and\nnamed after it; and it had been cast midway up the Andes, in the\nunwaning clime that knows no autumn. Zoned by those letters you saw\nthe likeness of three Andes' summits; from one a flame; a tower on\nanother; on the third a crowing cock; while arching over all was a\nsegment of the partitioned zodiac, the signs all marked with their\nusual cabalistics, and the keystone sun entering the equinoctial point\nat Libra.\n\nBefore this equatorial coin, Ahab, not unobserved by others, was now\npausing.\n\n\"There's something ever egotistical in mountain-tops and towers, and\nall other grand and lofty things; look here,  three peaks as proud\nas Lucifer. The firm tower, that is Ahab; the volcano, that is Ahab;\nthe courageous, the undaunted, and victorious fowl, that, too, is\nAhab; all are Ahab; and this round gold is but the image of the\nrounder globe, which, like a magician's glass, to each and every man\nin turn but mirrors back his own mysterious self. Great pains, small\ngains for those who ask the world to solve them; it cannot solve\nitself. Methinks now this coined sun wears a ruddy face; but see! aye,\nhe enters the sign of storms, the equinox! and but six months before\nhe wheeled out of a former equinox at Aries! From storm to storm! So\nbe it, then. Born in throes, 't is fit that man should live in pains\nand die in pangs! So be it, then! Here's stout stuff for woe to work\non. So be it, then.\"\n\n\"No fairy fingers can have pressed the gold, but devil's claws must\nhave left their mouldings there since yesterday,\" murmured Starbuck to\nhimself, leaning against the bulwarks. \"The old man seems to read\nBelshazzar's awful writing. I have never marked the coin\ninspectingly. He goes below; let me read. A dark valley between three\nmighty, heaven-abiding peaks, that almost seem the Trinity, in some\nfaint earthly symbol. So in this vale of Death, God girds us round;\nand over all our gloom, the sun of Righteousness still shines a beacon\nand a hope. If we bend down our eyes, the dark vale shows her mouldy\nsoil; but if we lift them, the bright sun meets our glance half way,\nto cheer. Yet, oh, the great sun is no fixture; and if, at midnight,\nwe would fain snatch some sweet solace from him, we gaze for him in\nvain! This coin speaks wisely, mildly, truly, but still sadly to me. I\nwill quit it, lest Truth shake me falsely.\"\n\n\"There now's the old Mogul,\" soliloquized Stubb by the try-works,\n\"he's been twigging it; and there goes Starbuck from the same, and\nboth with faces which I should say might be somewhere within nine\nfathoms long. And all from looking at a piece of gold, which did I\nhave it now on Negro Hill or in Corlaer's Hook, I'd not look at it\nvery long ere spending it. Humph! in my poor, insignificant opinion, I\nregard this as queer. I have seen doubloons before now in my\nvoyagings; your doubloons of old Spain, your doubloons of Peru, your\ndoubloons of Chili, your doubloons of Bolivia, your doubloons of\nPopayan; with plenty of gold moidores and pistoles, and joes, and half\njoes, and quarter joes. What then should there be in this doubloon of\nthe Equator that is so killing wonderful? By Golconda! let me read it\nonce. Halloa! here's signs and wonders truly! That, now, is what old\nBowditch in his Epitome calls the zodiac, and what my almanac below\ncalls ditto. I'll get the almanac and as I have heard devils can be\nraised with Daboll's arithmetic, I'll try my hand at raising a meaning\nout of these queer curvicues here with the Massachusetts\ncalendar. Here's the book. Let's see now. Signs and wonders; and the\nsun, he's always among 'em. Hem, hem, hem; here they are  here they\ngo  all alive:  Aries, or the Ram; Taurus, or the Bull and\nJimimi! here's Gemini himself, or the Twins. Well; the sun he wheels\namong 'em. Aye, here on the coin he's just crossing the threshold\nbetween two of twelve sitting-rooms all in a ring. Book! you lie\nthere; the fact is, you books must know your places. You'll do to give\nus the bare words and facts, but we come in to supply the\nthoughts. That's my small experience, so far as the Massachusetts\ncalendar, and Bowditch's navigator, and Daboll's arithmetic go. Signs\nand wonders, eh? Pity if there is nothing wonderful in signs, and\nsignificant in wonders! There's a clue somewhere; wait a bit; hist \nhark! By Jove, I have it! Look you, Doubloon, your zodiac here is the\nlife of man in one round chapter; and now I'll read it off, straight\nout of the book. Come, Almanack! To begin: there's Aries, or the Ram\n lecherous dog, he begets us; then, Taurus, or the Bull  he\nbumps us the first thing; then Gemini, or the Twins  that is,\nVirtue and Vice; we try to reach Virtue, when lo! comes Cancer the\nCrab, and drags us back; and here, going from Virtue, Leo, a roaring\nLion, lies in the path  he gives a few fierce bites and surly dabs\nwith his paw; we escape, and hail Virgo, the Virgin! that's our first\nlove; we marry and think to be happy for aye, when pop comes Libra, or\nthe Scales  happiness weighed and found wanting; and while we are\nvery sad about that, Lord! how we suddenly jump, as Scorpio, or the\nScorpion, stings us in the rear; we are curing the wound, when whang\ncome the arrows all round; Sagittarius, or the Archer, is amusing\nhimself. As we pluck out the shafts, stand aside! here's the\nbattering-ram, Capricornus, or the Goat; full tilt, he comes rushing,\nand headlong we are tossed; when Aquarius, or the Water-bearer, pours\nout his whole deluge and drowns us; and to wind up with Pisces, or the\nFishes, we sleep. There's a sermon now, writ in high heaven, and the\nsun goes through it every year, and yet comes out of it all alive and\nhearty. Jollily he, aloft there, wheels through toil and trouble; and\nso, alow here, does jolly Stubb. Oh, jolly's the word for aye! Adieu,\nDoubloon! But stop; here comes little King-Post; dodge round the\ntry-works, now, and let's hear what he'll have to say. There; he's\nbefore it; he'll out with something presently. So, so; he's\nbeginning.\"\n\n\"I see nothing here, but a round thing made of gold, and whoever\nraises a certain whale, this round thing belongs to him. So, what's\nall this staring been about? It is worth sixteen dollars, that's true;\nand at two cents the cigar, that's nine hundred and sixty cigars. I\nwon't smoke dirty pipes like Stubb, but I like cigars, and here's nine\nhundred and sixty of them; so here goes Flask aloft to spy 'em out.\"\n\n\"Shall I call that wise or foolish, now; if it be really wise it has a\nfoolish look to it; yet, if it be really foolish, then has it a sort\nof wiseish look to it. But, avast; here comes our old Manxman  the\nold hearse-driver, he must have been, that is, before he took to the\nsea. He luffs up before the doubloon; halloa, and goes round on the\nother side of the mast; why, there's a horse-shoe nailed on that side;\nand now he's back again; what does that mean? Hark! he's muttering \nvoice like an old worn-out coffee-mill. Prick ears, and listen!\"\n\n\"If the White Whale be raised, it must be in a month and a day, when\nthe sun stands in some one of these signs. I've studied signs, and\nknow their marks; they were taught me two score years ago, by the old\nwitch in Copenhagen. Now, in what sign will the sun then be? The\nhorse-shoe sign; for there it is, right opposite the gold. And what's\nthe horse-shoe sign? The lion is the horse-shoe sign  the roaring\nand devouring lion. Ship, old ship! my old head shakes to think of\nthee.\"\n\n\"There's another rendering now; but still one text. All sorts of men\nin one kind of world, you see. Dodge again! here comes Queequeg \nall tattooing  looks like the signs of the Zodiac himself. What\nsays the Cannibal? As I live he's comparing notes; looking at his\nthigh bone; thinks the sun is in the thigh, or in the calf, or in the\nbowels, I suppose, as the old women talk Surgeon's Astronomy in the\nback country. And by Jove, he's found something there in the vicinity\nof his thigh  I guess it's Sagittarius, or the Archer. No: he don't\nknow what to make of the doubloon; he takes it for an old button off\nsome king's trowsers. But, aside again! here comes that ghost-devil,\nFedallah; tail coiled out of sight as usual, oakum in the toes of his\npumps as usual. What does he say, with that look of his? Ah, only\nmakes a sign to the sign and bows himself; there is a sun on the coin\n fire worshipper, depend upon it. Ho! more and more. This way comes\nPip  poor boy! would he had died, or I; he's half horrible to\nme. He too has been watching all of these interpreters  myself\nincluded  and look now, he comes to read, with that unearthly idiot\nface. Stand away again and hear him. Hark!\"\n\n\"I look, you look, he looks; we look, ye look, they look.\"\n\n\"Upon my soul, he's been studying Murray's Grammar! Improving his\nmind, poor fellow! But what's that he says now  hist!\"\n\n\"I look, you look, he looks; we look, ye look, they look.\"\n\n\"Why, he's getting it by heart  hist! again.\"\n\n\"I look, you look, he looks; we look, ye look, they look.\"\n\n\"Well, that's funny.\"\n\n\"And I, you, and he; and we, ye, and they, are all bats; and I'm a\ncrow, especially when I stand a'top of this pine tree here. Caw! caw!\ncaw! caw! caw! caw! Ain't I a crow? And where's the scare-crow? There\nhe stands; two bones stuck into a pair of old trowsers, and two more\npoked into the sleeves of an old jacket.\"\n\n\"Wonder if he means me?  complimentary!  poor lad!  I could\ngo hang myself. Any way, for the present, I'll quit Pip's vicinity. I\ncan stand the rest, for they have plain wits; but he's too crazy-witty\nfor my sanity. So, so, I leave him muttering.\"\n\n\"Here's the ship's navel, this doubloon here, and they are all on fire\nto unscrew it. But, unscrew your navel, and what's the consequence?\nThen again, if it stays here, that is ugly, too, for when aught's\nnailed to the mast it's a sign that things grow desperate. Ha, ha! old\nAhab! the White Whale; he'll nail ye! This is a pine tree. My father,\nin old Tolland county, cut down a pine tree once, and found a silver\nring grown over in it; some old darkey's wedding ring. How did it get\nthere? And so they'll say in the resurrection, when they come to fish\nup this old mast, and find a doubloon lodged in it, with bedded\noysters for the shaggy bark. Oh, the gold! the precious, precious,\ngold! the green miser'll hoard ye soon! Hish! hish! God goes 'mong the\nworlds blackberrying. Cook! ho, cook! and cook us! Jenny! hey, hey,\nhey, hey, hey, Jenny, Jenny! and get your hoe-cake done!\"\n\nCHAPTER 100 Leg and Arm.\n\nThe Pequod, of Nantucket, Meets the Samuel Enderby, of London.\n\n\"Ship, ahoy! Hast seen the White Whale?\"\n\nSo cried Ahab, once more hailing a ship showing English colours,\nbearing down under the stern. Trumpet to mouth, the old man was\nstanding in his hoisted quarter-boat, his ivory leg plainly revealed\nto the stranger captain, who was carelessly reclining in his own\nboat's bow. He was a darkly-tanned, burly, good-natured, fine-looking\nman, of sixty or thereabouts, dressed in a spacious roundabout, that\nhung round him in festoons of blue pilot-cloth; and one empty arm of\nthis jacket streamed behind him like the broidered arm of a hussar's\nsurcoat.\n\n\"Hast seen the White Whale!\"\n\n\"See you this?\" and withdrawing it from the folds that had hidden it,\nhe held up a white arm of sperm whale bone, terminating in a wooden\nhead like a mallet.\n\n\"Man my boat!\" cried Ahab, impetuously, and tossing about the oars\nnear him  \"Stand by to lower!\"\n\nIn less than a minute, without quitting his little craft, he and his\ncrew were dropped to the water, and were soon alongside of the\nstranger. But here a curious difficulty presented itself. In the\nexcitement of the moment, Ahab had forgotten that since the loss of\nhis leg he had never once stepped on board of any vessel at sea but\nhis own, and then it was always by an ingenious and very handy\nmechanical contrivance peculiar to the Pequod, and a thing not to be\nrigged and shipped in any other vessel at a moment's warning. Now, it\nis no very easy matter for anybody  except those who are almost\nhourly used to it, like whalemen  to clamber up a ship's side from\na boat on the open sea; for the great swells now lift the boat high up\ntowards the bulwarks, and then instantaneously drop it half way down\nto the kelson. So, deprived of one leg, and the strange ship of course\nbeing altogether unsupplied with the kindly invention, Ahab now found\nhimself abjectly reduced to a clumsy landsman again; hopelessly eyeing\nthe uncertain changeful height he could hardly hope to attain.\n\nIt has before been hinted, perhaps, that every little untoward\ncircumstance that befell him, and which indirectly sprang from his\nluckless mishap, almost invariably irritated or exasperated Ahab. And\nin the present instance, all this was heightened by the sight of the\ntwo officers of the strange ship, leaning over the side, by the\nperpendicular ladder of nailed cleets there, and swinging towards him\na pair of tastefully-ornamented man-ropes; for at first they did not\nseem to bethink them that a one-legged man must be too much of a\ncripple to use their sea bannisters. But this awkwardness only lasted\na minute, because the strange captain, observing at a glance how\naffairs stood, cried out, \"I see, I see!  avast heaving there!\nJump, boys, and swing over the cutting-tackle.\"\n\nAs good luck would have it, they had had a whale alongside a day or\ntwo previous, and the great tackles were still aloft, and the massive\ncurved blubber-hook, now clean and dry, was still attached to the\nend. This was quickly lowered to Ahab, who at once comprehending it\nall, slid his solitary thigh into the curve of the hook (it was like\nsitting in the fluke of an anchor, or the crotch of an apple tree),\nand then giving the word, held himself fast, and at the same time also\nhelped to hoist his own weight, by pulling hand-over-hand upon one of\nthe running parts of the tackle. Soon he was carefully swung inside\nthe high bulwarks, and gently landed upon the capstan head. With his\nivory arm frankly thrust forth in welcome, the other captain advanced,\nand Ahab, putting out his ivory leg, and crossing the ivory arm (like\ntwo sword-fish blades) cried out in his walrus way, \"Aye, aye, hearty!\nlet us shake bones together!  an arm and a leg!  an arm that\nnever can shrink, d'ye see; and a leg that never can run. Where did'st\nthou see the White Whale?  how long ago?\"\n\n\"The White Whale,\" said the Englishman, pointing his ivory arm towards\nthe East, and taking a rueful sight along it, as if it had been a\ntelescope; \"there I saw him, on the Line, last season.\"\n\n\"And he took that arm off, did he?\" asked Ahab, now sliding down from\nthe capstan, and resting on the Englishman's shoulder, as he did so.\n\n\"Aye, he was the cause of it, at least; and that leg, too?\"\n\n\"Spin me the yarn,\" said Ahab; \"how was it?\"\n\n\"It was the first time in my life that I ever cruised on the Line,\"\nbegan the Englishman. \"I was ignorant of the White Whale at that\ntime. Well, one day we lowered for a pod of four or five whales, and\nmy boat fastened to one of them; a regular circus horse he was, too,\nthat went milling and milling round so, that my boat's crew could only\ntrim dish, by sitting all their sterns on the outer gunwale. Presently\nup breaches from the bottom of the sea a bouncing great whale, with a\nmilky-white head and hump, all crows' feet and wrinkles.\"\n\n\"It was he, it was he!\" cried Ahab, suddenly letting out his suspended\nbreath.\n\n\"And harpoons sticking in near his starboard fin.\"\n\n\"Aye, aye  they were mine  MY irons,\" cried Ahab, exultingly \n\"but on!\"\n\n\"Give me a chance, then,\" said the Englishman, good-humoredly. \"Well,\nthis old great-grandfather, with the white head and hump, runs all\nafoam into the pod, and goes to snapping furiously at my fast-line!\n\n\"Aye, I see!  wanted to part it; free the fast-fish  an old\ntrick  I know him.\"\n\n\"How it was exactly,\" continued the one-armed commander, \"I do not\nknow; but in biting the line, it got foul of his teeth, caught there\nsomehow; but we didn't know it then; so that when we afterwards pulled\non the line, bounce we came plump on to his hump! instead of the other\nwhale's; that went off to windward, all fluking. Seeing how matters\nstood, and what a noble great whale it was  the noblest and biggest\nI ever saw, sir, in my life  I resolved to capture him, spite of\nthe boiling rage he seemed to be in. And thinking the hap-hazard line\nwould get loose, or the tooth it was tangled to might draw (for I have\na devil of a boat's crew for a pull on a whale-line); seeing all this,\nI say, I jumped into my first mate's boat  Mr. Mounttop's here (by\nthe way, Captain  Mounttop; Mounttop  the captain);  as I was\nsaying, I jumped into Mounttop's boat, which, d'ye see, was gunwale\nand gunwale with mine, then; and snatching the first harpoon, let this\nold great-grandfather have it. But, Lord, look you, sir  hearts and\nsouls alive, man  the next instant, in a jiff, I was blind as a bat\n both eyes out  all befogged and bedeadened with black foam \nthe whale's tail looming straight up out of it, perpendicular in the\nair, like a marble steeple. No use sterning all, then; but as I was\ngroping at midday, with a blinding sun, all crown-jewels; as I was\ngroping, I say, after the second iron, to toss it overboard  down\ncomes the tail like a Lima tower, cutting my boat in two, leaving each\nhalf in splinters; and, flukes first, the white hump backed through\nthe wreck, as though it was all chips. We all struck out. To escape\nhis terrible flailings, I seized hold of my harpoon-pole sticking in\nhim, and for a moment clung to that like a sucking fish. But a combing\nsea dashed me off, and at the same instant, the fish, taking one good\ndart forwards, went down like a flash; and the barb of that cursed\nsecond iron towing along near me caught me here\" (clapping his hand\njust below his shoulder); \"yes, caught me just here, I say, and bore\nme down to Hell's flames, I was thinking; when, when, all of a sudden,\nthank the good God, the barb ript its way along the flesh  clear\nalong the whole length of my arm  came out nigh my wrist, and up I\nfloated;  and that gentleman there will tell you the rest (by the\nway, captain  Dr. Bunger, ship's surgeon: Bunger, my lad,  the\ncaptain). Now, Bunger boy, spin your part of the yarn.\"\n\nThe professional gentleman thus familiarly pointed out, had been all\nthe time standing near them, with nothing specific visible, to denote\nhis gentlemanly rank on board. His face was an exceedingly round but\nsober one; he was dressed in a faded blue woollen frock or shirt, and\npatched trowsers; and had thus far been dividing his attention between\na marlingspike he held in one hand, and a pill-box held in the other,\noccasionally casting a critical glance at the ivory limbs of the two\ncrippled captains. But, at his superior's introduction of him to Ahab,\nhe politely bowed, and straightway went on to do his captain's\nbidding.\n\n\"It was a shocking bad wound,\" began the whale-surgeon; \"and, taking\nmy advice, Captain Boomer here, stood our old Sammy  \"\n\n\"Samuel Enderby is the name of my ship,\" interrupted the one-armed\ncaptain, addressing Ahab; \"go on, boy.\"\n\n\"Stood our old Sammy off to the northward, to get out of the blazing\nhot weather there on the Line. But it was no use  I did all I\ncould; sat up with him nights; was very severe with him in the matter\nof diet  \"\n\n\"Oh, very severe!\" chimed in the patient himself; then suddenly\naltering his voice, \"Drinking hot rum toddies with me every night,\ntill he couldn't see to put on the bandages; and sending me to bed,\nhalf seas over, about three o'clock in the morning. Oh, ye stars! he\nsat up with me indeed, and was very severe in my diet. Oh! a great\nwatcher, and very dietetically severe, is Dr. Bunger. (Bunger, you\ndog, laugh out! why don't ye? You know you're a precious jolly\nrascal.) But, heave ahead, boy, I'd rather be killed by you than kept\nalive by any other man.\"\n\n\"My captain, you must have ere this perceived, respected sir\"  said\nthe imperturbable godly-looking Bunger, slightly bowing to Ahab \n\"is apt to be facetious at times; he spins us many clever things of\nthat sort. But I may as well say  en passant, as the French remark\n that I myself  that is to say, Jack Bunger, late of the\nreverend clergy  am a strict total abstinence man; I never drink\n \"\n\n\"Water!\" cried the captain; \"he never drinks it; it's a sort of fits\nto him; fresh water throws him into the hydrophobia; but go on  go\non with the arm story.\"\n\n\"Yes, I may as well,\" said the surgeon, coolly. \"I was about\nobserving, sir, before Captain Boomer's facetious interruption, that\nspite of my best and severest endeavors, the wound kept getting worse\nand worse; the truth was, sir, it was as ugly gaping wound as surgeon\never saw; more than two feet and several inches long. I measured it\nwith the lead line. In short, it grew black; I knew what was\nthreatened, and off it came. But I had no hand in shipping that ivory\narm there; that thing is against all rule\"  pointing at it with the\nmarlingspike  \"that is the captain's work, not mine; he ordered the\ncarpenter to make it; he had that club-hammer there put to the end, to\nknock some one's brains out with, I suppose, as he tried mine once. He\nflies into diabolical passions sometimes. Do ye see this dent, sir\"\n removing his hat, and brushing aside his hair, and exposing a\nbowl-like cavity in his skull, but which bore not the slightest scarry\ntrace, or any token of ever having been a wound  \"Well, the captain\nthere will tell you how that came here; he knows.\"\n\n\"No, I don't,\" said the captain, \"but his mother did; he was born with\nit. Oh, you solemn rogue, you  you Bunger! was there ever such\nanother Bunger in the watery world? Bunger, when you die, you ought to\ndie in pickle, you dog; you should be preserved to future ages, you\nrascal.\"\n\n\"What became of the White Whale?\" now cried Ahab, who thus far had\nbeen impatiently listening to this by-play between the two Englishmen.\n\n\"Oh!\" cried the one-armed captain, \"oh, yes! Well; after he sounded,\nwe didn't see him again for some time; in fact, as I before hinted, I\ndidn't then know what whale it was that had served me such a trick,\ntill some time afterwards, when coming back to the Line, we heard\nabout Moby Dick  as some call him  and then I knew it was he.\"\n\n\"Did'st thou cross his wake again?\"\n\n\"Twice.\"\n\n\"But could not fasten?\"\n\n\"Didn't want to try to: ain't one limb enough? What should I do\nwithout this other arm? And I'm thinking Moby Dick doesn't bite so\nmuch as he swallows.\"\n\n\"Well, then,\" interrupted Bunger, \"give him your left arm for bait to\nget the right. Do you know, gentlemen\"  very gravely and\nmathematically bowing to each Captain in succession  \"Do you know,\ngentlemen, that the digestive organs of the whale are so inscrutably\nconstructed by Divine Providence, that it is quite impossible for him\nto completely digest even a man's arm? And he knows it too. So that\nwhat you take for the White Whale's malice is only his\nawkwardness. For he never means to swallow a single limb; he only\nthinks to terrify by feints. But sometimes he is like the old juggling\nfellow, formerly a patient of mine in Ceylon, that making believe\nswallow jack-knives, once upon a time let one drop into him in good\nearnest, and there it stayed for a twelvemonth or more; when I gave\nhim an emetic, and he heaved it up in small tacks, d'ye see. No\npossible way for him to digest that jack-knife, and fully incorporate\nit into his general bodily system. Yes, Captain Boomer, if you are\nquick enough about it, and have a mind to pawn one arm for the sake of\nthe privilege of giving decent burial to the other, why in that case\nthe arm is yours; only let the whale have another chance at you\nshortly, that's all.\"\n\n\"No, thank ye, Bunger,\" said the English Captain, \"he's welcome to the\narm he has, since I can't help it, and didn't know him then; but not\nto another one. No more White Whales for me; I've lowered for him\nonce, and that has satisfied me. There would be great glory in killing\nhim, I know that; and there is a ship-load of precious sperm in him,\nbut, hark ye, he's best let alone; don't you think so, Captain?\" \nglancing at the ivory leg.\n\n\"He is. But he will still be hunted, for all that. What is best let\nalone, that accursed thing is not always what least allures. He's all\na magnet! How long since thou saw'st him last? Which way heading?\"\n\n\"Bless my soul, and curse the foul fiend's,\" cried Bunger, stoopingly\nwalking round Ahab, and like a dog, strangely snuffing; \"this man's\nblood  bring the thermometer!  it's at the boiling point! \nhis pulse makes these planks beat!  sir!\"  taking a lancet from\nhis pocket, and drawing near to Ahab's arm.\n\n\"Avast!\" roared Ahab, dashing him against the bulwarks  \"Man the\nboat! Which way heading?\"\n\n\"Good God!\" cried the English Captain, to whom the question was\nput. \"What's the matter? He was heading east, I think.  Is your\nCaptain crazy?\" whispering Fedallah.\n\nBut Fedallah, putting a finger on his lip, slid over the bulwarks to\ntake the boat's steering oar, and Ahab, swinging the cutting-tackle\ntowards him, commanded the ship's sailors to stand by to lower.\n\nIn a moment he was standing in the boat's stern, and the Manilla men\nwere springing to their oars. In vain the English Captain hailed\nhim. With back to the stranger ship, and face set like a flint to his\nown, Ahab stood upright till alongside of the Pequod.\n\nCHAPTER 101 The Decanter.\n\nEre the English ship fades from sight, be it set down here, that she\nhailed from London, and was named after the late Samuel Enderby,\nmerchant of that city, the original of the famous whaling house of\nEnderby & Sons; a house which in my poor whaleman's opinion, comes not\nfar behind the united royal houses of the Tudors and Bourbons, in\npoint of real historical interest. How long, prior to the year of our\nLord 1775, this great whaling house was in existence, my numerous\nfish-documents do not make plain; but in that year (1775) it fitted\nout the first English ships that ever regularly hunted the Sperm\nWhale; though for some score of years previous (ever since 1726) our\nvaliant Coffins and Maceys of Nantucket and the Vineyard had in large\nfleets pursued that Leviathan, but only in the North and South\nAtlantic: not elsewhere. Be it distinctly recorded here, that the\nNantucketers were the first among mankind to harpoon with civilized\nsteel the great Sperm Whale; and that for half a century they were the\nonly people of the whole globe who so harpooned him.\n\nIn 1778, a fine ship, the Amelia, fitted out for the express purpose,\nand at the sole charge of the vigorous Enderbys, boldly rounded Cape\nHorn, and was the first among the nations to lower a whale-boat of any\nsort in the great South Sea. The voyage was a skilful and lucky one;\nand returning to her berth with her hold full of the precious sperm,\nthe Amelia's example was soon followed by other ships, English and\nAmerican, and thus the vast Sperm Whale grounds of the Pacific were\nthrown open. But not content with this good deed, the indefatigable\nhouse again bestirred itself: Samuel and all his Sons  how many,\ntheir mother only knows  and under their immediate auspices, and\npartly, I think, at their expense, the British government was induced\nto send the sloop-of-war Rattler on a whaling voyage of discovery into\nthe South Sea. Commanded by a naval Post-Captain, the Rattler made a\nrattling voyage of it, and did some service; how much does not\nappear. But this is not all. In 1819, the same house fitted out a\ndiscovery whale ship of their own, to go on a tasting cruise to the\nremote waters of Japan. That ship  well called the \"Syren\"  made\na noble experimental cruise; and it was thus that the great Japanese\nWhaling Ground first became generally known. The Syren in this famous\nvoyage was commanded by a Captain Coffin, a Nantucketer.\n\nAll honour to the Enderbies, therefore, whose house, I think, exists\nto the present day; though doubtless the original Samuel must long ago\nhave slipped his cable for the great South Sea of the other world.\n\nThe ship named after him was worthy of the honour, being a very fast\nsailer and a noble craft every way. I boarded her once at midnight\nsomewhere off the Patagonian coast, and drank good flip down in the\nforecastle. It was a fine gam we had, and they were all trumps \nevery soul on board. A short life to them, and a jolly death. And that\nfine gam I had  long, very long after old Ahab touched her planks\nwith his ivory heel  it minds me of the noble, solid, Saxon\nhospitality of that ship; and may my parson forget me, and the devil\nremember me, if I ever lose sight of it. Flip? Did I say we had flip?\nYes, and we flipped it at the rate of ten gallons the hour; and when\nthe squall came (for it's squally off there by Patagonia), and all\nhands  visitors and all  were called to reef topsails, we were\nso top-heavy that we had to swing each other aloft in bowlines; and we\nignorantly furled the skirts of our jackets into the sails, so that we\nhung there, reefed fast in the howling gale, a warning example to all\ndrunken tars. However, the masts did not go overboard; and by and by\nwe scrambled down, so sober, that we had to pass the flip again,\nthough the savage salt spray bursting down the forecastle scuttle,\nrather too much diluted and pickled it to my taste.\n\nThe beef was fine  tough, but with body in it. They said it was\nbull-beef; others, that it was dromedary beef; but I do not know, for\ncertain, how that was. They had dumplings too; small, but substantial,\nsymmetrically globular, and indestructible dumplings. I fancied that\nyou could feel them, and roll them about in you after they were\nswallowed. If you stooped over too far forward, you risked their\npitching out of you like billiard-balls. The bread  but that\ncouldn't be helped; besides, it was an anti-scorbutic; in short, the\nbread contained the only fresh fare they had. But the forecastle was\nnot very light, and it was very easy to step over into a dark corner\nwhen you ate it. But all in all, taking her from truck to helm,\nconsidering the dimensions of the cook's boilers, including his own\nlive parchment boilers; fore and aft, I say, the Samuel Enderby was a\njolly ship; of good fare and plenty; fine flip and strong; crack\nfellows all, and capital from boot heels to hat-band.\n\nBut why was it, think ye, that the Samuel Enderby, and some other\nEnglish whalers I know of  not all though  were such famous,\nhospitable ships; that passed round the beef, and the bread, and the\ncan, and the joke; and were not soon weary of eating, and drinking,\nand laughing? I will tell you. The abounding good cheer of these\nEnglish whalers is matter for historical research. Nor have I been at\nall sparing of historical whale research, when it has seemed needed.\n\nThe English were preceded in the whale fishery by the Hollanders,\nZealanders, and Danes; from whom they derived many terms still extant\nin the fishery; and what is yet more, their fat old fashions, touching\nplenty to eat and drink. For, as a general thing, the English\nmerchant-ship scrimps her crew; but not so the English whaler. Hence,\nin the English, this thing of whaling good cheer is not normal and\nnatural, but incidental and particular; and, therefore, must have some\nspecial origin, which is here pointed out, and will be still further\nelucidated.\n\nDuring my researches in the Leviathanic histories, I stumbled upon an\nancient Dutch volume, which, by the musty whaling smell of it, I knew\nmust be about whalers. The title was, \"Dan Coopman,\" wherefore I\nconcluded that this must be the invaluable memoirs of some Amsterdam\ncooper in the fishery, as every whale ship must carry its cooper. I\nwas reinforced in this opinion by seeing that it was the production of\none \"Fitz Swackhammer.\" But my friend Dr. Snodhead, a very learned\nman, professor of Low Dutch and High German in the college of Santa\nClaus and St. Pott's, to whom I handed the work for translation,\ngiving him a box of sperm candles for his trouble  this same\nDr. Snodhead, so soon as he spied the book, assured me that \"Dan\nCoopman\" did not mean \"The Cooper,\" but \"The Merchant.\" In short, this\nancient and learned Low Dutch book treated of the commerce of Holland;\nand, among other subjects, contained a very interesting account of its\nwhale fishery. And in this chapter it was, headed, \"Smeer,\" or \"Fat,\"\nthat I found a long detailed list of the outfits for the larders and\ncellars of 180 sail of Dutch whalemen; from which list, as translated\nby Dr. Snodhead, I transcribe the following:\n\n400,000 lbs. of beef.  60,000 lbs. Friesland pork.  150,000 lbs. of\nstock fish.  550,000 lbs. of biscuit.  72,000 lbs. of soft bread.\n2,800 firkins of butter.  20,000 lbs. Texel & Leyden cheese.  144,000\nlbs. cheese (probably an inferior article).  550 ankers of Geneva.\n10,800 barrels of beer.\n\nMost statistical tables are parchingly dry in the reading; not so in\nthe present case, however, where the reader is flooded with whole\npipes, barrels, quarts, and gills of good gin and good cheer.\n\nAt the time, I devoted three days to the studious digesting of all\nthis beer, beef, and bread, during which many profound thoughts were\nincidentally suggested to me, capable of a transcendental and Platonic\napplication; and, furthermore, I compiled supplementary tables of my\nown, touching the probable quantity of stock-fish, etc., consumed by\nevery Low Dutch harpooneer in that ancient Greenland and Spitzbergen\nwhale fishery. In the first place, the amount of butter, and Texel and\nLeyden cheese consumed, seems amazing. I impute it, though, to their\nnaturally unctuous natures, being rendered still more unctuous by the\nnature of their vocation, and especially by their pursuing their game\nin those frigid Polar Seas, on the very coasts of that Esquimaux\ncountry where the convivial natives pledge each other in bumpers of\ntrain oil.\n\nThe quantity of beer, too, is very large, 10,800 barrels. Now, as\nthose polar fisheries could only be prosecuted in the short summer of\nthat climate, so that the whole cruise of one of these Dutch whalemen,\nincluding the short voyage to and from the Spitzbergen sea, did not\nmuch exceed three months, say, and reckoning 30 men to each of their\nfleet of 180 sail, we have 5,400 Low Dutch seamen in all; therefore, I\nsay, we have precisely two barrels of beer per man, for a twelve\nweeks' allowance, exclusive of his fair proportion of that 550 ankers\nof gin. Now, whether these gin and beer harpooneers, so fuddled as one\nmight fancy them to have been, were the right sort of men to stand up\nin a boat's head, and take good aim at flying whales; this would seem\nsomewhat improbable. Yet they did aim at them, and hit them too. But\nthis was very far North, be it remembered, where beer agrees well with\nthe constitution; upon the Equator, in our southern fishery, beer\nwould be apt to make the harpooneer sleepy at the mast-head and boozy\nin his boat; and grievous loss might ensue to Nantucket and New\nBedford.\n\nBut no more; enough has been said to show that the old Dutch whalers\nof two or three centuries ago were high livers; and that the English\nwhalers have not neglected so excellent an example. For, say they,\nwhen cruising in an empty ship, if you can get nothing better out of\nthe world, get a good dinner out of it, at least. And this empties the\ndecanter.\n\nCHAPTER 102 A Bower in the Arsacides.\n\nHitherto, in descriptively treating of the Sperm Whale, I have chiefly\ndwelt upon the marvels of his outer aspect; or separately and in\ndetail upon some few interior structural features. But to a large and\nthorough sweeping comprehension of him, it behooves me now to unbutton\nhim still further, and untagging the points of his hose, unbuckling\nhis garters, and casting loose the hooks and the eyes of the joints of\nhis innermost bones, set him before you in his ultimatum; that is to\nsay, in his unconditional skeleton.\n\nBut how now, Ishmael? How is it, that you, a mere oarsman in the\nfishery, pretend to know aught about the subterranean parts of the\nwhale? Did erudite Stubb, mounted upon your capstan, deliver lectures\non the anatomy of the Cetacea; and by help of the windlass, hold up a\nspecimen rib for exhibition? Explain thyself, Ishmael. Can you land a\nfull-grown whale on your deck for examination, as a cook dishes a\nroast-pig? Surely not. A veritable witness have you hitherto been,\nIshmael; but have a care how you seize the privilege of Jonah alone;\nthe privilege of discoursing upon the joists and beams; the rafters,\nridge-pole, sleepers, and under-pinnings, making up the frame-work of\nleviathan; and belike of the tallow-vats, dairy-rooms, butteries, and\ncheeseries in his bowels.\n\nI confess, that since Jonah, few whalemen have penetrated very far\nbeneath the skin of the adult whale; nevertheless, I have been blessed\nwith an opportunity to dissect him in miniature. In a ship I belonged\nto, a small cub Sperm Whale was once bodily hoisted to the deck for\nhis poke or bag, to make sheaths for the barbs of the harpoons, and\nfor the heads of the lances. Think you I let that chance go, without\nusing my boat-hatchet and jack-knife, and breaking the seal and\nreading all the contents of that young cub?\n\nAnd as for my exact knowledge of the bones of the leviathan in their\ngigantic, full grown development, for that rare knowledge I am\nindebted to my late royal friend Tranquo, king of Tranque, one of the\nArsacides. For being at Tranque, years ago, when attached to the\ntrading-ship Dey of Algiers, I was invited to spend part of the\nArsacidean holidays with the lord of Tranque, at his retired palm\nvilla at Pupella; a sea-side glen not very far distant from what our\nsailors called Bamboo-Town, his capital.\n\nAmong many other fine qualities, my royal friend Tranquo, being gifted\nwith a devout love for all matters of barbaric vertu, had brought\ntogether in Pupella whatever rare things the more ingenious of his\npeople could invent; chiefly carved woods of wonderful devices,\nchiselled shells, inlaid spears, costly paddles, aromatic canoes; and\nall these distributed among whatever natural wonders, the\nwonder-freighted, tribute-rendering waves had cast upon his shores.\n\nChief among these latter was a great Sperm Whale, which, after an\nunusually long raging gale, had been found dead and stranded, with his\nhead against a cocoa-nut tree, whose plumage-like, tufted droopings\nseemed his verdant jet. When the vast body had at last been stripped\nof its fathom-deep enfoldings, and the bones become dust dry in the\nsun, then the skeleton was carefully transported up the Pupella glen,\nwhere a grand temple of lordly palms now sheltered it.\n\nThe ribs were hung with trophies; the vertebrae were carved with\nArsacidean annals, in strange hieroglyphics; in the skull, the priests\nkept up an unextinguished aromatic flame, so that the mystic head\nagain sent forth its vapoury spout; while, suspended from a bough, the\nterrific lower jaw vibrated over all the devotees, like the hair-hung\nsword that so affrighted Damocles.\n\nIt was a wondrous sight. The wood was green as mosses of the Icy Glen;\nthe trees stood high and haughty, feeling their living sap; the\nindustrious earth beneath was as a weaver's loom, with a gorgeous\ncarpet on it, whereof the ground-vine tendrils formed the warp and\nwoof, and the living flowers the figures. All the trees, with all\ntheir laden branches; all the shrubs, and ferns, and grasses; the\nmessage-carrying air; all these unceasingly were active. Through the\nlacings of the leaves, the great sun seemed a flying shuttle weaving\nthe unwearied verdure. Oh, busy weaver! unseen weaver!  pause! \none word!  whither flows the fabric? what palace may it deck?\nwherefore all these ceaseless toilings? Speak, weaver!  stay thy\nhand!  but one single word with thee! Nay  the shuttle flies \nthe figures float from forth the loom; the freshet-rushing carpet for\never slides away. The weaver-god, he weaves; and by that weaving is he\ndeafened, that he hears no mortal voice; and by that humming, we, too,\nwho look on the loom are deafened; and only when we escape it shall we\nhear the thousand voices that speak through it. For even so it is in\nall material factories. The spoken words that are inaudible among the\nflying spindles; those same words are plainly heard without the walls,\nbursting from the opened casements. Thereby have villainies been\ndetected. Ah, mortal! then, be heedful; for so, in all this din of the\ngreat world's loom, thy subtlest thinkings may be overheard afar.\n\nNow, amid the green, life-restless loom of that Arsacidean wood, the\ngreat, white, worshipped skeleton lay lounging  a gigantic idler!\nYet, as the ever-woven verdant warp and woof intermixed and hummed\naround him, the mighty idler seemed the cunning weaver; himself all\nwoven over with the vines; every month assuming greener, fresher\nverdure; but himself a skeleton. Life folded Death; Death trellised\nLife; the grim god wived with youthful Life, and begat him\ncurly-headed glories.\n\nNow, when with royal Tranquo I visited this wondrous whale, and saw\nthe skull an altar, and the artificial smoke ascending from where the\nreal jet had issued, I marvelled that the king should regard a chapel\nas an object of vertu. He laughed. But more I marvelled that the\npriests should swear that smoky jet of his was genuine. To and fro I\npaced before this skeleton  brushed the vines aside  broke\nthrough the ribs  and with a ball of Arsacidean twine, wandered,\neddied long amid its many winding, shaded colonnades and arbours. But\nsoon my line was out; and following it back, I emerged from the\nopening where I entered. I saw no living thing within; naught was\nthere but bones.\n\nCutting me a green measuring-rod, I once more dived within the\nskeleton. From their arrow-slit in the skull, the priests perceived me\ntaking the altitude of the final rib, \"How now!\" they shouted; \"Dar'st\nthou measure this our god! That's for us.\" \"Aye, priests  well, how\nlong do ye make him, then?\" But hereupon a fierce contest rose among\nthem, concerning feet and inches; they cracked each other's sconces\nwith their yard-sticks  the great skull echoed  and seizing that\nlucky chance, I quickly concluded my own admeasurements.\n\nThese admeasurements I now propose to set before you. But first, be it\nrecorded, that, in this matter, I am not free to utter any fancied\nmeasurement I please. Because there are skeleton authorities you can\nrefer to, to test my accuracy. There is a Leviathanic Museum, they\ntell me, in Hull, England, one of the whaling ports of that country,\nwhere they have some fine specimens of fin-backs and other\nwhales. Likewise, I have heard that in the museum of Manchester, in\nNew Hampshire, they have what the proprietors call \"the only perfect\nspecimen of a Greenland or River Whale in the United States.\"\nMoreover, at a place in Yorkshire, England, Burton Constable by name,\na certain Sir Clifford Constable has in his possession the skeleton of\na Sperm Whale, but of moderate size, by no means of the full-grown\nmagnitude of my friend King Tranquo's.\n\nIn both cases, the stranded whales to which these two skeletons\nbelonged, were originally claimed by their proprietors upon similar\ngrounds. King Tranquo seizing his because he wanted it; and Sir\nClifford, because he was lord of the seignories of those parts. Sir\nClifford's whale has been articulated throughout; so that, like a\ngreat chest of drawers, you can open and shut him, in all his bony\ncavities  spread out his ribs like a gigantic fan  and swing all\nday upon his lower jaw. Locks are to be put upon some of his\ntrap-doors and shutters; and a footman will show round future visitors\nwith a bunch of keys at his side. Sir Clifford thinks of charging\ntwopence for a peep at the whispering gallery in the spinal column;\nthreepence to hear the echo in the hollow of his cerebellum; and\nsixpence for the unrivalled view from his forehead.\n\nThe skeleton dimensions I shall now proceed to set down are copied\nverbatim from my right arm, where I had them tattooed; as in my wild\nwanderings at that period, there was no other secure way of preserving\nsuch valuable statistics. But as I was crowded for space, and wished\nthe other parts of my body to remain a blank page for a poem I was\nthen composing  at least, what untattooed parts might remain  I\ndid not trouble myself with the odd inches; nor, indeed, should inches\nat all enter into a congenial admeasurement of the whale.\n\nCHAPTER 103 Measurement of The Whale's Skeleton.\n\nIn the first place, I wish to lay before you a particular, plain\nstatement, touching the living bulk of this leviathan, whose skeleton\nwe are briefly to exhibit. Such a statement may prove useful here.\n\nAccording to a careful calculation I have made, and which I partly\nbase upon Captain Scoresby's estimate, of seventy tons for the largest\nsized Greenland whale of sixty feet in length; according to my careful\ncalculation, I say, a Sperm Whale of the largest magnitude, between\neighty-five and ninety feet in length, and something less than forty\nfeet in its fullest circumference, such a whale will weigh at least\nninety tons; so that, reckoning thirteen men to a ton, he would\nconsiderably outweigh the combined population of a whole village of\none thousand one hundred inhabitants.\n\nThink you not then that brains, like yoked cattle, should be put to\nthis leviathan, to make him at all budge to any landsman's\nimagination?\n\nHaving already in various ways put before you his skull, spout-hole,\njaw, teeth, tail, forehead, fins, and divers other parts, I shall now\nsimply point out what is most interesting in the general bulk of his\nunobstructed bones. But as the colossal skull embraces so very large a\nproportion of the entire extent of the skeleton; as it is by far the\nmost complicated part; and as nothing is to be repeated concerning it\nin this chapter, you must not fail to carry it in your mind, or under\nyour arm, as we proceed, otherwise you will not gain a complete notion\nof the general structure we are about to view.\n\nIn length, the Sperm Whale's skeleton at Tranque measured seventy-two\nFeet; so that when fully invested and extended in life, he must have\nbeen ninety feet long; for in the whale, the skeleton loses about one\nfifth in length compared with the living body. Of this seventy-two\nfeet, his skull and jaw comprised some twenty feet, leaving some fifty\nfeet of plain back-bone. Attached to this back-bone, for something\nless than a third of its length, was the mighty circular basket of\nribs which once enclosed his vitals.\n\nTo me this vast ivory-ribbed chest, with the long, unrelieved spine,\nextending far away from it in a straight line, not a little resembled\nthe hull of a great ship new-laid upon the stocks, when only some\ntwenty of her naked bow-ribs are inserted, and the keel is otherwise,\nfor the time, but a long, disconnected timber.\n\nThe ribs were ten on a side. The first, to begin from the neck, was\nnearly six feet long; the second, third, and fourth were each\nsuccessively longer, till you came to the climax of the fifth, or one\nof the middle ribs, which measured eight feet and some inches. From\nthat part, the remaining ribs diminished, till the tenth and last only\nspanned five feet and some inches. In general thickness, they all bore\na seemly correspondence to their length. The middle ribs were the most\narched. In some of the Arsacides they are used for beams whereon to\nlay footpath bridges over small streams.\n\nIn considering these ribs, I could not but be struck anew with the\ncircumstance, so variously repeated in this book, that the skeleton of\nthe whale is by no means the mould of his invested form. The largest\nof the Tranque ribs, one of the middle ones, occupied that part of the\nfish which, in life, is greatest in depth. Now, the greatest depth of\nthe invested body of this particular whale must have been at least\nsixteen feet; whereas, the corresponding rib measured but little more\nthan eight feet. So that this rib only conveyed half of the true\nnotion of the living magnitude of that part. Besides, for some way,\nwhere I now saw but a naked spine, all that had been once wrapped\nround with tons of added bulk in flesh, muscle, blood, and\nbowels. Still more, for the ample fins, I here saw but a few\ndisordered joints; and in place of the weighty and majestic, but\nboneless flukes, an utter blank!\n\nHow vain and foolish, then, thought I, for timid untravelled man to\ntry to comprehend aright this wondrous whale, by merely poring over\nhis dead attenuated skeleton, stretched in this peaceful\nwood. No. Only in the heart of quickest perils; only when within the\neddyings of his angry flukes; only on the profound unbounded sea, can\nthe fully invested whale be truly and livingly found out.\n\nBut the spine. For that, the best way we can consider it is, with a\ncrane, to pile its bones high up on end. No speedy enterprise. But now\nit's done, it looks much like Pompey's Pillar.\n\nThere are forty and odd vertebrae in all, which in the skeleton are\nnot locked together. They mostly lie like the great knobbed blocks on\na Gothic spire, forming solid courses of heavy masonry. The largest, a\nmiddle one, is in width something less than three feet, and in depth\nmore than four. The smallest, where the spine tapers away into the\ntail, is only two inches in width, and looks something like a white\nbilliard-ball. I was told that there were still smaller ones, but they\nhad been lost by some little cannibal urchins, the priest's children,\nwho had stolen them to play marbles with. Thus we see how that the\nspine of even the hugest of living things tapers off at last into\nsimple child's play.\n\nCHAPTER 104 The Fossil Whale.\n\nFrom his mighty bulk the whale affords a most congenial theme whereon\nto enlarge, amplify, and generally expatiate. Would you, you could not\ncompress him. By good rights he should only be treated of in imperial\nfolio. Not to tell over again his furlongs from spiracle to tail, and\nthe yards he measures about the waist; only think of the gigantic\ninvolutions of his intestines, where they lie in him like great cables\nand hawsers coiled away in the subterranean orlop-deck of a\nline-of-battle-ship.\n\nSince I have undertaken to manhandle this Leviathan, it behooves me to\napprove myself omnisciently exhaustive in the enterprise; not\noverlooking the minutest seminal germs of his blood, and spinning him\nout to the uttermost coil of his bowels. Having already described him\nin most of his present habitatory and anatomical peculiarities, it now\nremains to magnify him in an archaeological, fossiliferous, and\nantediluvian point of view. Applied to any other creature than the\nLeviathan  to an ant or a flea  such portly terms might justly\nbe deemed unwarrantably grandiloquent. But when Leviathan is the text,\nthe case is altered. Fain am I to stagger to this emprise under the\nweightiest words of the dictionary. And here be it said, that whenever\nit has been convenient to consult one in the course of these\ndissertations, I have invariably used a huge quarto edition of\nJohnson, expressly purchased for that purpose; because that famous\nlexicographer's uncommon personal bulk more fitted him to compile a\nlexicon to be used by a whale author like me.\n\nOne often hears of writers that rise and swell with their subject,\nthough it may seem but an ordinary one. How, then, with me, writing of\nthis Leviathan? Unconsciously my chirography expands into placard\ncapitals. Give me a condor's quill! Give me Vesuvius' crater for an\ninkstand! Friends, hold my arms! For in the mere act of penning my\nthoughts of this Leviathan, they weary me, and make me faint with\ntheir outreaching comprehensiveness of sweep, as if to include the\nwhole circle of the sciences, and all the generations of whales, and\nmen, and mastodons, past, present, and to come, with all the revolving\npanoramas of empire on earth, and throughout the whole universe, not\nexcluding its suburbs. Such, and so magnifying, is the virtue of a\nlarge and liberal theme! We expand to its bulk. To produce a mighty\nbook, you must choose a mighty theme. No great and enduring volume can\never be written on the flea, though many there be who have tried it.\n\nEre entering upon the subject of Fossil Whales, I present my\ncredentials as a geologist, by stating that in my miscellaneous time I\nhave been a stone-mason, and also a great digger of ditches, canals\nand wells, wine-vaults, cellars, and cisterns of all sorts. Likewise,\nby way of preliminary, I desire to remind the reader, that while in\nthe earlier geological strata there are found the fossils of monsters\nnow almost completely extinct; the subsequent relics discovered in\nwhat are called the Tertiary formations seem the connecting, or at any\nrate intercepted links, between the antichronical creatures, and those\nwhose remote posterity are said to have entered the Ark; all the\nFossil Whales hitherto discovered belong to the Tertiary period, which\nis the last preceding the superficial formations. And though none of\nthem precisely answer to any known species of the present time, they\nare yet sufficiently akin to them in general respects, to justify\ntheir taking rank as Cetacean fossils.\n\nDetached broken fossils of pre-adamite whales, fragments of their\nbones and skeletons, have within thirty years past, at various\nintervals, been found at the base of the Alps, in Lombardy, in France,\nin England, in Scotland, and in the States of Louisiana, Mississippi,\nand Alabama. Among the more curious of such remains is part of a\nskull, which in the year 1779 was disinterred in the Rue Dauphine in\nParis, a short street opening almost directly upon the palace of the\nTuileries; and bones disinterred in excavating the great docks of\nAntwerp, in Napoleon's time. Cuvier pronounced these fragments to have\nbelonged to some utterly unknown Leviathanic species.\n\nBut by far the most wonderful of all Cetacean relics was the almost\ncomplete vast skeleton of an extinct monster, found in the year 1842,\non the plantation of Judge Creagh, in Alabama. The awe-stricken\ncredulous slaves in the vicinity took it for the bones of one of the\nfallen angels. The Alabama doctors declared it a huge reptile, and\nbestowed upon it the name of Basilosaurus. But some specimen bones of\nit being taken across the sea to Owen, the English Anatomist, it\nturned out that this alleged reptile was a whale, though of a departed\nspecies. A significant illustration of the fact, again and again\nrepeated in this book, that the skeleton of the whale furnishes but\nlittle clue to the shape of his fully invested body. So Owen\nrechristened the monster Zeuglodon; and in his paper read before the\nLondon Geological Society, pronounced it, in substance, one of the\nmost extraordinary creatures which the mutations of the globe have\nblotted out of existence.\n\nWhen I stand among these mighty Leviathan skeletons, skulls, tusks,\njaws, ribs, and vertebrae, all characterized by partial resemblances\nto the existing breeds of sea-monsters; but at the same time bearing\non the other hand similar affinities to the annihilated antichronical\nLeviathans, their incalculable seniors; I am, by a flood, borne back\nto that wondrous period, ere time itself can be said to have begun;\nfor time began with man. Here Saturn's grey chaos rolls over me, and I\nobtain dim, shuddering glimpses into those Polar eternities; when\nwedged bastions of ice pressed hard upon what are now the Tropics; and\nin all the 25,000 miles of this world's circumference, not an\ninhabitable hand's breadth of land was visible. Then the whole world\nwas the whale's; and, king of creation, he left his wake along the\npresent lines of the Andes and the Himmalehs. Who can show a pedigree\nlike Leviathan? Ahab's harpoon had shed older blood than the\nPharaoh's. Methuselah seems a school-boy. I look round to shake hands\nwith Shem. I am horror-struck at this antemosaic, unsourced existence\nof the unspeakable terrors of the whale, which, having been before all\ntime, must needs exist after all humane ages are over.\n\nBut not alone has this Leviathan left his pre-adamite traces in the\nstereotype plates of nature, and in limestone and marl bequeathed his\nancient bust; but upon Egyptian tablets, whose antiquity seems to\nclaim for them an almost fossiliferous character, we find the\nunmistakable print of his fin. In an apartment of the great temple of\nDenderah, some fifty years ago, there was discovered upon the granite\nceiling a sculptured and painted planisphere, abounding in centaurs,\ngriffins, and dolphins, similar to the grotesque figures on the\ncelestial globe of the moderns. Gliding among them, old Leviathan swam\nas of yore; was there swimming in that planisphere, centuries before\nSolomon was cradled.\n\nNor must there be omitted another strange attestation of the antiquity\nof the whale, in his own osseous post-diluvian reality, as set down by\nthe venerable John Leo, the old Barbary traveller.\n\n\"Not far from the Sea-side, they have a Temple, the Rafters and Beams\nof which are made of Whale-Bones; for Whales of a monstrous size are\noftentimes cast up dead upon that shore. The Common People imagine,\nthat by a secret Power bestowed by God upon the temple, no Whale can\npass it without immediate death. But the truth of the Matter is, that\non either side of the Temple, there are Rocks that shoot two Miles\ninto the Sea, and wound the Whales when they light upon 'em. They keep\na Whale's Rib of an incredible length for a Miracle, which lying upon\nthe Ground with its convex part uppermost, makes an Arch, the Head of\nwhich cannot be reached by a Man upon a Camel's Back. This Rib (says\nJohn Leo) is said to have layn there a hundred Years before I saw\nit. Their Historians affirm, that a Prophet who prophesy'd of Mahomet,\ncame from this Temple, and some do not stand to assert, that the\nProphet Jonas was cast forth by the Whale at the Base of the Temple.\"\n\nIn this Afric Temple of the Whale I leave you, reader, and if you be a\nNantucketer, and a whaleman, you will silently worship there.\n\nCHAPTER 105 Does the Whale's Magnitude Diminish?  Will He Perish?\n\nInasmuch, then, as this Leviathan comes floundering down upon us from\nthe head-waters of the Eternities, it may be fitly inquired, whether,\nin the long course of his generations, he has not degenerated from the\noriginal bulk of his sires.\n\nBut upon investigation we find, that not only are the whales of the\npresent day superior in magnitude to those whose fossil remains are\nfound in the Tertiary system (embracing a distinct geological period\nprior to man), but of the whales found in that Tertiary system, those\nbelonging to its latter formations exceed in size those of its earlier\nones.\n\nOf all the pre-adamite whales yet exhumed, by far the largest is the\nAlabama one mentioned in the last chapter, and that was less than\nseventy feet in length in the skeleton. Whereas, we have already seen,\nthat the tape-measure gives seventy-two feet for the skeleton of a\nlarge sized modern whale. And I have heard, on whalemen's authority,\nthat Sperm Whales have been captured near a hundred feet long at the\ntime of capture.\n\nBut may it not be, that while the whales of the present hour are an\nadvance in magnitude upon those of all previous geological periods;\nmay it not be, that since Adam's time they have degenerated?\n\nAssuredly, we must conclude so, if we are to credit the accounts of\nsuch gentlemen as Pliny, and the ancient naturalists generally. For\nPliny tells us of Whales that embraced acres of living bulk, and\nAldrovandus of others which measured eight hundred feet in length \nRope Walks and Thames Tunnels of Whales! And even in the days of Banks\nand Solander, Cooke's naturalists, we find a Danish member of the\nAcademy of Sciences setting down certain Iceland Whales\n(reydan-siskur, or Wrinkled Bellies) at one hundred and twenty yards;\nthat is, three hundred and sixty feet. And Lacepede, the French\nnaturalist, in his elaborate history of whales, in the very beginning\nof his work (page 3), sets down the Right Whale at one hundred metres,\nthree hundred and twenty-eight feet. And this work was published so\nlate as A.D. 1825.\n\nBut will any whaleman believe these stories? No. The whale of to-day\nis as big as his ancestors in Pliny's time. And if ever I go where\nPliny is, I, a whaleman (more than he was), will make bold to tell him\nso. Because I cannot understand how it is, that while the Egyptian\nmummies that were buried thousands of years before even Pliny was\nborn, do not measure so much in their coffins as a modern Kentuckian\nin his socks; and while the cattle and other animals sculptured on the\noldest Egyptian and Nineveh tablets, by the relative proportions in\nwhich they are drawn, just as plainly prove that the high-bred,\nstall-fed, prize cattle of Smithfield, not only equal, but far exceed\nin magnitude the fattest of Pharaoh's fat kine; in the face of all\nthis, I will not admit that of all animals the whale alone should have\ndegenerated.\n\nBut still another inquiry remains; one often agitated by the more\nrecondite Nantucketers. Whether owing to the almost omniscient\nlook-outs at the mast-heads of the whaleships, now penetrating even\nthrough Behring's straits, and into the remotest secret drawers and\nlockers of the world; and the thousand harpoons and lances darted\nalong all continental coasts; the moot point is, whether Leviathan can\nlong endure so wide a chase, and so remorseless a havoc; whether he\nmust not at last be exterminated from the waters, and the last whale,\nlike the last man, smoke his last pipe, and then himself evaporate in\nthe final puff.\n\nComparing the humped herds of whales with the humped herds of buffalo,\nwhich, not forty years ago, overspread by tens of thousands the\nprairies of Illinois and Missouri, and shook their iron manes and\nscowled with their thunder-clotted brows upon the sites of populous\nriver-capitals, where now the polite broker sells you land at a dollar\nan inch; in such a comparison an irresistible argument would seem\nfurnished, to show that the hunted whale cannot now escape speedy\nextinction.\n\nBut you must look at this matter in every light. Though so short a\nperiod ago  not a good lifetime  the census of the buffalo in\nIllinois exceeded the census of men now in London, and though at the\npresent day not one horn or hoof of them remains in all that region;\nand though the cause of this wondrous extermination was the spear of\nman; yet the far different nature of the whale-hunt peremptorily\nforbids so inglorious an end to the Leviathan. Forty men in one ship\nhunting the Sperm Whales for forty-eight months think they have done\nextremely well, and thank God, if at last they carry home the oil of\nforty fish. Whereas, in the days of the old Canadian and Indian\nhunters and trappers of the West, when the far west (in whose sunset\nsuns still rise) was a wilderness and a virgin, the same number of\nmoccasined men, for the same number of months, mounted on horse\ninstead of sailing in ships, would have slain not forty, but forty\nthousand and more buffaloes; a fact that, if need were, could be\nstatistically stated.\n\nNor, considered aright, does it seem any argument in favour of the\ngradual extinction of the Sperm Whale, for example, that in former\nyears (the latter part of the last century, say) these Leviathans, in\nsmall pods, were encountered much oftener than at present, and, in\nconsequence, the voyages were not so prolonged, and were also much\nmore remunerative. Because, as has been elsewhere noticed, those\nwhales, influenced by some views to safety, now swim the seas in\nimmense caravans, so that to a large degree the scattered solitaries,\nyokes, and pods, and schools of other days are now aggregated into\nvast but widely separated, unfrequent armies. That is all. And equally\nfallacious seems the conceit, that because the so-called whale-bone\nwhales no longer haunt many grounds in former years abounding with\nthem, hence that species also is declining. For they are only being\ndriven from promontory to cape; and if one coast is no longer\nenlivened with their jets, then, be sure, some other and remoter\nstrand has been very recently startled by the unfamiliar spectacle.\n\nFurthermore: concerning these last mentioned Leviathans, they have two\nfirm fortresses, which, in all human probability, will for ever remain\nimpregnable. And as upon the invasion of their valleys, the frosty\nSwiss have retreated to their mountains; so, hunted from the savannas\nand glades of the middle seas, the whale-bone whales can at last\nresort to their Polar citadels, and diving under the ultimate glassy\nbarriers and walls there, come up among icy fields and floes; and in a\ncharmed circle of everlasting December, bid defiance to all pursuit\nfrom man.\n\nBut as perhaps fifty of these whale-bone whales are harpooned for one\ncachalot, some philosophers of the forecastle have concluded that this\npositive havoc has already very seriously diminished their\nbattalions. But though for some time past a number of these whales,\nnot less than 13,000, have been annually slain on the nor'-west coast\nby the Americans alone; yet there are considerations which render even\nthis circumstance of little or no account as an opposing argument in\nthis matter.\n\nNatural as it is to be somewhat incredulous concerning the\npopulousness of the more enormous creatures of the globe, yet what\nshall we say to Harto, the historian of Goa, when he tells us that at\none hunting the King of Siam took 4,000 elephants; that in those\nregions elephants are numerous as droves of cattle in the temperate\nclimes. And there seems no reason to doubt that if these elephants,\nwhich have now been hunted for thousands of years, by Semiramis, by\nPorus, by Hannibal, and by all the successive monarchs of the East \nif they still survive there in great numbers, much more may the great\nwhale outlast all hunting, since he has a pasture to expatiate in,\nwhich is precisely twice as large as all Asia, both Americas, Europe\nand Africa, New Holland, and all the Isles of the sea combined.\n\nMoreover: we are to consider, that from the presumed great longevity\nof whales, their probably attaining the age of a century and more,\ntherefore at any one period of time, several distinct adult\ngenerations must be contemporary. And what that is, we may soon gain\nsome idea of, by imagining all the grave-yards, cemeteries, and family\nvaults of creation yielding up the live bodies of all the men, women,\nand children who were alive seventy-five years ago; and adding this\ncountless host to the present human population of the globe.\n\nWherefore, for all these things, we account the whale immortal in his\nspecies, however perishable in his individuality. He swam the seas\nbefore the continents broke water; he once swam over the site of the\nTuileries, and Windsor Castle, and the Kremlin. In Noah's flood he\ndespised Noah's Ark; and if ever the world is to be again flooded,\nlike the Netherlands, to kill off its rats, then the eternal whale\nwill still survive, and rearing upon the topmost crest of the\nequatorial flood, spout his frothed defiance to the skies.\n\nCHAPTER 106 Ahab's Leg.\n\nThe precipitating manner in which Captain Ahab had quitted the Samuel\nEnderby of London, had not been unattended with some small violence to\nhis own person. He had lighted with such energy upon a thwart of his\nboat that his ivory leg had received a half-splintering shock. And\nwhen after gaining his own deck, and his own pivot-hole there, he so\nvehemently wheeled round with an urgent command to the steersman (it\nwas, as ever, something about his not steering inflexibly enough);\nthen, the already shaken ivory received such an additional twist and\nwrench, that though it still remained entire, and to all appearances\nlusty, yet Ahab did not deem it entirely trustworthy.\n\nAnd, indeed, it seemed small matter for wonder, that for all his\npervading, mad recklessness, Ahab did at times give careful heed to\nthe condition of that dead bone upon which he partly stood. For it had\nnot been very long prior to the Pequod's sailing from Nantucket, that\nhe had been found one night lying prone upon the ground, and\ninsensible; by some unknown, and seemingly inexplicable, unimaginable\ncasualty, his ivory limb having been so violently displaced, that it\nhad stake-wise smitten, and all but pierced his groin; nor was it\nwithout extreme difficulty that the agonizing wound was entirely\ncured.\n\nNor, at the time, had it failed to enter his monomaniac mind, that all\nthe anguish of that then present suffering was but the direct issue of\na former woe; and he too plainly seemed to see, that as the most\npoisonous reptile of the marsh perpetuates his kind as inevitably as\nthe sweetest songster of the grove; so, equally with every felicity,\nall miserable events do naturally beget their like. Yea, more than\nequally, thought Ahab; since both the ancestry and posterity of Grief\ngo further than the ancestry and posterity of Joy. For, not to hint of\nthis: that it is an inference from certain canonic teachings, that\nwhile some natural enjoyments here shall have no children born to them\nfor the other world, but, on the contrary, shall be followed by the\njoy-childlessness of all hell's despair; whereas, some guilty mortal\nmiseries shall still fertilely beget to themselves an eternally\nprogressive progeny of griefs beyond the grave; not at all to hint of\nthis, there still seems an inequality in the deeper analysis of the\nthing. For, thought Ahab, while even the highest earthly felicities\never have a certain unsignifying pettiness lurking in them, but, at\nbottom, all heartwoes, a mystic significance, and, in some men, an\narchangelic grandeur; so do their diligent tracings-out not belie the\nobvious deduction. To trail the genealogies of these high mortal\nmiseries, carries us at last among the sourceless primogenitures of\nthe gods; so that, in the face of all the glad, hay-making suns, and\nsoft cymballing, round harvest-moons, we must needs give in to this:\nthat the gods themselves are not for ever glad. The ineffaceable, sad\nbirth-mark in the brow of man, is but the stamp of sorrow in the\nsigners.\n\nUnwittingly here a secret has been divulged, which perhaps might more\nproperly, in set way, have been disclosed before. With many other\nparticulars concerning Ahab, always had it remained a mystery to some,\nwhy it was, that for a certain period, both before and after the\nsailing of the Pequod, he had hidden himself away with such\nGrand-Lama-like exclusiveness; and, for that one interval, sought\nspeechless refuge, as it were, among the marble senate of the\ndead. Captain Peleg's bruited reason for this thing appeared by no\nmeans adequate; though, indeed, as touching all Ahab's deeper part,\nevery revelation partook more of significant darkness than of\nexplanatory light. But, in the end, it all came out; this one matter\ndid, at least. That direful mishap was at the bottom of his temporary\nrecluseness. And not only this, but to that ever-contracting, dropping\ncircle ashore, who, for any reason, possessed the privilege of a less\nbanned approach to him; to that timid circle the above hinted casualty\n remaining, as it did, moodily unaccounted for by Ahab  invested\nitself with terrors, not entirely underived from the land of spirits\nand of wails. So that, through their zeal for him, they had all\nconspired, so far as in them lay, to muffle up the knowledge of this\nthing from others; and hence it was, that not till a considerable\ninterval had elapsed, did it transpire upon the Pequod's decks.\n\nBut be all this as it may; let the unseen, ambiguous synod in the air,\nor the vindictive princes and potentates of fire, have to do or not\nwith earthly Ahab, yet, in this present matter of his leg, he took\nplain practical procedures;  he called the carpenter.\n\nAnd when that functionary appeared before him, he bade him without\ndelay set about making a new leg, and directed the mates to see him\nsupplied with all the studs and joists of jaw-ivory (Sperm Whale)\nwhich had thus far been accumulated on the voyage, in order that a\ncareful selection of the stoutest, clearest-grained stuff might be\nsecured. This done, the carpenter received orders to have the leg\ncompleted that night; and to provide all the fittings for it,\nindependent of those pertaining to the distrusted one in\nuse. Moreover, the ship's forge was ordered to be hoisted out of its\ntemporary idleness in the hold; and, to accelerate the affair, the\nblacksmith was commanded to proceed at once to the forging of whatever\niron contrivances might be needed.\n\nCHAPTER 107 The Carpenter.\n\nSeat thyself sultanically among the moons of Saturn, and take high\nabstracted man alone; and he seems a wonder, a grandeur, and a\nwoe. But from the same point, take mankind in mass, and for the most\npart, they seem a mob of unnecessary duplicates, both contemporary and\nhereditary. But most humble though he was, and far from furnishing an\nexample of the high, humane abstraction; the Pequod's carpenter was no\nduplicate; hence, he now comes in person on this stage.\n\nLike all sea-going ship carpenters, and more especially those\nbelonging to whaling vessels, he was, to a certain off-handed,\npractical extent, alike experienced in numerous trades and callings\ncollateral to his own; the carpenter's pursuit being the ancient and\noutbranching trunk of all those numerous handicrafts which more or\nless have to do with wood as an auxiliary material. But, besides the\napplication to him of the generic remark above, this carpenter of the\nPequod was singularly efficient in those thousand nameless mechanical\nemergencies continually recurring in a large ship, upon a three or\nfour years' voyage, in uncivilized and far-distant seas. For not to\nspeak of his readiness in ordinary duties:  repairing stove boats,\nsprung spars, reforming the shape of clumsy-bladed oars, inserting\nbull's eyes in the deck, or new tree-nails in the side planks, and\nother miscellaneous matters more directly pertaining to his special\nbusiness; he was moreover unhesitatingly expert in all manner of\nconflicting aptitudes, both useful and capricious.\n\nThe one grand stage where he enacted all his various parts so\nmanifold, was his vice-bench; a long rude ponderous table furnished\nwith several vices, of different sizes, and both of iron and of\nwood. At all times except when whales were alongside, this bench was\nsecurely lashed athwartships against the rear of the Try-works.\n\nA belaying pin is found too large to be easily inserted into its hole:\nthe carpenter claps it into one of his ever-ready vices, and\nstraightway files it smaller. A lost land-bird of strange plumage\nstrays on board, and is made a captive: out of clean shaved rods of\nright-whale bone, and cross-beams of sperm whale ivory, the carpenter\nmakes a pagoda-looking cage for it. An oarsman sprains his wrist: the\ncarpenter concocts a soothing lotion. Stubb longed for vermillion\nstars to be painted upon the blade of his every oar; screwing each oar\nin his big vice of wood, the carpenter symmetrically supplies the\nconstellation. A sailor takes a fancy to wear shark-bone ear-rings:\nthe carpenter drills his ears. Another has the toothache: the\ncarpenter out pincers, and clapping one hand upon his bench bids him\nbe seated there; but the poor fellow unmanageably winces under the\nunconcluded operation; whirling round the handle of his wooden vice,\nthe carpenter signs him to clap his jaw in that, if he would have him\ndraw the tooth.\n\nThus, this carpenter was prepared at all points, and alike indifferent\nand without respect in all. Teeth he accounted bits of ivory; heads he\ndeemed but top-blocks; men themselves he lightly held for\ncapstans. But while now upon so wide a field thus variously\naccomplished and with such liveliness of expertness in him, too; all\nthis would seem to argue some uncommon vivacity of intelligence. But\nnot precisely so. For nothing was this man more remarkable, than for a\ncertain impersonal stolidity as it were; impersonal, I say; for it so\nshaded off into the surrounding infinite of things, that it seemed one\nwith the general stolidity discernible in the whole visible world;\nwhich while pauselessly active in uncounted modes, still eternally\nholds its peace, and ignores you, though you dig foundations for\ncathedrals. Yet was this half-horrible stolidity in him, involving,\ntoo, as it appeared, an all-ramifying heartlessness;  yet was it\noddly dashed at times, with an old, crutch-like, antediluvian,\nwheezing humorousness, not unstreaked now and then with a certain\ngrizzled wittiness; such as might have served to pass the time during\nthe midnight watch on the bearded forecastle of Noah's ark. Was it\nthat this old carpenter had been a life-long wanderer, whose much\nrolling, to and fro, not only had gathered no moss; but what is more,\nhad rubbed off whatever small outward clingings might have originally\npertained to him? He was a stript abstract; an unfractioned integral;\nuncompromised as a new-born babe; living without premeditated\nreference to this world or the next. You might almost say, that this\nstrange uncompromisedness in him involved a sort of unintelligence;\nfor in his numerous trades, he did not seem to work so much by reason\nor by instinct, or simply because he had been tutored to it, or by any\nintermixture of all these, even or uneven; but merely by a kind of\ndeaf and dumb, spontaneous literal process. He was a pure manipulator;\nhis brain, if he had ever had one, must have early oozed along into\nthe muscles of his fingers. He was like one of those unreasoning but\nstill highly useful, multum in parvo, Sheffield contrivances, assuming\nthe exterior  though a little swelled  of a common pocket knife;\nbut containing, not only blades of various sizes, but also\nscrew-drivers, cork-screws, tweezers, awls, pens, rulers, nail-filers,\ncountersinkers. So, if his superiors wanted to use the carpenter for a\nscrew-driver, all they had to do was to open that part of him, and the\nscrew was fast: or if for tweezers, take him up by the legs, and there\nthey were.\n\nYet, as previously hinted, this omnitooled, open-and-shut carpenter,\nwas, after all, no mere machine of an automaton. If he did not have a\ncommon soul in him, he had a subtle something that somehow anomalously\ndid its duty. What that was, whether essence of quicksilver, or a few\ndrops of hartshorn, there is no telling. But there it was; and there\nit had abided for now some sixty years or more. And this it was, this\nsame unaccountable, cunning life-principle in him; this it was, that\nkept him a great part of the time soliloquizing; but only like an\nunreasoning wheel, which also hummingly soliloquizes; or rather, his\nbody was a sentry-box and this soliloquizer on guard there, and\ntalking all the time to keep himself awake.\n\nCHAPTER 108 Ahab and the Carpenter.\n\nThe Deck  First Night Watch.\n\n(Carpenter standing before his vice-bench, and by the light of two\nlanterns busily filing the ivory joist for the leg, which joist is\nfirmly fixed in the vice. Slabs of ivory, leather straps, pads,\nscrews, and various tools of all sorts lying about the bench. Forward,\nthe red flame of the forge is seen, where the blacksmith is at work.)\n\nDrat the file, and drat the bone! That is hard which should be soft,\nand that is soft which should be hard. So we go, who file old jaws and\nshinbones. Let's try another. Aye, now, this works better\n(sneezes). Halloa, this bone dust is (sneezes)  why it's (sneezes)\n yes it's (sneezes)  bless my soul, it won't let me speak! This\nis what an old fellow gets now for working in dead lumber. Saw a live\ntree, and you don't get this dust; amputate a live bone, and you don't\nget it (sneezes). Come, come, you old Smut, there, bear a hand, and\nlet's have that ferule and buckle-screw; I'll be ready for them\npresently. Lucky now (sneezes) there's no knee-joint to make; that\nmight puzzle a little; but a mere shinbone  why it's easy as making\nhop-poles; only I should like to put a good finish on. Time, time; if\nI but only had the time, I could turn him out as neat a leg now as\never (sneezes) scraped to a lady in a parlor. Those buckskin legs and\ncalves of legs I've seen in shop windows wouldn't compare at all. They\nsoak water, they do; and of course get rheumatic, and have to be\ndoctored (sneezes) with washes and lotions, just like live\nlegs. There; before I saw it off, now, I must call his old Mogulship,\nand see whether the length will be all right; too short, if anything,\nI guess. Ha! that's the heel; we are in luck; here he comes, or it's\nsomebody else, that's certain.\n\nAHAB (Advancing)\n\n(During the ensuing scene, the carpenter continues sneezing at times)\n\nWell, manmaker!\n\nJust in time, sir. If the captain pleases, I will now mark the\nlength. Let me measure, sir.\n\nMeasured for a leg! good. Well, it's not the first time. About it!\nThere; keep thy finger on it. This is a cogent vice thou hast here,\ncarpenter; let me feel its grip once. So, so; it does pinch some.\n\nOh, sir, it will break bones  beware, beware!\n\nNo fear; I like a good grip; I like to feel something in this slippery\nworld that can hold, man. What's Prometheus about there?  the\nblacksmith, I mean  what's he about?\n\nHe must be forging the buckle-screw, sir, now.\n\nRight. It's a partnership; he supplies the muscle part. He makes a\nfierce red flame there!\n\nAye, sir; he must have the white heat for this kind of fine work.\n\nUm-m. So he must. I do deem it now a most meaning thing, that that old\nGreek, Prometheus, who made men, they say, should have been a\nblacksmith, and animated them with fire; for what's made in fire must\nproperly belong to fire; and so hell's probable. How the soot flies!\nThis must be the remainder the Greek made the Africans of. Carpenter,\nwhen he's through with that buckle, tell him to forge a pair of steel\nshoulder-blades; there's a pedlar aboard with a crushing pack.\n\nSir?\n\nHold; while Prometheus is about it, I'll order a complete man after a\ndesirable pattern. Imprimis, fifty feet high in his socks; then, chest\nmodelled after the Thames Tunnel; then, legs with roots to 'em, to\nstay in one place; then, arms three feet through the wrist; no heart\nat all, brass forehead, and about a quarter of an acre of fine brains;\nand let me see  shall I order eyes to see outwards? No, but put a\nsky-light on top of his head to illuminate inwards. There, take the\norder, and away.\n\nNow, what's he speaking about, and who's he speaking to, I should like\nto know? Shall I keep standing here? (Aside).\n\n'Tis but indifferent architecture to make a blind dome; here's\none. No, no, no; I must have a lantern.\n\nHo, ho! That's it, hey? Here are two, sir; one will serve my turn.\n\nWhat art thou thrusting that thief-catcher into my face for, man?\nThrusted light is worse than presented pistols.\n\nI thought, sir, that you spoke to carpenter.\n\nCarpenter? why that's  but no;  a very tidy, and, I may say, an\nextremely gentlemanlike sort of business thou art in here, carpenter;\n or would'st thou rather work in clay?\n\nSir?  Clay? clay, sir? That's mud; we leave clay to ditchers, sir.\n\nThe fellow's impious! What art thou sneezing about?\n\nBone is rather dusty, sir.\n\nTake the hint, then; and when thou art dead, never bury thyself under\nliving people's noses.\n\nSir?  oh! ah!  I guess so;  yes  dear!\n\nLook ye, carpenter, I dare say thou callest thyself a right good\nworkmanlike workman, eh? Well, then, will it speak thoroughly well for\nthy work, if, when I come to mount this leg thou makest, I shall\nnevertheless feel another leg in the same identical place with it;\nthat is, carpenter, my old lost leg; the flesh and blood one, I\nmean. Canst thou not drive that old Adam away?\n\nTruly, sir, I begin to understand somewhat now. Yes, I have heard\nsomething curious on that score, sir; how that a dismasted man never\nentirely loses the feeling of his old spar, but it will be still\npricking him at times. May I humbly ask if it be really so, sir?\n\nIt is, man. Look, put thy live leg here in the place where mine once\nwas; so, now, here is only one distinct leg to the eye, yet two to the\nsoul. Where thou feelest tingling life; there, exactly there, there to\na hair, do I. Is't a riddle?\n\nI should humbly call it a poser, sir.\n\nHist, then. How dost thou know that some entire, living, thinking\nthing may not be invisibly and uninterpenetratingly standing precisely\nwhere thou now standest; aye, and standing there in thy spite? In thy\nmost solitary hours, then, dost thou not fear eavesdroppers? Hold,\ndon't speak! And if I still feel the smart of my crushed leg, though\nit be now so long dissolved; then, why mayst not thou, carpenter, feel\nthe fiery pains of hell for ever, and without a body? Hah!\n\nGood Lord! Truly, sir, if it comes to that, I must calculate over\nagain; I think I didn't carry a small figure, sir.\n\nLook ye, pudding-heads should never grant premises.  How long\nbefore the leg is done?\n\nPerhaps an hour, sir.\n\nBungle away at it then, and bring it to me (turns to go). Oh, Life!\nHere I am, proud as Greek god, and yet standing debtor to this\nblockhead for a bone to stand on! Cursed be that mortal\ninter-indebtedness which will not do away with ledgers. I would be\nfree as air; and I'm down in the whole world's books. I am so rich, I\ncould have given bid for bid with the wealthiest Praetorians at the\nauction of the Roman empire (which was the world's); and yet I owe for\nthe flesh in the tongue I brag with. By heavens! I'll get a crucible,\nand into it, and dissolve myself down to one small, compendious\nvertebra. So.\n\nCARPENTER (Resuming his work).\n\nWell, well, well! Stubb knows him best of all, and Stubb always says\nhe's queer; says nothing but that one sufficient little word queer;\nhe's queer, says Stubb; he's queer  queer, queer; and keeps dinning\nit into Mr. Starbuck all the time  queer  sir  queer, queer,\nvery queer. And here's his leg! Yes, now that I think of it, here's\nhis bedfellow! has a stick of whale's jaw-bone for a wife! And this is\nhis leg; he'll stand on this. What was that now about one leg standing\nin three places, and all three places standing in one hell  how was\nthat? Oh! I don't wonder he looked so scornful at me! I'm a sort of\nstrange-thoughted sometimes, they say; but that's only\nhaphazard-like. Then, a short, little old body like me, should never\nundertake to wade out into deep waters with tall, heron-built\ncaptains; the water chucks you under the chin pretty quick, and\nthere's a great cry for life-boats. And here's the heron's leg! long\nand slim, sure enough! Now, for most folks one pair of legs lasts a\nlifetime, and that must be because they use them mercifully, as a\ntender-hearted old lady uses her roly-poly old coach-horses. But Ahab;\noh he's a hard driver. Look, driven one leg to death, and spavined the\nother for life, and now wears out bone legs by the cord. Halloa,\nthere, you Smut! bear a hand there with those screws, and let's finish\nit before the resurrection fellow comes a-calling with his horn for\nall legs, true or false, as brewery-men go round collecting old beer\nbarrels, to fill 'em up again. What a leg this is! It looks like a\nreal live leg, filed down to nothing but the core; he'll be standing\non this to-morrow; he'll be taking altitudes on it. Halloa! I almost\nforgot the little oval slate, smoothed ivory, where he figures up the\nlatitude. So, so; chisel, file, and sand-paper, now!\n\nCHAPTER 109 Ahab and Starbuck in the Cabin.\n\nAccording to usage they were pumping the ship next morning; and lo! no\ninconsiderable oil came up with the water; the casks below must have\nsprung a bad leak. Much concern was shown; and Starbuck went down into\nthe cabin to report this unfavourable affair.\n\nNow, from the South and West the Pequod was drawing nigh to Formosa\nand the Bashee Isles, between which lies one of the tropical outlets\nfrom the China waters into the Pacific. And so Starbuck found Ahab\nwith a general chart of the oriental archipelagoes spread before him;\nand another separate one representing the long eastern coasts of the\nJapanese islands  Niphon, Matsmai, and Sikoke. With his snow-white\nnew ivory leg braced against the screwed leg of his table, and with a\nlong pruning-hook of a jack-knife in his hand, the wondrous old man,\nwith his back to the gangway door, was wrinkling his brow, and tracing\nhis old courses again.\n\n\"Who's there?\" hearing the footstep at the door, but not turning round\nto it. \"On deck! Begone!\"\n\n\"Captain Ahab mistakes; it is I. The oil in the hold is leaking,\nsir. We must up Burtons and break out.\"\n\n\"Up Burtons and break out? Now that we are nearing Japan; heave-to\nhere for a week to tinker a parcel of old hoops?\"\n\n\"Either do that, sir, or waste in one day more oil than we may make\ngood in a year. What we come twenty thousand miles to get is worth\nsaving, sir.\"\n\n\"So it is, so it is; if we get it.\"\n\n\"I was speaking of the oil in the hold, sir.\"\n\n\"And I was not speaking or thinking of that at all. Begone! Let it\nleak! I'm all aleak myself. Aye! leaks in leaks! not only full of\nleaky casks, but those leaky casks are in a leaky ship; and that's a\nfar worse plight than the Pequod's, man. Yet I don't stop to plug my\nleak; for who can find it in the deep-loaded hull; or how hope to plug\nit, even if found, in this life's howling gale? Starbuck! I'll not\nhave the Burtons hoisted.\"\n\n\"What will the owners say, sir?\"\n\n\"Let the owners stand on Nantucket beach and outyell the\nTyphoons. What cares Ahab? Owners, owners? Thou art always prating to\nme, Starbuck, about those miserly owners, as if the owners were my\nconscience. But look ye, the only real owner of anything is its\ncommander; and hark ye, my conscience is in this ship's keel.  On\ndeck!\"\n\n\"Captain Ahab,\" said the reddening mate, moving further into the\ncabin, with a daring so strangely respectful and cautious that it\nalmost seemed not only every way seeking to avoid the slightest\noutward manifestation of itself, but within also seemed more than half\ndistrustful of itself; \"A better man than I might well pass over in\nthee what he would quickly enough resent in a younger man; aye, and in\na happier, Captain Ahab.\"\n\n\"Devils! Dost thou then so much as dare to critically think of me? \nOn deck!\"\n\n\"Nay, sir, not yet; I do entreat. And I do dare, sir  to be\nforbearing! Shall we not understand each other better than hitherto,\nCaptain Ahab?\"\n\nAhab seized a loaded musket from the rack (forming part of most\nSouth-Sea-men's cabin furniture), and pointing it towards Starbuck,\nexclaimed: \"There is one God that is Lord over the earth, and one\nCaptain that is lord over the Pequod.  On deck!\"\n\nFor an instant in the flashing eyes of the mate, and his fiery cheeks,\nyou would have almost thought that he had really received the blaze of\nthe levelled tube. But, mastering his emotion, he half calmly rose,\nand as he quitted the cabin, paused for an instant and said: \"Thou\nhast outraged, not insulted me, sir; but for that I ask thee not to\nbeware of Starbuck; thou wouldst but laugh; but let Ahab beware of\nAhab; beware of thyself, old man.\"\n\n\"He waxes brave, but nevertheless obeys; most careful bravery that!\"\nmurmured Ahab, as Starbuck disappeared. \"What's that he said  Ahab\nbeware of Ahab  there's something there!\" Then unconsciously using\nthe musket for a staff, with an iron brow he paced to and fro in the\nlittle cabin; but presently the thick plaits of his forehead relaxed,\nand returning the gun to the rack, he went to the deck.\n\n\"Thou art but too good a fellow, Starbuck,\" he said lowly to the mate;\nthen raising his voice to the crew: \"Furl the t'gallant-sails, and\nclose-reef the top-sails, fore and aft; back the main-yard; up Burton,\nand break out in the main-hold.\"\n\nIt were perhaps vain to surmise exactly why it was, that as respecting\nStarbuck, Ahab thus acted. It may have been a flash of honesty in him;\nor mere prudential policy which, under the circumstance, imperiously\nforbade the slightest symptom of open disaffection, however transient,\nin the important chief officer of his ship. However it was, his orders\nwere executed; and the Burtons were hoisted.\n\n In Sperm-whalemen with any considerable quantity of oil on board,\nit is a regular semiweekly duty to conduct a hose into the hold, and\ndrench the casks with sea-water; which afterwards, at varying\nintervals, is removed by the ship's pumps. Hereby the casks are sought\nto be kept damply tight; while by the changed character of the\nwithdrawn water, the mariners readily detect any serious leakage in\nthe precious cargo.\n\nCHAPTER 110 Queequeg in His Coffin.\n\nUpon searching, it was found that the casks last struck into the hold\nwere perfectly sound, and that the leak must be further off. So, it\nbeing calm weather, they broke out deeper and deeper, disturbing the\nslumbers of the huge ground-tier butts; and from that black midnight\nsending those gigantic moles into the daylight above. So deep did they\ngo; and so ancient, and corroded, and weedy the aspect of the\nlowermost puncheons, that you almost looked next for some mouldy\ncorner-stone cask containing coins of Captain Noah, with copies of the\nposted placards, vainly warning the infatuated old world from the\nflood. Tierce after tierce, too, of water, and bread, and beef, and\nshooks of staves, and iron bundles of hoops, were hoisted out, till at\nlast the piled decks were hard to get about; and the hollow hull\nechoed under foot, as if you were treading over empty catacombs, and\nreeled and rolled in the sea like an air-freighted demijohn. Top-heavy\nwas the ship as a dinnerless student with all Aristotle in his\nhead. Well was it that the Typhoons did not visit them then.\n\nNow, at this time it was that my poor pagan companion, and fast\nbosom-friend, Queequeg, was seized with a fever, which brought him\nnigh to his endless end.\n\nBe it said, that in this vocation of whaling, sinecures are unknown;\ndignity and danger go hand in hand; till you get to be Captain, the\nhigher you rise the harder you toil. So with poor Queequeg, who, as\nharpooneer, must not only face all the rage of the living whale, but\n as we have elsewhere seen  mount his dead back in a rolling\nsea; and finally descend into the gloom of the hold, and bitterly\nsweating all day in that subterraneous confinement, resolutely\nmanhandle the clumsiest casks and see to their stowage. To be short,\namong whalemen, the harpooneers are the holders, so called.\n\nPoor Queequeg! when the ship was about half disembowelled, you should\nhave stooped over the hatchway, and peered down upon him there; where,\nstripped to his woollen drawers, the tattooed savage was crawling\nabout amid that dampness and slime, like a green spotted lizard at the\nbottom of a well. And a well, or an ice-house, it somehow proved to\nhim, poor pagan; where, strange to say, for all the heat of his\nsweatings, he caught a terrible chill which lapsed into a fever; and\nat last, after some days' suffering, laid him in his hammock, close to\nthe very sill of the door of death. How he wasted and wasted away in\nthose few long-lingering days, till there seemed but little left of\nhim but his frame and tattooing. But as all else in him thinned, and\nhis cheek-bones grew sharper, his eyes, nevertheless, seemed growing\nfuller and fuller; they became of a strange softness of lustre; and\nmildly but deeply looked out at you there from his sickness, a\nwondrous testimony to that immortal health in him which could not die,\nor be weakened. And like circles on the water, which, as they grow\nfainter, expand; so his eyes seemed rounding and rounding, like the\nrings of Eternity. An awe that cannot be named would steal over you as\nyou sat by the side of this waning savage, and saw as strange things\nin his face, as any beheld who were bystanders when Zoroaster\ndied. For whatever is truly wondrous and fearful in man, never yet was\nput into words or books. And the drawing near of Death, which alike\nlevels all, alike impresses all with a last revelation, which only an\nauthor from the dead could adequately tell. So that  let us say it\nagain  no dying Chaldee or Greek had higher and holier thoughts\nthan those, whose mysterious shades you saw creeping over the face of\npoor Queequeg, as he quietly lay in his swaying hammock, and the\nrolling sea seemed gently rocking him to his final rest, and the\nocean's invisible flood-tide lifted him higher and higher towards his\ndestined heaven.\n\nNot a man of the crew but gave him up; and, as for Queequeg himself,\nwhat he thought of his case was forcibly shown by a curious favour he\nasked. He called one to him in the grey morning watch, when the day\nwas just breaking, and taking his hand, said that while in Nantucket\nhe had chanced to see certain little canoes of dark wood, like the\nrich war-wood of his native isle; and upon inquiry, he had learned\nthat all whalemen who died in Nantucket, were laid in those same dark\ncanoes, and that the fancy of being so laid had much pleased him; for\nit was not unlike the custom of his own race, who, after embalming a\ndead warrior, stretched him out in his canoe, and so left him to be\nfloated away to the starry archipelagoes; for not only do they believe\nthat the stars are isles, but that far beyond all visible horizons,\ntheir own mild, uncontinented seas, interflow with the blue heavens;\nand so form the white breakers of the milky way. He added, that he\nshuddered at the thought of being buried in his hammock, according to\nthe usual sea-custom, tossed like something vile to the\ndeath-devouring sharks. No: he desired a canoe like those of\nNantucket, all the more congenial to him, being a whaleman, that like\na whale-boat these coffin-canoes were without a keel; though that\ninvolved but uncertain steering, and much lee-way adown the dim ages.\n\nNow, when this strange circumstance was made known aft, the carpenter\nwas at once commanded to do Queequeg's bidding, whatever it might\ninclude. There was some heathenish, coffin-coloured old lumber aboard,\nwhich, upon a long previous voyage, had been cut from the aboriginal\ngroves of the Lackaday islands, and from these dark planks the coffin\nwas recommended to be made. No sooner was the carpenter apprised of\nthe order, than taking his rule, he forthwith with all the indifferent\npromptitude of his character, proceeded into the forecastle and took\nQueequeg's measure with great accuracy, regularly chalking Queequeg's\nperson as he shifted the rule.\n\n\"Ah! poor fellow! he'll have to die now,\" ejaculated the Long Island\nsailor.\n\nGoing to his vice-bench, the carpenter for convenience sake and\ngeneral reference, now transferringly measured on it the exact length\nthe coffin was to be, and then made the transfer permanent by cutting\ntwo notches at its extremities. This done, he marshalled the planks\nand his tools, and to work.\n\nWhen the last nail was driven, and the lid duly planed and fitted, he\nlightly shouldered the coffin and went forward with it, inquiring\nwhether they were ready for it yet in that direction.\n\nOverhearing the indignant but half-humorous cries with which the\npeople on deck began to drive the coffin away, Queequeg, to every\none's consternation, commanded that the thing should be instantly\nbrought to him, nor was there any denying him; seeing that, of all\nmortals, some dying men are the most tyrannical; and certainly, since\nthey will shortly trouble us so little for evermore, the poor fellows\nought to be indulged.\n\nLeaning over in his hammock, Queequeg long regarded the coffin with an\nattentive eye. He then called for his harpoon, had the wooden stock\ndrawn from it, and then had the iron part placed in the coffin along\nwith one of the paddles of his boat. All by his own request, also,\nbiscuits were then ranged round the sides within: a flask of fresh\nwater was placed at the head, and a small bag of woody earth scraped\nup in the hold at the foot; and a piece of sail-cloth being rolled up\nfor a pillow, Queequeg now entreated to be lifted into his final bed,\nthat he might make trial of its comforts, if any it had. He lay\nwithout moving a few minutes, then told one to go to his bag and bring\nout his little god, Yojo. Then crossing his arms on his breast with\nYojo between, he called for the coffin lid (hatch he called it) to be\nplaced over him. The head part turned over with a leather hinge, and\nthere lay Queequeg in his coffin with little but his composed\ncountenance in view. \"Rarmai\" (it will do; it is easy), he murmured at\nlast, and signed to be replaced in his hammock.\n\nBut ere this was done, Pip, who had been slily hovering near by all\nthis while, drew nigh to him where he lay, and with soft sobbings,\ntook him by the hand; in the other, holding his tambourine.\n\n\"Poor rover! will ye never have done with all this weary roving? where\ngo ye now? But if the currents carry ye to those sweet Antilles where\nthe beaches are only beat with water-lilies, will ye do one little\nerrand for me? Seek out one Pip, who's now been missing long: I think\nhe's in those far Antilles. If ye find him, then comfort him; for he\nmust be very sad; for look! he's left his tambourine behind;  I\nfound it. Rig-a-dig, dig, dig! Now, Queequeg, die; and I'll beat ye\nyour dying march.\"\n\n\"I have heard,\" murmured Starbuck, gazing down the scuttle, \"that in\nviolent fevers, men, all ignorance, have talked in ancient tongues;\nand that when the mystery is probed, it turns out always that in their\nwholly forgotten childhood those ancient tongues had been really\nspoken in their hearing by some lofty scholars. So, to my fond faith,\npoor Pip, in this strange sweetness of his lunacy, brings heavenly\nvouchers of all our heavenly homes. Where learned he that, but there?\n Hark! he speaks again: but more wildly now.\"\n\n\"Form two and two! Let's make a General of him! Ho, where's his\nharpoon? Lay it across here.  Rig-a-dig, dig, dig! huzza! Oh for a\ngame cock now to sit upon his head and crow! Queequeg dies game! \nmind ye that; Queequeg dies game!  take ye good heed of that;\nQueequeg dies game! I say; game, game, game! but base little Pip, he\ndied a coward; died all a'shiver;  out upon Pip! Hark ye; if ye\nfind Pip, tell all the Antilles he's a runaway; a coward, a coward, a\ncoward! Tell them he jumped from a whale-boat! I'd never beat my\ntambourine over base Pip, and hail him General, if he were once more\ndying here. No, no! shame upon all cowards  shame upon them! Let\n'em go drown like Pip, that jumped from a whale-boat. Shame! shame!\"\n\nDuring all this, Queequeg lay with closed eyes, as if in a dream. Pip\nwas led away, and the sick man was replaced in his hammock.\n\nBut now that he had apparently made every preparation for death; now\nthat his coffin was proved a good fit, Queequeg suddenly rallied; soon\nthere seemed no need of the carpenter's box: and thereupon, when some\nexpressed their delighted surprise, he, in substance, said, that the\ncause of his sudden convalescence was this;  at a critical moment,\nhe had just recalled a little duty ashore, which he was leaving\nundone; and therefore had changed his mind about dying: he could not\ndie yet, he averred. They asked him, then, whether to live or die was\na matter of his own sovereign will and pleasure. He answered,\ncertainly. In a word, it was Queequeg's conceit, that if a man made up\nhis mind to live, mere sickness could not kill him: nothing but a\nwhale, or a gale, or some violent, ungovernable, unintelligent\ndestroyer of that sort.\n\nNow, there is this noteworthy difference between savage and civilized;\nthat while a sick, civilized man may be six months convalescing,\ngenerally speaking, a sick savage is almost half-well again in a\nday. So, in good time my Queequeg gained strength; and at length after\nsitting on the windlass for a few indolent days (but eating with a\nvigorous appetite) he suddenly leaped to his feet, threw out his arms\nand legs, gave himself a good stretching, yawned a little bit, and\nthen springing into the head of his hoisted boat, and poising a\nharpoon, pronounced himself fit for a fight.\n\nWith a wild whimsiness, he now used his coffin for a sea-chest; and\nemptying into it his canvas bag of clothes, set them in order\nthere. Many spare hours he spent, in carving the lid with all manner\nof grotesque figures and drawings; and it seemed that hereby he was\nstriving, in his rude way, to copy parts of the twisted tattooing on\nhis body. And this tattooing had been the work of a departed prophet\nand seer of his island, who, by those hieroglyphic marks, had written\nout on his body a complete theory of the heavens and the earth, and a\nmystical treatise on the art of attaining truth; so that Queequeg in\nhis own proper person was a riddle to unfold; a wondrous work in one\nvolume; but whose mysteries not even himself could read, though his\nown live heart beat against them; and these mysteries were therefore\ndestined in the end to moulder away with the living parchment whereon\nthey were inscribed, and so be unsolved to the last. And this thought\nit must have been which suggested to Ahab that wild exclamation of\nhis, when one morning turning away from surveying poor Queequeg \n\"Oh, devilish tantalization of the gods!\"\n\nCHAPTER 111 The Pacific.\n\nWhen gliding by the Bashee isles we emerged at last upon the great\nSouth Sea; were it not for other things, I could have greeted my dear\nPacific with uncounted thanks, for now the long supplication of my\nyouth was answered; that serene ocean rolled eastwards from me a\nthousand leagues of blue.\n\nThere is, one knows not what sweet mystery about this sea, whose\ngently awful stirrings seem to speak of some hidden soul beneath; like\nthose fabled undulations of the Ephesian sod over the buried\nEvangelist St. John. And meet it is, that over these sea-pastures,\nwide-rolling watery prairies and Potters' Fields of all four\ncontinents, the waves should rise and fall, and ebb and flow\nunceasingly; for here, millions of mixed shades and shadows, drowned\ndreams, somnambulisms, reveries; all that we call lives and souls, lie\ndreaming, dreaming, still; tossing like slumberers in their beds; the\never-rolling waves but made so by their restlessness.\n\nTo any meditative Magian rover, this serene Pacific, once beheld, must\never after be the sea of his adoption. It rolls the midmost waters of\nthe world, the Indian ocean and Atlantic being but its arms. The same\nwaves wash the moles of the new-built Californian towns, but yesterday\nplanted by the recentest race of men, and lave the faded but still\ngorgeous skirts of Asiatic lands, older than Abraham; while all\nbetween float milky-ways of coral isles, and low-lying, endless,\nunknown Archipelagoes, and impenetrable Japans. Thus this mysterious,\ndivine Pacific zones the world's whole bulk about; makes all coasts\none bay to it; seems the tide-beating heart of earth. Lifted by those\neternal swells, you needs must own the seductive god, bowing your head\nto Pan.\n\nBut few thoughts of Pan stirred Ahab's brain, as standing like an iron\nstatue at his accustomed place beside the mizen rigging, with one\nnostril he unthinkingly snuffed the sugary musk from the Bashee isles\n(in whose sweet woods mild lovers must be walking), and with the other\nconsciously inhaled the salt breath of the new found sea; that sea in\nwhich the hated White Whale must even then be swimming. Launched at\nlength upon these almost final waters, and gliding towards the\nJapanese cruising-ground, the old man's purpose intensified\nitself. His firm lips met like the lips of a vice; the Delta of his\nforehead's veins swelled like overladen brooks; in his very sleep, his\nringing cry ran through the vaulted hull, \"Stern all! the White Whale\nspouts thick blood!\"\n\nCHAPTER 112 The Blacksmith.\n\nAvailing himself of the mild, summer-cool weather that now reigned in\nthese latitudes, and in preparation for the peculiarly active pursuits\nshortly to be anticipated, Perth, the begrimed, blistered old\nblacksmith, had not removed his portable forge to the hold again,\nafter concluding his contributory work for Ahab's leg, but still\nretained it on deck, fast lashed to ringbolts by the foremast; being\nnow almost incessantly invoked by the headsmen, and harpooneers, and\nbowsmen to do some little job for them; altering, or repairing, or new\nshaping their various weapons and boat furniture. Often he would be\nsurrounded by an eager circle, all waiting to be served; holding\nboat-spades, pike-heads, harpoons, and lances, and jealously watching\nhis every sooty movement, as he toiled. Nevertheless, this old man's\nwas a patient hammer wielded by a patient arm. No murmur, no\nimpatience, no petulance did come from him. Silent, slow, and solemn;\nbowing over still further his chronically broken back, he toiled away,\nas if toil were life itself, and the heavy beating of his hammer the\nheavy beating of his heart. And so it was.  Most miserable!\n\nA peculiar walk in this old man, a certain slight but painful\nappearing yawing in his gait, had at an early period of the voyage\nexcited the curiosity of the mariners. And to the importunity of their\npersisted questionings he had finally given in; and so it came to pass\nthat every one now knew the shameful story of his wretched fate.\n\nBelated, and not innocently, one bitter winter's midnight, on the road\nrunning between two country towns, the blacksmith half-stupidly felt\nthe deadly numbness stealing over him, and sought refuge in a leaning,\ndilapidated barn. The issue was, the loss of the extremities of both\nfeet. Out of this revelation, part by part, at last came out the four\nacts of the gladness, and the one long, and as yet uncatastrophied\nfifth act of the grief of his life's drama.\n\nHe was an old man, who, at the age of nearly sixty, had postponedly\nencountered that thing in sorrow's technicals called ruin. He had been\nan artisan of famed excellence, and with plenty to do; owned a house\nand garden; embraced a youthful, daughter-like, loving wife, and three\nblithe, ruddy children; every Sunday went to a cheerful-looking\nchurch, planted in a grove. But one night, under cover of darkness,\nand further concealed in a most cunning disguisement, a desperate\nburglar slid into his happy home, and robbed them all of\neverything. And darker yet to tell, the blacksmith himself did\nignorantly conduct this burglar into his family's heart. It was the\nBottle Conjuror! Upon the opening of that fatal cork, forth flew the\nfiend, and shrivelled up his home. Now, for prudent, most wise, and\neconomic reasons, the blacksmith's shop was in the basement of his\ndwelling, but with a separate entrance to it; so that always had the\nyoung and loving healthy wife listened with no unhappy nervousness,\nbut with vigorous pleasure, to the stout ringing of her young-armed\nold husband's hammer; whose reverberations, muffled by passing through\nthe floors and walls, came up to her, not unsweetly, in her nursery;\nand so, to stout Labor's iron lullaby, the blacksmith's infants were\nrocked to slumber.\n\nOh, woe on woe! Oh, Death, why canst thou not sometimes be timely?\nHadst thou taken this old blacksmith to thyself ere his full ruin came\nupon him, then had the young widow had a delicious grief, and her\norphans a truly venerable, legendary sire to dream of in their after\nyears; and all of them a care-killing competency. But Death plucked\ndown some virtuous elder brother, on whose whistling daily toil solely\nhung the responsibilities of some other family, and left the worse\nthan useless old man standing, till the hideous rot of life should\nmake him easier to harvest.\n\nWhy tell the whole? The blows of the basement hammer every day grew\nmore and more between; and each blow every day grew fainter than the\nlast; the wife sat frozen at the window, with tearless eyes,\nglitteringly gazing into the weeping faces of her children; the\nbellows fell; the forge choked up with cinders; the house was sold;\nthe mother dived down into the long church-yard grass; her children\ntwice followed her thither; and the houseless, familyless old man\nstaggered off a vagabond in crape; his every woe unreverenced; his\ngrey head a scorn to flaxen curls!\n\nDeath seems the only desirable sequel for a career like this; but\nDeath is only a launching into the region of the strange Untried; it\nis but the first salutation to the possibilities of the immense\nRemote, the Wild, the Watery, the Unshored; therefore, to the\ndeath-longing eyes of such men, who still have left in them some\ninterior compunctions against suicide, does the all-contributed and\nall-receptive ocean alluringly spread forth his whole plain of\nunimaginable, taking terrors, and wonderful, new-life adventures; and\nfrom the hearts of infinite Pacifics, the thousand mermaids sing to\nthem  \"Come hither, broken-hearted; here is another life without\nthe guilt of intermediate death; here are wonders supernatural,\nwithout dying for them. Come hither! bury thyself in a life which, to\nyour now equally abhorred and abhorring, landed world, is more\noblivious than death. Come hither! put up THY gravestone, too, within\nthe churchyard, and come hither, till we marry thee!\"\n\nHearkening to these voices, East and West, by early sunrise, and by\nfall of eve, the blacksmith's soul responded, Aye, I come! And so\nPerth went a-whaling.\n\nCHAPTER 113 The Forge.\n\nWith matted beard, and swathed in a bristling shark-skin apron, about\nmid-day, Perth was standing between his forge and anvil, the latter\nplaced upon an iron-wood log, with one hand holding a pike-head in the\ncoals, and with the other at his forge's lungs, when Captain Ahab came\nalong, carrying in his hand a small rusty-looking leathern bag. While\nyet a little distance from the forge, moody Ahab paused; till at last,\nPerth, withdrawing his iron from the fire, began hammering it upon the\nanvil  the red mass sending off the sparks in thick hovering\nflights, some of which flew close to Ahab.\n\n\"Are these thy Mother Carey's chickens, Perth? they are always flying\nin thy wake; birds of good omen, too, but not to all;  look here,\nthey burn; but thou  thou liv'st among them without a scorch.\"\n\n\"Because I am scorched all over, Captain Ahab,\" answered Perth,\nresting for a moment on his hammer; \"I am past scorching; not easily\ncan'st thou scorch a scar.\"\n\n\"Well, well; no more. Thy shrunk voice sounds too calmly, sanely\nwoeful to me. In no Paradise myself, I am impatient of all misery in\nothers that is not mad. Thou should'st go mad, blacksmith; say, why\ndost thou not go mad? How can'st thou endure without being mad? Do the\nheavens yet hate thee, that thou can'st not go mad?  What wert thou\nmaking there?\"\n\n\"Welding an old pike-head, sir; there were seams and dents in it.\"\n\n\"And can'st thou make it all smooth again, blacksmith, after such hard\nusage as it had?\"\n\n\"I think so, sir.\"\n\n\"And I suppose thou can'st smoothe almost any seams and dents; never\nmind how hard the metal, blacksmith?\"\n\n\"Aye, sir, I think I can; all seams and dents but one.\"\n\n\"Look ye here, then,\" cried Ahab, passionately advancing, and leaning\nwith both hands on Perth's shoulders; \"look ye here  here  can\nye smoothe out a seam like this, blacksmith,\" sweeping one hand across\nhis ribbed brow; \"if thou could'st, blacksmith, glad enough would I\nlay my head upon thy anvil, and feel thy heaviest hammer between my\neyes. Answer! Can'st thou smoothe this seam?\"\n\n\"Oh! that is the one, sir! Said I not all seams and dents but one?\"\n\n\"Aye, blacksmith, it is the one; aye, man, it is unsmoothable; for\nthough thou only see'st it here in my flesh, it has worked down into\nthe bone of my skull  that is all wrinkles! But, away with child's\nplay; no more gaffs and pikes to-day. Look ye here!\" jingling the\nleathern bag, as if it were full of gold coins. \"I, too, want a\nharpoon made; one that a thousand yoke of fiends could not part,\nPerth; something that will stick in a whale like his own\nfin-bone. There's the stuff,\" flinging the pouch upon the anvil. \"Look\nye, blacksmith, these are the gathered nail-stubbs of the steel shoes\nof racing horses.\"\n\n\"Horse-shoe stubbs, sir? Why, Captain Ahab, thou hast here, then, the\nbest and stubbornest stuff we blacksmiths ever work.\"\n\n\"I know it, old man; these stubbs will weld together like glue from\nthe melted bones of murderers. Quick! forge me the harpoon. And forge\nme first, twelve rods for its shank; then wind, and twist, and hammer\nthese twelve together like the yarns and strands of a tow-line. Quick!\nI'll blow the fire.\"\n\nWhen at last the twelve rods were made, Ahab tried them, one by one,\nby spiralling them, with his own hand, round a long, heavy iron\nbolt. \"A flaw!\" rejecting the last one. \"Work that over again, Perth.\"\n\nThis done, Perth was about to begin welding the twelve into one, when\nAhab stayed his hand, and said he would weld his own iron. As, then,\nwith regular, gasping hems, he hammered on the anvil, Perth passing to\nhim the glowing rods, one after the other, and the hard pressed forge\nshooting up its intense straight flame, the Parsee passed silently,\nand bowing over his head towards the fire, seemed invoking some curse\nor some blessing on the toil. But, as Ahab looked up, he slid aside.\n\n\"What's that bunch of lucifers dodging about there for?\" muttered\nStubb, looking on from the forecastle. \"That Parsee smells fire like a\nfusee; and smells of it himself, like a hot musket's powder-pan.\"\n\nAt last the shank, in one complete rod, received its final heat; and\nas Perth, to temper it, plunged it all hissing into the cask of water\nnear by, the scalding steam shot up into Ahab's bent face.\n\n\"Would'st thou brand me, Perth?\" wincing for a moment with the pain;\n\"have I been but forging my own branding-iron, then?\"\n\n\"Pray God, not that; yet I fear something, Captain Ahab. Is not this\nharpoon for the White Whale?\"\n\n\"For the white fiend! But now for the barbs; thou must make them\nthyself, man. Here are my razors  the best of steel; here, and make\nthe barbs sharp as the needle-sleet of the Icy Sea.\"\n\nFor a moment, the old blacksmith eyed the razors as though he would\nfain not use them.\n\n\"Take them, man, I have no need for them; for I now neither shave,\nsup, nor pray till  but here  to work!\"\n\nFashioned at last into an arrowy shape, and welded by Perth to the\nshank, the steel soon pointed the end of the iron; and as the\nblacksmith was about giving the barbs their final heat, prior to\ntempering them, he cried to Ahab to place the water-cask near.\n\n\"No, no  no water for that; I want it of the true\ndeath-temper. Ahoy, there! Tashtego, Queequeg, Daggoo! What say ye,\npagans! Will ye give me as much blood as will cover this barb?\"\nholding it high up. A cluster of dark nods replied, Yes. Three\npunctures were made in the heathen flesh, and the White Whale's barbs\nwere then tempered.\n\n\"Ego non baptizo te in nomine patris, sed in nomine diaboli!\"\ndeliriously howled Ahab, as the malignant iron scorchingly devoured\nthe baptismal blood.\n\nNow, mustering the spare poles from below, and selecting one of\nhickory, with the bark still investing it, Ahab fitted the end to the\nsocket of the iron. A coil of new tow-line was then unwound, and some\nfathoms of it taken to the windlass, and stretched to a great\ntension. Pressing his foot upon it, till the rope hummed like a\nharp-string, then eagerly bending over it, and seeing no strandings,\nAhab exclaimed, \"Good! and now for the seizings.\"\n\nAt one extremity the rope was unstranded, and the separate spread\nyarns were all braided and woven round the socket of the harpoon; the\npole was then driven hard up into the socket; from the lower end the\nrope was traced half-way along the pole's length, and firmly secured\nso, with intertwistings of twine. This done, pole, iron, and rope \nlike the Three Fates  remained inseparable, and Ahab moodily\nstalked away with the weapon; the sound of his ivory leg, and the\nsound of the hickory pole, both hollowly ringing along every\nplank. But ere he entered his cabin, light, unnatural, half-bantering,\nyet most piteous sound was heard. Oh, Pip! thy wretched laugh, thy\nidle but unresting eye; all thy strange mummeries not unmeaningly\nblended with the black tragedy of the melancholy ship, and mocked it!\n\nCHAPTER 114 The Gilder.\n\nPenetrating further and further into the heart of the Japanese\ncruising ground, the Pequod was soon all astir in the fishery. Often,\nin mild, pleasant weather, for twelve, fifteen, eighteen, and twenty\nhours on the stretch, they were engaged in the boats, steadily\npulling, or sailing, or paddling after the whales, or for an interlude\nof sixty or seventy minutes calmly awaiting their uprising; though\nwith but small success for their pains.\n\nAt such times, under an abated sun; afloat all day upon smooth, slow\nheaving swells; seated in his boat, light as a birch canoe; and so\nsociably mixing with the soft waves themselves, that like hearth-stone\ncats they purr against the gunwale; these are the times of dreamy\nquietude, when beholding the tranquil beauty and brilliancy of the\nocean's skin, one forgets the tiger heart that pants beneath it; and\nwould not willingly remember, that this velvet paw but conceals a\nremorseless fang.\n\nThese are the times, when in his whale-boat the rover softly feels a\ncertain filial, confident, land-like feeling towards the sea; that he\nregards it as so much flowery earth; and the distant ship revealing\nonly the tops of her masts, seems struggling forward, not through high\nrolling waves, but through the tall grass of a rolling prairie: as\nwhen the western emigrants' horses only show their erected ears, while\ntheir hidden bodies widely wade through the amazing verdure.\n\nThe long-drawn virgin vales; the mild blue hill-sides; as over these\nthere steals the hush, the hum; you almost swear that play-wearied\nchildren lie sleeping in these solitudes, in some glad May-time, when\nthe flowers of the woods are plucked. And all this mixes with your\nmost mystic mood; so that fact and fancy, half-way meeting,\ninterpenetrate, and form one seamless whole.\n\nNor did such soothing scenes, however temporary, fail of at least as\ntemporary an effect on Ahab. But if these secret golden keys did seem\nto open in him his own secret golden treasuries, yet did his breath\nupon them prove but tarnishing.\n\nOh, grassy glades! oh, ever vernal endless landscapes in the soul; in\nye,  though long parched by the dead drought of the earthy life,\n in ye, men yet may roll, like young horses in new morning clover;\nand for some few fleeting moments, feel the cool dew of the life\nimmortal on them. Would to God these blessed calms would last. But the\nmingled, mingling threads of life are woven by warp and woof: calms\ncrossed by storms, a storm for every calm. There is no steady\nunretracing progress in this life; we do not advance through fixed\ngradations, and at the last one pause:  through infancy's\nunconscious spell, boyhood's thoughtless faith, adolescence' doubt\n(the common doom), then scepticism, then disbelief, resting at last in\nmanhood's pondering repose of If. But once gone through, we trace the\nround again; and are infants, boys, and men, and Ifs eternally. Where\nlies the final harbor, whence we unmoor no more? In what rapt ether\nsails the world, of which the weariest will never weary? Where is the\nfoundling's father hidden? Our souls are like those orphans whose\nunwedded mothers die in bearing them: the secret of our paternity lies\nin their grave, and we must there to learn it.\n\nAnd that same day, too, gazing far down from his boat's side into that\nsame golden sea, Starbuck lowly murmured: \n\n\"Loveliness unfathomable, as ever lover saw in his young bride's eye!\n Tell me not of thy teeth-tiered sharks, and thy kidnapping\ncannibal ways. Let faith oust fact; let fancy oust memory; I look deep\ndown and do believe.\"\n\nAnd Stubb, fish-like, with sparkling scales, leaped up in that same\ngolden light: \n\n\"I am Stubb, and Stubb has his history; but here Stubb takes oaths\nthat he has always been jolly!\"\n\nCHAPTER 115 The Pequod Meets The Bachelor.\n\nAnd jolly enough were the sights and the sounds that came bearing down\nbefore the wind, some few weeks after Ahab's harpoon had been welded.\n\nIt was a Nantucket ship, the Bachelor, which had just wedged in her\nlast cask of oil, and bolted down her bursting hatches; and now, in\nglad holiday apparel, was joyously, though somewhat vain-gloriously,\nsailing round among the widely-separated ships on the ground, previous\nto pointing her prow for home.\n\nThe three men at her mast-head wore long streamers of narrow red\nbunting at their hats; from the stern, a whale-boat was suspended,\nbottom down; and hanging captive from the bowsprit was seen the long\nlower jaw of the last whale they had slain. Signals, ensigns, and\njacks of all colours were flying from her rigging, on every\nside. Sideways lashed in each of her three basketed tops were two\nbarrels of sperm; above which, in her top-mast cross-trees, you saw\nslender breakers of the same precious fluid; and nailed to her main\ntruck was a brazen lamp.\n\nAs was afterwards learned, the Bachelor had met with the most\nsurprising success; all the more wonderful, for that while cruising in\nthe same seas numerous other vessels had gone entire months without\nsecuring a single fish. Not only had barrels of beef and bread been\ngiven away to make room for the far more valuable sperm, but\nadditional supplemental casks had been bartered for, from the ships\nshe had met; and these were stowed along the deck, and in the\ncaptain's and officers' state-rooms. Even the cabin table itself had\nbeen knocked into kindling-wood; and the cabin mess dined off the\nbroad head of an oil-butt, lashed down to the floor for a\ncentrepiece. In the forecastle, the sailors had actually caulked and\npitched their chests, and filled them; it was humorously added, that\nthe cook had clapped a head on his largest boiler, and filled it; that\nthe steward had plugged his spare coffee-pot and filled it; that the\nharpooneers had headed the sockets of their irons and filled them;\nthat indeed everything was filled with sperm, except the captain's\npantaloons pockets, and those he reserved to thrust his hands into, in\nself-complacent testimony of his entire satisfaction.\n\nAs this glad ship of good luck bore down upon the moody Pequod, the\nbarbarian sound of enormous drums came from her forecastle; and\ndrawing still nearer, a crowd of her men were seen standing round her\nhuge try-pots, which, covered with the parchment-like poke or stomach\nskin of the black fish, gave forth a loud roar to every stroke of the\nclenched hands of the crew. On the quarter-deck, the mates and\nharpooneers were dancing with the olive-hued girls who had eloped with\nthem from the Polynesian Isles; while suspended in an ornamented boat,\nfirmly secured aloft between the foremast and mainmast, three Long\nIsland negroes, with glittering fiddle-bows of whale ivory, were\npresiding over the hilarious jig. Meanwhile, others of the ship's\ncompany were tumultuously busy at the masonry of the try-works, from\nwhich the huge pots had been removed. You would have almost thought\nthey were pulling down the cursed Bastille, such wild cries they\nraised, as the now useless brick and mortar were being hurled into the\nsea.\n\nLord and master over all this scene, the captain stood erect on the\nship's elevated quarter-deck, so that the whole rejoicing drama was\nfull before him, and seemed merely contrived for his own individual\ndiversion.\n\nAnd Ahab, he too was standing on his quarter-deck, shaggy and black,\nwith a stubborn gloom; and as the two ships crossed each other's wakes\n one all jubilations for things passed, the other all forebodings\nas to things to come  their two captains in themselves impersonated\nthe whole striking contrast of the scene.\n\n\"Come aboard, come aboard!\" cried the gay Bachelor's commander,\nlifting a glass and a bottle in the air.\n\n\"Hast seen the White Whale?\" gritted Ahab in reply.\n\n\"No; only heard of him; but don't believe in him at all,\" said the\nother good-humoredly. \"Come aboard!\"\n\n\"Thou art too damned jolly. Sail on. Hast lost any men?\"\n\n\"Not enough to speak of  two islanders, that's all;  but come\naboard, old hearty, come along. I'll soon take that black from your\nbrow. Come along, will ye (merry's the play); a full ship and\nhomeward-bound.\"\n\n\"How wondrous familiar is a fool!\" muttered Ahab; then aloud, \"Thou\nart a full ship and homeward bound, thou sayst; well, then, call me an\nempty ship, and outward-bound. So go thy ways, and I will\nmine. Forward there! Set all sail, and keep her to the wind!\"\n\nAnd thus, while the one ship went cheerily before the breeze, the\nother stubbornly fought against it; and so the two vessels parted; the\ncrew of the Pequod looking with grave, lingering glances towards the\nreceding Bachelor; but the Bachelor's men never heeding their gaze for\nthe lively revelry they were in. And as Ahab, leaning over the\ntaffrail, eyed the homewardbound craft, he took from his pocket a\nsmall vial of sand, and then looking from the ship to the vial, seemed\nthereby bringing two remote associations together, for that vial was\nfilled with Nantucket soundings.\n\nCHAPTER 116 The Dying Whale.\n\nNot seldom in this life, when, on the right side, fortune's favourites\nsail close by us, we, though all adroop before, catch somewhat of the\nrushing breeze, and joyfully feel our bagging sails fill out. So\nseemed it with the Pequod. For next day after encountering the gay\nBachelor, whales were seen and four were slain; and one of them by\nAhab.\n\nIt was far down the afternoon; and when all the spearings of the\ncrimson fight were done: and floating in the lovely sunset sea and\nsky, sun and whale both stilly died together; then, such a sweetness\nand such plaintiveness, such inwreathing orisons curled up in that\nrosy air, that it almost seemed as if far over from the deep green\nconvent valleys of the Manilla isles, the Spanish land-breeze,\nwantonly turned sailor, had gone to sea, freighted with these vesper\nhymns.\n\nSoothed again, but only soothed to deeper gloom, Ahab, who had sterned\noff from the whale, sat intently watching his final wanings from the\nnow tranquil boat. For that strange spectacle observable in all sperm\nwhales dying  the turning sunwards of the head, and so expiring \nthat strange spectacle, beheld of such a placid evening, somehow to\nAhab conveyed a wondrousness unknown before.\n\n\"He turns and turns him to it,  how slowly, but how steadfastly,\nhis homage-rendering and invoking brow, with his last dying\nmotions. He too worships fire; most faithful, broad, baronial vassal\nof the sun!  Oh that these too-favouring eyes should see these\ntoo-favouring sights. Look! here, far water-locked; beyond all hum of\nhuman weal or woe; in these most candid and impartial seas; where to\ntraditions no rocks furnish tablets; where for long Chinese ages, the\nbillows have still rolled on speechless and unspoken to, as stars that\nshine upon the Niger's unknown source; here, too, life dies sunwards\nfull of faith; but see! no sooner dead, than death whirls round the\ncorpse, and it heads some other way.\n\n\"Oh, thou dark Hindoo half of nature, who of drowned bones hast\nbuilded thy separate throne somewhere in the heart of these unverdured\nseas; thou art an infidel, thou queen, and too truly speakest to me in\nthe wide-slaughtering Typhoon, and the hushed burial of its after\ncalm. Nor has this thy whale sunwards turned his dying head, and then\ngone round again, without a lesson to me.\n\n\"Oh, trebly hooped and welded hip of power! Oh, high aspiring,\nrainbowed jet!  that one strivest, this one jettest all in vain! In\nvain, oh whale, dost thou seek intercedings with yon all-quickening\nsun, that only calls forth life, but gives it not again. Yet dost\nthou, darker half, rock me with a prouder, if a darker faith. All thy\nunnamable imminglings float beneath me here; I am buoyed by breaths of\nonce living things, exhaled as air, but water now.\n\n\"Then hail, for ever hail, O sea, in whose eternal tossings the wild\nfowl finds his only rest. Born of earth, yet suckled by the sea;\nthough hill and valley mothered me, ye billows are my\nfoster-brothers!\"\n\nCHAPTER 117 The Whale Watch.\n\nThe four whales slain that evening had died wide apart; one, far to\nwindward; one, less distant, to leeward; one ahead; one astern. These\nlast three were brought alongside ere nightfall; but the windward one\ncould not be reached till morning; and the boat that had killed it lay\nby its side all night; and that boat was Ahab's.\n\nThe waif-pole was thrust upright into the dead whale's spout-hole; and\nthe lantern hanging from its top, cast a troubled flickering glare\nupon the black, glossy back, and far out upon the midnight waves,\nwhich gently chafed the whale's broad flank, like soft surf upon a\nbeach.\n\nAhab and all his boat's crew seemed asleep but the Parsee; who\ncrouching in the bow, sat watching the sharks, that spectrally played\nround the whale, and tapped the light cedar planks with their tails. A\nsound like the moaning in squadrons over Asphaltites of unforgiven\nghosts of Gomorrah, ran shuddering through the air.\n\nStarted from his slumbers, Ahab, face to face, saw the Parsee; and\nhooped round by the gloom of the night they seemed the last men in a\nflooded world. \"I have dreamed it again,\" said he.\n\n\"Of the hearses? Have I not said, old man, that neither hearse nor\ncoffin can be thine?\"\n\n\"And who are hearsed that die on the sea?\"\n\n\"But I said, old man, that ere thou couldst die on this voyage, two\nhearses must verily be seen by thee on the sea; the first not made by\nmortal hands; and the visible wood of the last one must be grown in\nAmerica.\"\n\n\"Aye, aye! a strange sight that, Parsee:  a hearse and its plumes\nfloating over the ocean with the waves for the pall-bearers. Ha! Such\na sight we shall not soon see.\"\n\n\"Believe it or not, thou canst not die till it be seen, old man.\"\n\n\"And what was that saying about thyself?\"\n\n\"Though it come to the last, I shall still go before thee thy pilot.\"\n\n\"And when thou art so gone before  if that ever befall  then ere\nI can follow, thou must still appear to me, to pilot me still?  Was\nit not so? Well, then, did I believe all ye say, oh my pilot! I have\nhere two pledges that I shall yet slay Moby Dick and survive it.\"\n\n\"Take another pledge, old man,\" said the Parsee, as his eyes lighted\nup like fire-flies in the gloom  \"Hemp only can kill thee.\"\n\n\"The gallows, ye mean.  I am immortal then, on land and on sea,\"\ncried Ahab, with a laugh of derision;  \"Immortal on land and on\nsea!\"\n\nBoth were silent again, as one man. The grey dawn came on, and the\nslumbering crew arose from the boat's bottom, and ere noon the dead\nwhale was brought to the ship.\n\nCHAPTER 118 The Quadrant.\n\nThe season for the Line at length drew near; and every day when Ahab,\ncoming from his cabin, cast his eyes aloft, the vigilant helmsman\nwould ostentatiously handle his spokes, and the eager mariners quickly\nrun to the braces, and would stand there with all their eyes centrally\nfixed on the nailed doubloon; impatient for the order to point the\nship's prow for the equator. In good time the order came. It was hard\nupon high noon; and Ahab, seated in the bows of his high-hoisted boat,\nwas about taking his wonted daily observation of the sun to determine\nhis latitude.\n\nNow, in that Japanese sea, the days in summer are as freshets of\neffulgences. That unblinkingly vivid Japanese sun seems the blazing\nfocus of the glassy ocean's immeasurable burning-glass. The sky looks\nlacquered; clouds there are none; the horizon floats; and this\nnakedness of unrelieved radiance is as the insufferable splendors of\nGod's throne. Well that Ahab's quadrant was furnished with coloured\nglasses, through which to take sight of that solar fire. So, swinging\nhis seated form to the roll of the ship, and with his\nastrological-looking instrument placed to his eye, he remained in that\nposture for some moments to catch the precise instant when the sun\nshould gain its precise meridian. Meantime while his whole attention\nwas absorbed, the Parsee was kneeling beneath him on the ship's deck,\nand with face thrown up like Ahab's, was eyeing the same sun with him;\nonly the lids of his eyes half hooded their orbs, and his wild face\nwas subdued to an earthly passionlessness. At length the desired\nobservation was taken; and with his pencil upon his ivory leg, Ahab\nsoon calculated what his latitude must be at that precise\ninstant. Then falling into a moment's revery, he again looked up\ntowards the sun and murmured to himself: \"Thou sea-mark! thou high and\nmighty Pilot! thou tellest me truly where I am  but canst thou cast\nthe least hint where I shall be? Or canst thou tell where some other\nthing besides me is this moment living? Where is Moby Dick? This\ninstant thou must be eyeing him. These eyes of mine look into the very\neye that is even now beholding him; aye, and into the eye that is even\nnow equally beholding the objects on the unknown, thither side of\nthee, thou sun!\"\n\nThen gazing at his quadrant, and handling, one after the other, its\nnumerous cabalistical contrivances, he pondered again, and muttered:\n\"Foolish toy! babies' plaything of haughty Admirals, and Commodores,\nand Captains; the world brags of thee, of thy cunning and might; but\nwhat after all canst thou do, but tell the poor, pitiful point, where\nthou thyself happenest to be on this wide planet, and the hand that\nholds thee: no! not one jot more! Thou canst not tell where one drop\nof water or one grain of sand will be to-morrow noon; and yet with thy\nimpotence thou insultest the sun! Science! Curse thee, thou vain toy;\nand cursed be all the things that cast man's eyes aloft to that\nheaven, whose live vividness but scorches him, as these old eyes are\neven now scorched with thy light, O sun! Level by nature to this\nearth's horizon are the glances of man's eyes; not shot from the crown\nof his head, as if God had meant him to gaze on his firmament. Curse\nthee, thou quadrant!\" dashing it to the deck, \"no longer will I guide\nmy earthly way by thee; the level ship's compass, and the level\ndeadreckoning, by log and by line; THESE shall conduct me, and show me\nmy place on the sea. Aye,\" lighting from the boat to the deck, \"thus I\ntrample on thee, thou paltry thing that feebly pointest on high; thus\nI split and destroy thee!\"\n\nAs the frantic old man thus spoke and thus trampled with his live and\ndead feet, a sneering triumph that seemed meant for Ahab, and a\nfatalistic despair that seemed meant for himself  these passed over\nthe mute, motionless Parsee's face. Unobserved he rose and glided\naway; while, awestruck by the aspect of their commander, the seamen\nclustered together on the forecastle, till Ahab, troubledly pacing the\ndeck, shouted out  \"To the braces! Up helm!  square in!\"\n\nIn an instant the yards swung round; and as the ship half-wheeled upon\nher heel, her three firm-seated graceful masts erectly poised upon her\nlong, ribbed hull, seemed as the three Horatii pirouetting on one\nsufficient steed.\n\nStanding between the knight-heads, Starbuck watched the Pequod's\ntumultuous way, and Ahab's also, as he went lurching along the deck.\n\n\"I have sat before the dense coal fire and watched it all aglow, full\nof its tormented flaming life; and I have seen it wane at last, down,\ndown, to dumbest dust. Old man of oceans! of all this fiery life of\nthine, what will at length remain but one little heap of ashes!\"\n\n\"Aye,\" cried Stubb, \"but sea-coal ashes  mind ye that, Mr. Starbuck\n sea-coal, not your common charcoal. Well, well; I heard Ahab\nmutter, 'Here some one thrusts these cards into these old hands of\nmine; swears that I must play them, and no others.' And damn me, Ahab,\nbut thou actest right; live in the game, and die in it!\"\n\nCHAPTER 119 The Candles.\n\nWarmest climes but nurse the cruellest fangs: the tiger of Bengal\ncrouches in spiced groves of ceaseless verdure. Skies the most\neffulgent but basket the deadliest thunders: gorgeous Cuba knows\ntornadoes that never swept tame northern lands. So, too, it is, that\nin these resplendent Japanese seas the mariner encounters the direst\nof all storms, the Typhoon. It will sometimes burst from out that\ncloudless sky, like an exploding bomb upon a dazed and sleepy town.\n\nTowards evening of that day, the Pequod was torn of her canvas, and\nbare-poled was left to fight a Typhoon which had struck her directly\nahead. When darkness came on, sky and sea roared and split with the\nthunder, and blazed with the lightning, that showed the disabled masts\nfluttering here and there with the rags which the first fury of the\ntempest had left for its after sport.\n\nHolding by a shroud, Starbuck was standing on the quarter-deck; at\nevery flash of the lightning glancing aloft, to see what additional\ndisaster might have befallen the intricate hamper there; while Stubb\nand Flask were directing the men in the higher hoisting and firmer\nlashing of the boats. But all their pains seemed naught. Though lifted\nto the very top of the cranes, the windward quarter boat (Ahab's) did\nnot escape. A great rolling sea, dashing high up against the reeling\nship's high teetering side, stove in the boat's bottom at the stern,\nand left it again, all dripping through like a sieve.\n\n\"Bad work, bad work! Mr. Starbuck,\" said Stubb, regarding the wreck,\n\"but the sea will have its way. Stubb, for one, can't fight it. You\nsee, Mr. Starbuck, a wave has such a great long start before it leaps,\nall round the world it runs, and then comes the spring! But as for me,\nall the start I have to meet it, is just across the deck here. But\nnever mind; it's all in fun: so the old song says;\"  (sings.)\n\nOh! jolly is the gale, And a joker is the whale, A' flourishin' his\ntail,  Such a funny, sporty, gamy, jesty, joky, hoky-poky lad, is\nthe Ocean, oh!\n\nThe scud all a flyin', That's his flip only foamin'; When he stirs in\nthe spicin',  Such a funny, sporty, gamy, jesty, joky, hoky-poky\nlad, is the Ocean, oh!\n\nThunder splits the ships, But he only smacks his lips, A tastin' of\nthis flip,  Such a funny, sporty, gamy, jesty, joky, hoky-poky lad,\nis the Ocean, oh!\n\n\"Avast Stubb,\" cried Starbuck, \"let the Typhoon sing, and strike his\nharp here in our rigging; but if thou art a brave man thou wilt hold\nthy peace.\"\n\n\"But I am not a brave man; never said I was a brave man; I am a\ncoward; and I sing to keep up my spirits. And I tell you what it is,\nMr. Starbuck, there's no way to stop my singing in this world but to\ncut my throat. And when that's done, ten to one I sing ye the doxology\nfor a wind-up.\"\n\n\"Madman! look through my eyes if thou hast none of thine own.\"\n\n\"What! how can you see better of a dark night than anybody else, never\nmind how foolish?\"\n\n\"Here!\" cried Starbuck, seizing Stubb by the shoulder, and pointing\nhis hand towards the weather bow, \"markest thou not that the gale\ncomes from the eastward, the very course Ahab is to run for Moby Dick?\nthe very course he swung to this day noon? now mark his boat there;\nwhere is that stove? In the stern-sheets, man; where he is wont to\nstand  his stand-point is stove, man! Now jump overboard, and sing\naway, if thou must!\n\n\"I don't half understand ye: what's in the wind?\"\n\n\"Yes, yes, round the Cape of Good Hope is the shortest way to\nNantucket,\" soliloquized Starbuck suddenly, heedless of Stubb's\nquestion. \"The gale that now hammers at us to stave us, we can turn it\ninto a fair wind that will drive us towards home. Yonder, to windward,\nall is blackness of doom; but to leeward, homeward  I see it\nlightens up there; but not with the lightning.\"\n\nAt that moment in one of the intervals of profound darkness, following\nthe flashes, a voice was heard at his side; and almost at the same\ninstant a volley of thunder peals rolled overhead.\n\n\"Who's there?\"\n\n\"Old Thunder!\" said Ahab, groping his way along the bulwarks to his\npivot-hole; but suddenly finding his path made plain to him by elbowed\nlances of fire.\n\nNow, as the lightning rod to a spire on shore is intended to carry off\nthe perilous fluid into the soil; so the kindred rod which at sea some\nships carry to each mast, is intended to conduct it into the\nwater. But as this conductor must descend to considerable depth, that\nits end may avoid all contact with the hull; and as moreover, if kept\nconstantly towing there, it would be liable to many mishaps, besides\ninterfering not a little with some of the rigging, and more or less\nimpeding the vessel's way in the water; because of all this, the lower\nparts of a ship's lightning-rods are not always overboard; but are\ngenerally made in long slender links, so as to be the more readily\nhauled up into the chains outside, or thrown down into the sea, as\noccasion may require.\n\n\"The rods! the rods!\" cried Starbuck to the crew, suddenly admonished\nto vigilance by the vivid lightning that had just been darting\nflambeaux, to light Ahab to his post. \"Are they overboard? drop them\nover, fore and aft. Quick!\"\n\n\"Avast!\" cried Ahab; \"let's have fair play here, though we be the\nweaker side. Yet I'll contribute to raise rods on the Himmalehs and\nAndes, that all the world may be secured; but out on privileges! Let\nthem be, sir.\"\n\n\"Look aloft!\" cried Starbuck. \"The corpusants! the corpusants!\n\nAll the yard-arms were tipped with a pallid fire; and touched at each\ntri-pointed lightning-rod-end with three tapering white flames, each\nof the three tall masts was silently burning in that sulphurous air,\nlike three gigantic wax tapers before an altar.\n\n\"Blast the boat! let it go!\" cried Stubb at this instant, as a\nswashing sea heaved up under his own little craft, so that its gunwale\nviolently jammed his hand, as he was passing a lashing. \"Blast it!\"\n but slipping backward on the deck, his uplifted eyes caught the\nflames; and immediately shifting his tone he cried  \"The corpusants\nhave mercy on us all!\"\n\nTo sailors, oaths are household words; they will swear in the trance\nof the calm, and in the teeth of the tempest; they will imprecate\ncurses from the topsail-yard-arms, when most they teeter over to a\nseething sea; but in all my voyagings, seldom have I heard a common\noath when God's burning finger has been laid on the ship; when His\n\"Mene, Mene, Tekel Upharsin\" has been woven into the shrouds and the\ncordage.\n\nWhile this pallidness was burning aloft, few words were heard from the\nenchanted crew; who in one thick cluster stood on the forecastle, all\ntheir eyes gleaming in that pale phosphorescence, like a far away\nconstellation of stars. Relieved against the ghostly light, the\ngigantic jet negro, Daggoo, loomed up to thrice his real stature, and\nseemed the black cloud from which the thunder had come. The parted\nmouth of Tashtego revealed his shark-white teeth, which strangely\ngleamed as if they too had been tipped by corpusants; while lit up by\nthe preternatural light, Queequeg's tattooing burned like Satanic blue\nflames on his body.\n\nThe tableau all waned at last with the pallidness aloft; and once more\nthe Pequod and every soul on her decks were wrapped in a pall. A\nmoment or two passed, when Starbuck, going forward, pushed against\nsome one. It was Stubb. \"What thinkest thou now, man; I heard thy cry;\nit was not the same in the song.\"\n\n\"No, no, it wasn't; I said the corpusants have mercy on us all; and I\nhope they will, still. But do they only have mercy on long faces? \nhave they no bowels for a laugh? And look ye, Mr. Starbuck  but\nit's too dark to look. Hear me, then: I take that mast-head flame we\nsaw for a sign of good luck; for those masts are rooted in a hold that\nis going to be chock a' block with sperm-oil, d'ye see; and so, all\nthat sperm will work up into the masts, like sap in a tree. Yes, our\nthree masts will yet be as three spermaceti candles  that's the\ngood promise we saw.\"\n\nAt that moment Starbuck caught sight of Stubb's face slowly beginning\nto glimmer into sight. Glancing upwards, he cried: \"See! see!\" and\nonce more the high tapering flames were beheld with what seemed\nredoubled supernaturalness in their pallor.\n\n\"The corpusants have mercy on us all,\" cried Stubb, again.\n\nAt the base of the mainmast, full beneath the doubloon and the flame,\nthe Parsee was kneeling in Ahab's front, but with his head bowed away\nfrom him; while near by, from the arched and overhanging rigging,\nwhere they had just been engaged securing a spar, a number of the\nseamen, arrested by the glare, now cohered together, and hung\npendulous, like a knot of numbed wasps from a drooping, orchard\ntwig. In various enchanted attitudes, like the standing, or stepping,\nor running skeletons in Herculaneum, others remained rooted to the\ndeck; but all their eyes upcast.\n\n\"Aye, aye, men!\" cried Ahab. \"Look up at it; mark it well; the white\nflame but lights the way to the White Whale! Hand me those mainmast\nlinks there; I would fain feel this pulse, and let mine beat against\nit; blood against fire! So.\"\n\nThen turning  the last link held fast in his left hand, he put his\nfoot upon the Parsee; and with fixed upward eye, and high-flung right\narm, he stood erect before the lofty tri-pointed trinity of flames.\n\n\"Oh! thou clear spirit of clear fire, whom on these seas I as Persian\nonce did worship, till in the sacramental act so burned by thee, that\nto this hour I bear the scar; I now know thee, thou clear spirit, and\nI now know that thy right worship is defiance. To neither love nor\nreverence wilt thou be kind; and e'en for hate thou canst but kill;\nand all are killed. No fearless fool now fronts thee. I own thy\nspeechless, placeless power; but to the last gasp of my earthquake\nlife will dispute its unconditional, unintegral mastery in me. In the\nmidst of the personified impersonal, a personality stands here. Though\nbut a point at best; whencesoe'er I came; wheresoe'er I go; yet while\nI earthly live, the queenly personality lives in me, and feels her\nroyal rights. But war is pain, and hate is woe. Come in thy lowest\nform of love, and I will kneel and kiss thee; but at thy highest, come\nas mere supernal power; and though thou launchest navies of\nfull-freighted worlds, there's that in here that still remains\nindifferent. Oh, thou clear spirit, of thy fire thou madest me, and\nlike a true child of fire, I breathe it back to thee.\"\n\n[Sudden, repeated flashes of lightning; the nine flames leap\nlengthwise to thrice their previous height; Ahab, with the rest,\ncloses his eyes, his right hand pressed hard upon them.]\n\n\"I own thy speechless, placeless power; said I not so? Nor was it\nwrung from me; nor do I now drop these links. Thou canst blind; but I\ncan then grope. Thou canst consume; but I can then be ashes. Take the\nhomage of these poor eyes, and shutter-hands. I would not take it. The\nlightning flashes through my skull; mine eye-balls ache and ache; my\nwhole beaten brain seems as beheaded, and rolling on some stunning\nground. Oh, oh! Yet blindfold, yet will I talk to thee. Light though\nthou be, thou leapest out of darkness; but I am darkness leaping out\nof light, leaping out of thee! The javelins cease; open eyes; see, or\nnot? There burn the flames! Oh, thou magnanimous! now I do glory in my\ngenealogy. But thou art but my fiery father; my sweet mother, I know\nnot. Oh, cruel! what hast thou done with her? There lies my puzzle;\nbut thine is greater. Thou knowest not how came ye, hence callest\nthyself unbegotten; certainly knowest not thy beginning, hence callest\nthyself unbegun. I know that of me, which thou knowest not of thyself,\noh, thou omnipotent. There is some unsuffusing thing beyond thee, thou\nclear spirit, to whom all thy eternity is but time, all thy\ncreativeness mechanical. Through thee, thy flaming self, my scorched\neyes do dimly see it. Oh, thou foundling fire, thou hermit immemorial,\nthou too hast thy incommunicable riddle, thy unparticipated\ngrief. Here again with haughty agony, I read my sire. Leap! leap up,\nand lick the sky! I leap with thee; I burn with thee; would fain be\nwelded with thee; defyingly I worship thee!\"\n\n\"The boat! the boat!\" cried Starbuck, \"look at thy boat, old man!\"\n\nAhab's harpoon, the one forged at Perth's fire, remained firmly lashed\nin its conspicuous crotch, so that it projected beyond his\nwhale-boat's bow; but the sea that had stove its bottom had caused the\nloose leather sheath to drop off; and from the keen steel barb there\nnow came a levelled flame of pale, forked fire. As the silent harpoon\nburned there like a serpent's tongue, Starbuck grasped Ahab by the arm\n \"God, God is against thee, old man; forbear! 'tis an ill voyage!\nill begun, ill continued; let me square the yards, while we may, old\nman, and make a fair wind of it homewards, to go on a better voyage\nthan this.\"\n\nOverhearing Starbuck, the panic-stricken crew instantly ran to the\nbraces  though not a sail was left aloft. For the moment all the\naghast mate's thoughts seemed theirs; they raised a half mutinous\ncry. But dashing the rattling lightning links to the deck, and\nsnatching the burning harpoon, Ahab waved it like a torch among them;\nswearing to transfix with it the first sailor that but cast loose a\nrope's end. Petrified by his aspect, and still more shrinking from the\nfiery dart that he held, the men fell back in dismay, and Ahab again\nspoke: \n\n\"All your oaths to hunt the White Whale are as binding as mine; and\nheart, soul, and body, lungs and life, old Ahab is bound. And that ye\nmay know to what tune this heart beats; look ye here; thus I blow out\nthe last fear!\" And with one blast of his breath he extinguished the\nflame.\n\nAs in the hurricane that sweeps the plain, men fly the neighborhood of\nsome lone, gigantic elm, whose very height and strength but render it\nso much the more unsafe, because so much the more a mark for\nthunderbolts; so at those last words of Ahab's many of the mariners\ndid run from him in a terror of dismay.\n\nCHAPTER 120 The Deck Towards the End of the First Night Watch.\n\n[Ahab standing by the helm. Starbuck approaching him.]\n\nWe must send down the main-top-sail yard, sir. The band is working\nloose and the lee lift is half-stranded. Shall I strike it, sir?\"\n\n\"Strike nothing; lash it. If I had sky-sail poles, I'd sway them up\nnow.\"\n\n\"Sir!  in God's name!  sir?\"\n\n\"Well.\"\n\n\"The anchors are working, sir. Shall I get them inboard?\"\n\n\"Strike nothing, and stir nothing, but lash everything. The wind\nrises, but it has not got up to my table-lands yet. Quick, and see to\nit.  By masts and keels! he takes me for the hunch-backed skipper\nof some coasting smack. Send down my main-top-sail yard! Ho, gluepots!\nLoftiest trucks were made for wildest winds, and this brain-truck of\nmine now sails amid the cloud-scud. Shall I strike that? Oh, none but\ncowards send down their brain-trucks in tempest time. What a hooroosh\naloft there! I would e'en take it for sublime, did I not know that the\ncolic is a noisy malady. Oh, take medicine, take medicine!\"\n\nCHAPTER 121 Midnight.  The Forecastle Bulwarks.\n\n[Stubb and Flask mounted on them, and passing additional lashings over\nthe anchors there hanging.]\n\nNo, Stubb; you may pound that knot there as much as you please, but\nyou will never pound into me what you were just now saying. And how\nlong ago is it since you said the very contrary? Didn't you once say\nthat whatever ship Ahab sails in, that ship should pay something extra\non its insurance policy, just as though it were loaded with powder\nbarrels aft and boxes of lucifers forward? Stop, now; didn't you say\nso?\"\n\n\"Well, suppose I did? What then? I've part changed my flesh since that\ntime, why not my mind? Besides, supposing we are loaded with powder\nbarrels aft and lucifers forward; how the devil could the lucifers get\nafire in this drenching spray here? Why, my little man, you have\npretty red hair, but you couldn't get afire now. Shake yourself;\nyou're Aquarius, or the water-bearer, Flask; might fill pitchers at\nyour coat collar. Don't you see, then, that for these extra risks the\nMarine Insurance companies have extra guarantees? Here are hydrants,\nFlask. But hark, again, and I'll answer ye the other thing. First take\nyour leg off from the crown of the anchor here, though, so I can pass\nthe rope; now listen. What's the mighty difference between holding a\nmast's lightning-rod in the storm, and standing close by a mast that\nhasn't got any lightning-rod at all in a storm? Don't you see, you\ntimber-head, that no harm can come to the holder of the rod, unless\nthe mast is first struck? What are you talking about, then? Not one\nship in a hundred carries rods, and Ahab,  aye, man, and all of us,\n were in no more danger then, in my poor opinion, than all the\ncrews in ten thousand ships now sailing the seas. Why, you King-Post,\nyou, I suppose you would have every man in the world go about with a\nsmall lightning-rod running up the corner of his hat, like a militia\nofficer's skewered feather, and trailing behind like his sash. Why\ndon't ye be sensible, Flask? it's easy to be sensible; why don't ye,\nthen? any man with half an eye can be sensible.\"\n\n\"I don't know that, Stubb. You sometimes find it rather hard.\"\n\n\"Yes, when a fellow's soaked through, it's hard to be sensible, that's\na fact. And I am about drenched with this spray. Never mind; catch the\nturn there, and pass it. Seems to me we are lashing down these anchors\nnow as if they were never going to be used again. Tying these two\nanchors here, Flask, seems like tying a man's hands behind him. And\nwhat big generous hands they are, to be sure. These are your iron\nfists, hey? What a hold they have, too! I wonder, Flask, whether the\nworld is anchored anywhere; if she is, she swings with an uncommon\nlong cable, though. There, hammer that knot down, and we've done. So;\nnext to touching land, lighting on deck is the most satisfactory. I\nsay, just wring out my jacket skirts, will ye? Thank ye. They laugh at\nlong-togs so, Flask; but seems to me, a Long tailed coat ought always\nto be worn in all storms afloat. The tails tapering down that way,\nserve to carry off the water, d'ye see. Same with cocked hats; the\ncocks form gable-end eave-troughs, Flask. No more monkey-jackets and\ntarpaulins for me; I must mount a swallow-tail, and drive down a\nbeaver; so. Halloa! whew! there goes my tarpaulin overboard; Lord,\nLord, that the winds that come from heaven should be so unmannerly!\nThis is a nasty night, lad.\"\n\nCHAPTER 122 Midnight Aloft.  Thunder and Lightning.\n\n[The main-top-sail yard.  Tashtego passing new lashings around it.]\n\n\"Um, um, um. Stop that thunder! Plenty too much thunder up\nhere. What's the use of thunder? Um, um, um. We don't want thunder; we\nwant rum; give us a glass of rum. Um, um, um!\"\n\nCHAPTER 123 The Musket.\n\nDuring the most violent shocks of the Typhoon, the man at the Pequod's\njaw-bone tiller had several times been reelingly hurled to the deck by\nits spasmodic motions, even though preventer tackles had been attached\nto it  for they were slack  because some play to the tiller was\nindispensable.\n\nIn a severe gale like this, while the ship is but a tossed shuttlecock\nto the blast, it is by no means uncommon to see the needles in the\ncompasses, at intervals, go round and round. It was thus with the\nPequod's; at almost every shock the helmsman had not failed to notice\nthe whirling velocity with which they revolved upon the cards; it is a\nsight that hardly anyone can behold without some sort of unwonted\nemotion.\n\nSome hours after midnight, the Typhoon abated so much, that through\nthe strenuous exertions of Starbuck and Stubb  one engaged forward\nand the other aft  the shivered remnants of the jib and fore and\nmain-top-sails were cut adrift from the spars, and went eddying away\nto leeward, like the feathers of an albatross, which sometimes are\ncast to the winds when that storm-tossed bird is on the wing.\n\nThe three corresponding new sails were now bent and reefed, and a\nstorm-trysail was set further aft; so that the ship soon went through\nthe water with some precision again; and the course  for the\npresent, East-south-east  which he was to steer, if practicable,\nwas once more given to the helmsman. For during the violence of the\ngale, he had only steered according to its vicissitudes. But as he was\nnow bringing the ship as near her course as possible, watching the\ncompass meanwhile, lo! a good sign! the wind seemed coming round\nastern; aye, the foul breeze became fair!\n\nInstantly the yards were squared, to the lively song of \"Ho! the fair\nwind! oh-ye-ho, cheerly men!\" the crew singing for joy, that so\npromising an event should so soon have falsified the evil portents\npreceding it.\n\nIn compliance with the standing order of his commander  to report\nimmediately, and at any one of the twenty-four hours, any decided\nchange in the affairs of the deck,  Starbuck had no sooner trimmed\nthe yards to the breeze  however reluctantly and gloomily,  than\nhe mechanically went below to apprise Captain Ahab of the\ncircumstance.\n\nEre knocking at his state-room, he involuntarily paused before it a\nmoment. The cabin lamp  taking long swings this way and that \nwas burning fitfully, and casting fitful shadows upon the old man's\nbolted door,  a thin one, with fixed blinds inserted, in place of\nupper panels. The isolated subterraneousness of the cabin made a\ncertain humming silence to reign there, though it was hooped round by\nall the roar of the elements. The loaded muskets in the rack were\nshiningly revealed, as they stood upright against the forward\nbulkhead. Starbuck was an honest, upright man; but out of Starbuck's\nheart, at that instant when he saw the muskets, there strangely\nevolved an evil thought; but so blent with its neutral or good\naccompaniments that for the instant he hardly knew it for itself.\n\n\"He would have shot me once,\" he murmured, \"yes, there's the very\nmusket that he pointed at me;  that one with the studded stock; let\nme touch it  lift it. Strange, that I, who have handled so many\ndeadly lances, strange, that I should shake so now. Loaded? I must\nsee. Aye, aye; and powder in the pan;  that's not good. Best spill\nit?  wait. I'll cure myself of this. I'll hold the musket boldly\nwhile I think.  I come to report a fair wind to him. But how fair?\nFair for death and doom,  that's fair for Moby Dick. It's a fair\nwind that's only fair for that accursed fish.  The very tube he\npointed at me!  the very one; this one  I hold it here; he would\nhave killed me with the very thing I handle now.  Aye and he would\nfain kill all his crew. Does he not say he will not strike his spars\nto any gale? Has he not dashed his heavenly quadrant? and in these\nsame perilous seas, gropes he not his way by mere dead reckoning of\nthe error-abounding log? and in this very Typhoon, did he not swear\nthat he would have no lightning-rods? But shall this crazed old man be\ntamely suffered to drag a whole ship's company down to doom with him?\n Yes, it would make him the wilful murderer of thirty men and more,\nif this ship come to any deadly harm; and come to deadly harm, my soul\nswears this ship will, if Ahab have his way. If, then, he were this\ninstant  put aside, that crime would not be his. Ha! is he\nmuttering in his sleep? Yes, just there,  in there, he's\nsleeping. Sleeping? aye, but still alive, and soon awake again. I\ncan't withstand thee, then, old man. Not reasoning; not remonstrance;\nnot entreaty wilt thou hearken to; all this thou scornest. Flat\nobedience to thy own flat commands, this is all thou breathest. Aye,\nand say'st the men have vow'd thy vow; say'st all of us are\nAhabs. Great God forbid!  But is there no other way? no lawful way?\n Make him a prisoner to be taken home? What! hope to wrest this old\nman's living power from his own living hands? Only a fool would try\nit. Say he were pinioned even; knotted all over with ropes and\nhawsers; chained down to ring-bolts on this cabin floor; he would be\nmore hideous than a caged tiger, then. I could not endure the sight;\ncould not possibly fly his howlings; all comfort, sleep itself,\ninestimable reason would leave me on the long intolerable\nvoyage. What, then, remains? The land is hundreds of leagues away, and\nlocked Japan the nearest. I stand alone here upon an open sea, with\ntwo oceans and a whole continent between me and law.  Aye, aye,\n'tis so.  Is heaven a murderer when its lightning strikes a\nwould-be murderer in his bed, tindering sheets and skin together? \nAnd would I be a murderer, then, if\"  and slowly, stealthily, and\nhalf sideways looking, he placed the loaded musket's end against the\ndoor.\n\n\"On this level, Ahab's hammock swings within; his head this way. A\ntouch, and Starbuck may survive to hug his wife and child again. \nOh Mary! Mary!  boy! boy! boy!  But if I wake thee not to death,\nold man, who can tell to what unsounded deeps Starbuck's body this day\nweek may sink, with all the crew! Great God, where art Thou? Shall I?\nshall I?  The wind has gone down and shifted, sir; the fore and\nmain topsails are reefed and set; she heads her course.\"\n\n\"Stern all! Oh Moby Dick, I clutch thy heart at last!\"\n\nSuch were the sounds that now came hurtling from out the old man's\ntormented sleep, as if Starbuck's voice had caused the long dumb dream\nto speak.\n\nThe yet levelled musket shook like a drunkard's arm against the panel;\nStarbuck seemed wrestling with an angel; but turning from the door, he\nplaced the death-tube in its rack, and left the place.\n\n\"He's too sound asleep, Mr. Stubb; go thou down, and wake him, and\ntell him. I must see to the deck here. Thou know'st what to say.\"\n\nCHAPTER 124 The Needle.\n\nNext morning the not-yet-subsided sea rolled in long slow billows of\nmighty bulk, and striving in the Pequod's gurgling track, pushed her\non like giants' palms outspread. The strong, unstaggering breeze\nabounded so, that sky and air seemed vast outbellying sails; the whole\nworld boomed before the wind. Muffled in the full morning light, the\ninvisible sun was only known by the spread intensity of his place;\nwhere his bayonet rays moved on in stacks. Emblazonings, as of crowned\nBabylonian kings and queens, reigned over everything. The sea was as a\ncrucible of molten gold, that bubblingly leaps with light and heat.\n\nLong maintaining an enchanted silence, Ahab stood apart; and every\ntime the tetering ship loweringly pitched down her bowsprit, he turned\nto eye the bright sun's rays produced ahead; and when she profoundly\nsettled by the stern, he turned behind, and saw the sun's rearward\nplace, and how the same yellow rays were blending with his undeviating\nwake.\n\n\"Ha, ha, my ship! thou mightest well be taken now for the sea-chariot\nof the sun. Ho, ho! all ye nations before my prow, I bring the sun to\nye! Yoke on the further billows; hallo! a tandem, I drive the sea!\"\n\nBut suddenly reined back by some counter thought, he hurried towards\nthe helm, huskily demanding how the ship was heading.\n\n\"East-sou-east, sir,\" said the frightened steersman.\n\n\"Thou liest!\" smiting him with his clenched fist. \"Heading East at\nthis hour in the morning, and the sun astern?\"\n\nUpon this every soul was confounded; for the phenomenon just then\nobserved by Ahab had unaccountably escaped every one else; but its\nvery blinding palpableness must have been the cause.\n\nThrusting his head half way into the binnacle, Ahab caught one glimpse\nof the compasses; his uplifted arm slowly fell; for a moment he almost\nseemed to stagger. Standing behind him Starbuck looked, and lo! the\ntwo compasses pointed East, and the Pequod was as infallibly going\nWest.\n\nBut ere the first wild alarm could get out abroad among the crew, the\nold man with a rigid laugh exclaimed, \"I have it! It has happened\nbefore. Mr. Starbuck, last night's thunder turned our compasses \nthat's all. Thou hast before now heard of such a thing, I take it.\"\n\n\"Aye; but never before has it happened to me, sir,\" said the pale\nmate, gloomily.\n\nHere, it must needs be said, that accidents like this have in more\nthan one case occurred to ships in violent storms. The magnetic\nenergy, as developed in the mariner's needle, is, as all know,\nessentially one with the electricity beheld in heaven; hence it is not\nto be much marvelled at, that such things should be. Instances where\nthe lightning has actually struck the vessel, so as to smite down some\nof the spars and rigging, the effect upon the needle has at times been\nstill more fatal; all its loadstone virtue being annihilated, so that\nthe before magnetic steel was of no more use than an old wife's\nknitting needle. But in either case, the needle never again, of\nitself, recovers the original virtue thus marred or lost; and if the\nbinnacle compasses be affected, the same fate reaches all the others\nthat may be in the ship; even were the lowermost one inserted into the\nkelson.\n\nDeliberately standing before the binnacle, and eyeing the transpointed\ncompasses, the old man, with the sharp of his extended hand, now took\nthe precise bearing of the sun, and satisfied that the needles were\nexactly inverted, shouted out his orders for the ship's course to be\nchanged accordingly. The yards were hard up; and once more the Pequod\nthrust her undaunted bows into the opposing wind, for the supposed\nfair one had only been juggling her.\n\nMeanwhile, whatever were his own secret thoughts, Starbuck said\nnothing, but quietly he issued all requisite orders; while Stubb and\nFlask  who in some small degree seemed then to be sharing his\nfeelings  likewise unmurmuringly acquiesced. As for the men, though\nsome of them lowly rumbled, their fear of Ahab was greater than their\nfear of Fate. But as ever before, the pagan harpooneers remained\nalmost wholly unimpressed; or if impressed, it was only with a certain\nmagnetism shot into their congenial hearts from inflexible Ahab's.\n\nFor a space the old man walked the deck in rolling reveries. But\nchancing to slip with his ivory heel, he saw the crushed copper\nsight-tubes of the quadrant he had the day before dashed to the deck.\n\n\"Thou poor, proud heaven-gazer and sun's pilot! yesterday I wrecked\nthee, and to-day the compasses would fain have wrecked me. So, so. But\nAhab is lord over the level loadstone yet. Mr. Starbuck  a lance\nwithout a pole; a top-maul, and the smallest of the sail-maker's\nneedles. Quick!\"\n\nAccessory, perhaps, to the impulse dictating the thing he was now\nabout to do, were certain prudential motives, whose object might have\nbeen to revive the spirits of his crew by a stroke of his subtile\nskill, in a matter so wondrous as that of the inverted\ncompasses. Besides, the old man well knew that to steer by\ntranspointed needles, though clumsily practicable, was not a thing to\nbe passed over by superstitious sailors, without some shudderings and\nevil portents.\n\n\"Men,\" said he, steadily turning upon the crew, as the mate handed him\nthe things he had demanded, \"my men, the thunder turned old Ahab's\nneedles; but out of this bit of steel Ahab can make one of his own,\nthat will point as true as any.\"\n\nAbashed glances of servile wonder were exchanged by the sailors, as\nthis was said; and with fascinated eyes they awaited whatever magic\nmight follow. But Starbuck looked away.\n\nWith a blow from the top-maul Ahab knocked off the steel head of the\nlance, and then handing to the mate the long iron rod remaining, bade\nhim hold it upright, without its touching the deck. Then, with the\nmaul, after repeatedly smiting the upper end of this iron rod, he\nplaced the blunted needle endwise on the top of it, and less strongly\nhammered that, several times, the mate still holding the rod as\nbefore. Then going through some small strange motions with it \nwhether indispensable to the magnetizing of the steel, or merely\nintended to augment the awe of the crew, is uncertain  he called\nfor linen thread; and moving to the binnacle, slipped out the two\nreversed needles there, and horizontally suspended the sail-needle by\nits middle, over one of the compass-cards. At first, the steel went\nround and round, quivering and vibrating at either end; but at last it\nsettled to its place, when Ahab, who had been intently watching for\nthis result, stepped frankly back from the binnacle, and pointing his\nstretched arm towards it, exclaimed,  \"Look ye, for yourselves, if\nAhab be not lord of the level loadstone! The sun is East, and that\ncompass swears it!\"\n\nOne after another they peered in, for nothing but their own eyes could\npersuade such ignorance as theirs, and one after another they slunk\naway.\n\nIn his fiery eyes of scorn and triumph, you then saw Ahab in all his\nfatal pride.\n\nCHAPTER 125 The Log and Line.\n\nWhile now the fated Pequod had been so long afloat this voyage, the\nlog and line had but very seldom been in use. Owing to a confident\nreliance upon other means of determining the vessel's place, some\nmerchantmen, and many whalemen, especially when cruising, wholly\nneglect to heave the log; though at the same time, and frequently more\nfor form's sake than anything else, regularly putting down upon the\ncustomary slate the course steered by the ship, as well as the\npresumed average rate of progression every hour. It had been thus with\nthe Pequod. The wooden reel and angular log attached hung, long\nuntouched, just beneath the railing of the after bulwarks. Rains and\nspray had damped it; sun and wind had warped it; all the elements had\ncombined to rot a thing that hung so idly. But heedless of all this,\nhis mood seized Ahab, as he happened to glance upon the reel, not many\nhours after the magnet scene, and he remembered how his quadrant was\nno more, and recalled his frantic oath about the level log and\nline. The ship was sailing plungingly; astern the billows rolled in\nriots.\n\n\"Forward, there! Heave the log!\"\n\nTwo seamen came. The golden-hued Tahitian and the grizzly\nManxman. \"Take the reel, one of ye, I'll heave.\"\n\nThey went towards the extreme stern, on the ship's lee side, where the\ndeck, with the oblique energy of the wind, was now almost dipping into\nthe creamy, sidelong-rushing sea.\n\nThe Manxman took the reel, and holding it high up, by the projecting\nhandle-ends of the spindle, round which the spool of line revolved, so\nstood with the angular log hanging downwards, till Ahab advanced to\nhim.\n\nAhab stood before him, and was lightly unwinding some thirty or forty\nturns to form a preliminary hand-coil to toss overboard, when the old\nManxman, who was intently eyeing both him and the line, made bold to\nspeak.\n\n\"Sir, I mistrust it; this line looks far gone, long heat and wet have\nspoiled it.\"\n\n\"'Twill hold, old gentleman. Long heat and wet, have they spoiled\nthee? Thou seem'st to hold. Or, truer perhaps, life holds thee; not\nthou it.\"\n\n\"I hold the spool, sir. But just as my captain says. With these grey\nhairs of mine 'tis not worth while disputing, 'specially with a\nsuperior, who'll ne'er confess.\"\n\n\"What's that? There now's a patched professor in Queen Nature's\ngranite-founded College; but methinks he's too subservient. Where wert\nthou born?\"\n\n\"In the little rocky Isle of Man, sir.\"\n\n\"Excellent! Thou'st hit the world by that.\"\n\n\"I know not, sir, but I was born there.\"\n\n\"In the Isle of Man, hey? Well, the other way, it's good. Here's a man\nfrom Man; a man born in once independent Man, and now unmanned of Man;\nwhich is sucked in  by what? Up with the reel! The dead, blind wall\nbutts all inquiring heads at last. Up with it! So.\"\n\nThe log was heaved. The loose coils rapidly straightened out in a long\ndragging line astern, and then, instantly, the reel began to whirl. In\nturn, jerkingly raised and lowered by the rolling billows, the towing\nresistance of the log caused the old reelman to stagger strangely.\n\n\"Hold hard!\"\n\nSnap! the overstrained line sagged down in one long festoon; the\ntugging log was gone.\n\n\"I crush the quadrant, the thunder turns the needles, and now the mad\nsea parts the log-line. But Ahab can mend all. Haul in here, Tahitian;\nreel up, Manxman. And look ye, let the carpenter make another log, and\nmend thou the line. See to it.\"\n\n\"There he goes now; to him nothing's happened; but to me, the skewer\nseems loosening out of the middle of the world. Haul in, haul in,\nTahitian! These lines run whole, and whirling out: come in broken, and\ndragging slow. Ha, Pip? come to help; eh, Pip?\"\n\n\"Pip? whom call ye Pip? Pip jumped from the whale-boat. Pip's\nmissing. Let's see now if ye haven't fished him up here, fisherman. It\ndrags hard; I guess he's holding on. Jerk him, Tahiti! Jerk him off;\nwe haul in no cowards here. Ho! there's his arm just breaking water. A\nhatchet! a hatchet! cut it off  we haul in no cowards here. Captain\nAhab! sir, sir! here's Pip, trying to get on board again.\"\n\n\"Peace, thou crazy loon,\" cried the Manxman, seizing him by the\narm. \"Away from the quarter-deck!\"\n\n\"The greater idiot ever scolds the lesser,\" muttered Ahab,\nadvancing. \"Hands off from that holiness! Where sayest thou Pip was,\nboy?\n\n\"Astern there, sir, astern! Lo! lo!\"\n\n\"And who art thou, boy? I see not my reflection in the vacant pupils\nof thy eyes. Oh God! that man should be a thing for immortal souls to\nsieve through! Who art thou, boy?\"\n\n\"Bell-boy, sir; ship's-crier; ding, dong, ding! Pip! Pip! Pip! One\nhundred pounds of clay reward for Pip; five feet high  looks\ncowardly  quickest known by that! Ding, dong, ding! Who's seen Pip\nthe coward?\"\n\n\"There can be no hearts above the snow-line. Oh, ye frozen heavens!\nlook down here. Ye did beget this luckless child, and have abandoned\nhim, ye creative libertines. Here, boy; Ahab's cabin shall be Pip's\nhome henceforth, while Ahab lives. Thou touchest my inmost centre,\nboy; thou art tied to me by cords woven of my heart-strings. Come,\nlet's down.\"\n\n\"What's this? here's velvet shark-skin,\" intently gazing at Ahab's\nhand, and feeling it. \"Ah, now, had poor Pip but felt so kind a thing\nas this, perhaps he had ne'er been lost! This seems to me, sir, as a\nman-rope; something that weak souls may hold by. Oh, sir, let old\nPerth now come and rivet these two hands together; the black one with\nthe white, for I will not let this go.\"\n\n\"Oh, boy, nor will I thee, unless I should thereby drag thee to worse\nhorrors than are here. Come, then, to my cabin. Lo! ye believers in\ngods all goodness, and in man all ill, lo you! see the omniscient gods\noblivious of suffering man; and man, though idiotic, and knowing not\nwhat he does, yet full of the sweet things of love and\ngratitude. Come! I feel prouder leading thee by thy black hand, than\nthough I grasped an Emperor's!\"\n\n\"There go two daft ones now,\" muttered the old Manxman. \"One daft with\nstrength, the other daft with weakness. But here's the end of the\nrotten line  all dripping, too. Mend it, eh? I think we had best\nhave a new line altogether. I'll see Mr. Stubb about it.\"\n\nCHAPTER 126 The Life-Buoy.\n\nSteering now south-eastward by Ahab's levelled steel, and her progress\nsolely determined by Ahab's level log and line; the Pequod held on her\npath towards the Equator. Making so long a passage through such\nunfrequented waters, descrying no ships, and ere long, sideways\nimpelled by unvarying trade winds, over waves monotonously mild; all\nthese seemed the strange calm things preluding some riotous and\ndesperate scene.\n\nAt last, when the ship drew near to the outskirts, as it were, of the\nEquatorial fishing-ground, and in the deep darkness that goes before\nthe dawn, was sailing by a cluster of rocky islets; the watch  then\nheaded by Flask  was startled by a cry so plaintively wild and\nunearthly  like half-articulated wailings of the ghosts of all\nHerod's murdered Innocents  that one and all, they started from\ntheir reveries, and for the space of some moments stood, or sat, or\nleaned all transfixedly listening, like the carved Roman slave, while\nthat wild cry remained within hearing. The Christian or civilized part\nof the crew said it was mermaids, and shuddered; but the pagan\nharpooneers remained unappalled. Yet the grey Manxman  the oldest\nmariner of all  declared that the wild thrilling sounds that were\nheard, were the voices of newly drowned men in the sea.\n\nBelow in his hammock, Ahab did not hear of this till grey dawn, when\nhe came to the deck; it was then recounted to him by Flask, not\nunaccompanied with hinted dark meanings. He hollowly laughed, and thus\nexplained the wonder.\n\nThose rocky islands the ship had passed were the resort of great\nnumbers of seals, and some young seals that had lost their dams, or\nsome dams that had lost their cubs, must have risen nigh the ship and\nkept company with her, crying and sobbing with their human sort of\nwail. But this only the more affected some of them, because most\nmariners cherish a very superstitious feeling about seals, arising not\nonly from their peculiar tones when in distress, but also from the\nhuman look of their round heads and semi-intelligent faces, seen\npeeringly uprising from the water alongside. In the sea, under certain\ncircumstances, seals have more than once been mistaken for men.\n\nBut the bodings of the crew were destined to receive a most plausible\nconfirmation in the fate of one of their number that morning. At\nsun-rise this man went from his hammock to his mast-head at the fore;\nand whether it was that he was not yet half waked from his sleep (for\nsailors sometimes go aloft in a transition state), whether it was thus\nwith the man, there is now no telling; but, be that as it may, he had\nnot been long at his perch, when a cry was heard  a cry and a\nrushing  and looking up, they saw a falling phantom in the air; and\nlooking down, a little tossed heap of white bubbles in the blue of the\nsea.\n\nThe life-buoy  a long slender cask  was dropped from the stern,\nwhere it always hung obedient to a cunning spring; but no hand rose to\nseize it, and the sun having long beat upon this cask it had shrunken,\nso that it slowly filled, and that parched wood also filled at its\nevery pore; and the studded iron-bound cask followed the sailor to the\nbottom, as if to yield him his pillow, though in sooth but a hard one.\n\nAnd thus the first man of the Pequod that mounted the mast to look out\nfor the White Whale, on the White Whale's own peculiar ground; that\nman was swallowed up in the deep. But few, perhaps, thought of that at\nthe time. Indeed, in some sort, they were not grieved at this event,\nat least as a portent; for they regarded it, not as a foreshadowing of\nevil in the future, but as the fulfilment of an evil already\npresaged. They declared that now they knew the reason of those wild\nshrieks they had heard the night before. But again the old Manxman\nsaid nay.\n\nThe lost life-buoy was now to be replaced; Starbuck was directed to\nsee to it; but as no cask of sufficient lightness could be found, and\nas in the feverish eagerness of what seemed the approaching crisis of\nthe voyage, all hands were impatient of any toil but what was directly\nconnected with its final end, whatever that might prove to be;\ntherefore, they were going to leave the ship's stern unprovided with a\nbuoy, when by certain strange signs and inuendoes Queequeg hinted a\nhint concerning his coffin.\n\n\"A life-buoy of a coffin!\" cried Starbuck, starting.\n\n\"Rather queer, that, I should say,\" said Stubb.\n\n\"It will make a good enough one,\" said Flask, \"the carpenter here can\narrange it easily.\"\n\n\"Bring it up; there's nothing else for it,\" said Starbuck, after a\nmelancholy pause. \"Rig it, carpenter; do not look at me so  the\ncoffin, I mean. Dost thou hear me? Rig it.\"\n\n\"And shall I nail down the lid, sir?\" moving his hand as with a\nhammer.\n\n\"Aye.\"\n\n\"And shall I caulk the seams, sir?\" moving his hand as with a\ncaulking-iron.\n\n\"Aye.\"\n\n\"And shall I then pay over the same with pitch, sir?\" moving his hand\nas with a pitch-pot.\n\n\"Away! what possesses thee to this? Make a life-buoy of the coffin,\nand no more.  Mr. Stubb, Mr. Flask, come forward with me.\"\n\n\"He goes off in a huff. The whole he can endure; at the parts he\nbaulks. Now I don't like this. I make a leg for Captain Ahab, and he\nwears it like a gentleman; but I make a bandbox for Queequeg, and he\nwon't put his head into it. Are all my pains to go for nothing with\nthat coffin? And now I'm ordered to make a life-buoy of it. It's like\nturning an old coat; going to bring the flesh on the other side now. I\ndon't like this cobbling sort of business  I don't like it at all;\nit's undignified; it's not my place. Let tinkers' brats do tinkerings;\nwe are their betters. I like to take in hand none but clean, virgin,\nfair-and-square mathematical jobs, something that regularly begins at\nthe beginning, and is at the middle when midway, and comes to an end\nat the conclusion; not a cobbler's job, that's at an end in the\nmiddle, and at the beginning at the end. It's the old woman's tricks\nto be giving cobbling jobs. Lord! what an affection all old women have\nfor tinkers. I know an old woman of sixty-five who ran away with a\nbald-headed young tinker once. And that's the reason I never would\nwork for lonely widow old women ashore, when I kept my job-shop in the\nVineyard; they might have taken it into their lonely old heads to run\noff with me. But heigh-ho! there are no caps at sea but snow-caps. Let\nme see. Nail down the lid; caulk the seams; pay over the same with\npitch; batten them down tight, and hang it with the snap-spring over\nthe ship's stern. Were ever such things done before with a coffin?\nSome superstitious old carpenters, now, would be tied up in the\nrigging, ere they would do the job. But I'm made of knotty Aroostook\nhemlock; I don't budge. Cruppered with a coffin! Sailing about with a\ngrave-yard tray! But never mind. We workers in woods make\nbridal-bedsteads and card-tables, as well as coffins and hearses. We\nwork by the month, or by the job, or by the profit; not for us to ask\nthe why and wherefore of our work, unless it be too confounded\ncobbling, and then we stash it if we can. Hem! I'll do the job, now,\ntenderly. I'll have me  let's see  how many in the ship's\ncompany, all told? But I've forgotten. Any way, I'll have me thirty\nseparate, Turk's-headed life-lines, each three feet long hanging all\nround to the coffin. Then, if the hull go down, there'll be thirty\nlively fellows all fighting for one coffin, a sight not seen very\noften beneath the sun! Come hammer, caulking-iron, pitch-pot, and\nmarling-spike! Let's to it.\"\n\nCHAPTER 127 The Deck.\n\n[The coffin laid upon two line-tubs, between the vice-bench and the\nopen hatchway; the carpenter caulking its seams; the string of twisted\noakum slowly unwinding from a large roll of it placed in the bosom of\nhis frock.  Ahab comes slowly from the cabin-gangway, and hears Pip\nfollowing him.]\n\nBack, lad; I will be with ye again presently. He goes! Not this hand\ncomplies with my humor more genially than that boy.  Middle aisle\nof a church! What's here?\"\n\n\"Life-buoy, sir. Mr. Starbuck's orders. Oh, look, sir! Beware the\nhatchway!\"\n\n\"Thank ye, man. Thy coffin lies handy to the vault.\"\n\n\"Sir? The hatchway? oh! So it does, sir, so it does.\"\n\n\"Art not thou the leg-maker? Look, did not this stump come from thy\nshop?\"\n\n\"I believe it did, sir; does the ferrule stand, sir?\"\n\n\"Well enough. But art thou not also the undertaker?\"\n\n\"Aye, sir; I patched up this thing here as a coffin for Queequeg; but\nthey've set me now to turning it into something else.\"\n\n\"Then tell me; art thou not an arrant, all-grasping, intermeddling,\nmonopolising, heathenish old scamp, to be one day making legs, and the\nnext day coffins to clap them in, and yet again life-buoys out of\nthose same coffins? Thou art as unprincipled as the gods, and as much\nof a jack-of-all-trades.\"\n\n\"But I do not mean anything, sir. I do as I do.\"\n\n\"The gods again. Hark ye, dost thou not ever sing working about a\ncoffin? The Titans, they say, hummed snatches when chipping out the\ncraters for volcanoes; and the grave-digger in the play sings, spade\nin hand. Dost thou never?\"\n\n\"Sing, sir? Do I sing? Oh, I'm indifferent enough, sir, for that; but\nthe reason why the grave-digger made music must have been because\nthere was none in his spade, sir. But the caulking mallet is full of\nit. Hark to it.\"\n\n\"Aye, and that's because the lid there's a sounding-board; and what in\nall things makes the sounding-board is this  there's naught\nbeneath. And yet, a coffin with a body in it rings pretty much the\nsame, Carpenter. Hast thou ever helped carry a bier, and heard the\ncoffin knock against the churchyard gate, going in?\n\n\"Faith, sir, I've  \"\n\n\"Faith? What's that?\"\n\n\"Why, faith, sir, it's only a sort of exclamation-like  that's all,\nsir.\"\n\n\"Um, um; go on.\"\n\n\"I was about to say, sir, that  \"\n\n\"Art thou a silk-worm? Dost thou spin thy own shroud out of thyself?\nLook at thy bosom! Despatch! and get these traps out of sight.\"\n\n\"He goes aft. That was sudden, now; but squalls come sudden in hot\nlatitudes. I've heard that the Isle of Albemarle, one of the\nGallipagos, is cut by the Equator right in the middle. Seems to me\nsome sort of Equator cuts yon old man, too, right in his middle. He's\nalways under the Line  fiery hot, I tell ye! He's looking this way\n come, oakum; quick. Here we go again. This wooden mallet is the\ncork, and I'm the professor of musical glasses  tap, tap!\"\n\n(Ahab to himself.)\n\n\"There's a sight! There's a sound! The grey-headed woodpecker tapping\nthe hollow tree! Blind and dumb might well be envied now. See! that\nthing rests on two line-tubs, full of tow-lines. A most malicious wag,\nthat fellow. Rat-tat! So man's seconds tick! Oh! how immaterial are\nall materials! What things real are there, but imponderable thoughts?\nHere now's the very dreaded symbol of grim death, by a mere hap, made\nthe expressive sign of the help and hope of most endangered life. A\nlife-buoy of a coffin! Does it go further? Can it be that in some\nspiritual sense the coffin is, after all, but an\nimmortality-preserver! I'll think of that. But no. So far gone am I in\nthe dark side of earth, that its other side, the theoretic bright one,\nseems but uncertain twilight to me. Will ye never have done,\nCarpenter, with that accursed sound? I go below; let me not see that\nthing here when I return again. Now, then, Pip, we'll talk this over;\nI do suck most wondrous philosophies from thee! Some unknown conduits\nfrom the unknown worlds must empty into thee!\"\n\nCHAPTER 128 The Pequod Meets The Rachel.\n\nNext day, a large ship, the Rachel, was descried, bearing directly\ndown upon the Pequod, all her spars thickly clustering with men. At\nthe time the Pequod was making good speed through the water; but as\nthe broad-winged windward stranger shot nigh to her, the boastful\nsails all fell together as blank bladders that are burst, and all life\nfled from the smitten hull.\n\n\"Bad news; she brings bad news,\" muttered the old Manxman. But ere her\ncommander, who, with trumpet to mouth, stood up in his boat; ere he\ncould hopefully hail, Ahab's voice was heard.\n\n\"Hast seen the White Whale?\"\n\n\"Aye, yesterday. Have ye seen a whale-boat adrift?\"\n\nThrottling his joy, Ahab negatively answered this unexpected question;\nand would then have fain boarded the stranger, when the stranger\ncaptain himself, having stopped his vessel's way, was seen descending\nher side. A few keen pulls, and his boat-hook soon clinched the\nPequod's main-chains, and he sprang to the deck. Immediately he was\nrecognised by Ahab for a Nantucketer he knew. But no formal salutation\nwas exchanged.\n\n\"Where was he?  not killed!  not killed!\" cried Ahab, closely\nadvancing. \"How was it?\"\n\nIt seemed that somewhat late on the afternoon of the day previous,\nwhile three of the stranger's boats were engaged with a shoal of\nwhales, which had led them some four or five miles from the ship; and\nwhile they were yet in swift chase to windward, the white hump and\nhead of Moby Dick had suddenly loomed up out of the water, not very\nfar to leeward; whereupon, the fourth rigged boat  a reserved one\n had been instantly lowered in chase. After a keen sail before the\nwind, this fourth boat  the swiftest keeled of all  seemed to\nhave succeeded in fastening  at least, as well as the man at the\nmast-head could tell anything about it. In the distance he saw the\ndiminished dotted boat; and then a swift gleam of bubbling white\nwater; and after that nothing more; whence it was concluded that the\nstricken whale must have indefinitely run away with his pursuers, as\noften happens. There was some apprehension, but no positive alarm, as\nyet. The recall signals were placed in the rigging; darkness came on;\nand forced to pick up her three far to windward boats  ere going in\nquest of the fourth one in the precisely opposite direction  the\nship had not only been necessitated to leave that boat to its fate\ntill near midnight, but, for the time, to increase her distance from\nit. But the rest of her crew being at last safe aboard, she crowded\nall sail  stunsail on stunsail  after the missing boat; kindling\na fire in her try-pots for a beacon; and every other man aloft on the\nlook-out. But though when she had thus sailed a sufficient distance to\ngain the presumed place of the absent ones when last seen; though she\nthen paused to lower her spare boats to pull all around her; and not\nfinding anything, had again dashed on; again paused, and lowered her\nboats; and though she had thus continued doing till daylight; yet not\nthe least glimpse of the missing keel had been seen.\n\nThe story told, the stranger Captain immediately went on to reveal his\nobject in boarding the Pequod. He desired that ship to unite with his\nown in the search; by sailing over the sea some four or five miles\napart, on parallel lines, and so sweeping a double horizon, as it\nwere.\n\n\"I will wager something now,\" whispered Stubb to Flask, \"that some one\nin that missing boat wore off that Captain's best coat; mayhap, his\nwatch  he's so cursed anxious to get it back. Who ever heard of two\npious whale-ships cruising after one missing whale-boat in the height\nof the whaling season? See, Flask, only see how pale he looks  pale\nin the very buttons of his eyes  look  it wasn't the coat  it\nmust have been the  \"\n\n\"My boy, my own boy is among them. For God's sake  I beg, I\nconjure\"  here exclaimed the stranger Captain to Ahab, who thus far\nhad but icily received his petition. \"For eight-and-forty hours let me\ncharter your ship  I will gladly pay for it, and roundly pay for it\n if there be no other way  for eight-and-forty hours only \nonly that  you must, oh, you must, and you shall do this thing.\"\n\n\"His son!\" cried Stubb, \"oh, it's his son he's lost! I take back the\ncoat and watch  what says Ahab? We must save that boy.\"\n\n\"He's drowned with the rest on 'em, last night,\" said the old Manx\nsailor standing behind them; \"I heard; all of ye heard their spirits.\"\n\nNow, as it shortly turned out, what made this incident of the Rachel's\nthe more melancholy, was the circumstance, that not only was one of\nthe Captain's sons among the number of the missing boat's crew; but\namong the number of the other boat's crews, at the same time, but on\nthe other hand, separated from the ship during the dark vicissitudes\nof the chase, there had been still another son; as that for a time,\nthe wretched father was plunged to the bottom of the cruellest\nperplexity; which was only solved for him by his chief mate's\ninstinctively adopting the ordinary procedure of a whale-ship in such\nemergencies, that is, when placed between jeopardized but divided\nboats, always to pick up the majority first. But the captain, for some\nunknown constitutional reason, had refrained from mentioning all this,\nand not till forced to it by Ahab's iciness did he allude to his one\nyet missing boy; a little lad, but twelve years old, whose father with\nthe earnest but unmisgiving hardihood of a Nantucketer's paternal\nlove, had thus early sought to initiate him in the perils and wonders\nof a vocation almost immemorially the destiny of all his race. Nor\ndoes it unfrequently occur, that Nantucket captains will send a son of\nsuch tender age away from them, for a protracted three or four years'\nvoyage in some other ship than their own; so that their first\nknowledge of a whaleman's career shall be unenervated by any chance\ndisplay of a father's natural but untimely partiality, or undue\napprehensiveness and concern.\n\nMeantime, now the stranger was still beseeching his poor boon of Ahab;\nand Ahab still stood like an anvil, receiving every shock, but without\nthe least quivering of his own.\n\n\"I will not go,\" said the stranger, \"till you say aye to me. Do to me\nas you would have me do to you in the like case. For you too have a\nboy, Captain Ahab  though but a child, and nestling safely at home\nnow  a child of your old age too  Yes, yes, you relent; I see it\n run, run, men, now, and stand by to square in the yards.\"\n\n\"Avast,\" cried Ahab  \"touch not a rope-yarn\"; then in a voice that\nprolongingly moulded every word  \"Captain Gardiner, I will not do\nit. Even now I lose time. Good-bye, good-bye. God bless ye, man, and\nmay I forgive myself, but I must go. Mr. Starbuck, look at the\nbinnacle watch, and in three minutes from this present instant warn\noff all strangers: then brace forward again, and let the ship sail as\nbefore.\"\n\nHurriedly turning, with averted face, he descended into his cabin,\nleaving the strange captain transfixed at this unconditional and utter\nrejection of his so earnest suit. But starting from his enchantment,\nGardiner silently hurried to the side; more fell than stepped into his\nboat, and returned to his ship.\n\nSoon the two ships diverged their wakes; and long as the strange\nvessel was in view, she was seen to yaw hither and thither at every\ndark spot, however small, on the sea. This way and that her yards were\nswung round; starboard and larboard, she continued to tack; now she\nbeat against a head sea; and again it pushed her before it; while all\nthe while, her masts and yards were thickly clustered with men, as\nthree tall cherry trees, when the boys are cherrying among the boughs.\n\nBut by her still halting course and winding, woeful way, you plainly\nsaw that this ship that so wept with spray, still remained without\ncomfort. She was Rachel, weeping for her children, because they were\nnot.\n\nCHAPTER 129 The Cabin.\n\n(Ahab moving to go on deck; Pip catches him by the hand to follow.)\n\nLad, lad, I tell thee thou must not follow Ahab now. The hour is\ncoming when Ahab would not scare thee from him, yet would not have\nthee by him. There is that in thee, poor lad, which I feel too curing\nto my malady. Like cures like; and for this hunt, my malady becomes my\nmost desired health. Do thou abide below here, where they shall serve\nthee, as if thou wert the captain. Aye, lad, thou shalt sit here in my\nown screwed chair; another screw to it, thou must be.\"\n\n\"No, no, no! ye have not a whole body, sir; do ye but use poor me for\nyour one lost leg; only tread upon me, sir; I ask no more, so I remain\na part of ye.\"\n\n\"Oh! spite of million villains, this makes me a bigot in the fadeless\nfidelity of man!  and a black! and crazy!  but methinks\nlike-cures-like applies to him too; he grows so sane again.\"\n\n\"They tell me, sir, that Stubb did once desert poor little Pip, whose\ndrowned bones now show white, for all the blackness of his living\nskin. But I will never desert ye, sir, as Stubb did him. Sir, I must\ngo with ye.\"\n\n\"If thou speakest thus to me much more, Ahab's purpose keels up in\nhim. I tell thee no; it cannot be.\"\n\n\"Oh good master, master, master!\n\n\"Weep so, and I will murder thee! have a care, for Ahab too is\nmad. Listen, and thou wilt often hear my ivory foot upon the deck, and\nstill know that I am there. And now I quit thee. Thy hand!  Met!\nTrue art thou, lad, as the circumference to its centre. So: God for\never bless thee; and if it come to that,  God for ever save thee,\nlet what will befall.\"\n\n(Ahab goes; Pip steps one step forward.)\n\n\"Here he this instant stood; I stand in his air,  but I'm\nalone. Now were even poor Pip here I could endure it, but he's\nmissing. Pip! Pip! Ding, dong, ding! Who's seen Pip? He must be up\nhere; let's try the door. What? neither lock, nor bolt, nor bar; and\nyet there's no opening it. It must be the spell; he told me to stay\nhere: Aye, and told me this screwed chair was mine. Here, then, I'll\nseat me, against the transom, in the ship's full middle, all her keel\nand her three masts before me. Here, our old sailors say, in their\nblack seventy-fours great admirals sometimes sit at table, and lord it\nover rows of captains and lieutenants. Ha! what's this? epaulets!\nepaulets! the epaulets all come crowding! Pass round the decanters;\nglad to see ye; fill up, monsieurs! What an odd feeling, now, when a\nblack boy's host to white men with gold lace upon their coats! \nMonsieurs, have ye seen one Pip?  a little negro lad, five feet\nhigh, hang-dog look, and cowardly! Jumped from a whale-boat once; \nseen him? No! Well then, fill up again, captains, and let's drink\nshame upon all cowards! I name no names. Shame upon them! Put one foot\nupon the table. Shame upon all cowards.  Hist! above there, I hear\nivory  Oh, master! master! I am indeed down-hearted when you walk\nover me. But here I'll stay, though this stern strikes rocks; and they\nbulge through; and oysters come to join me.\"\n\nCHAPTER 130 The Hat.\n\nAnd now that at the proper time and place, after so long and wide a\npreliminary cruise, Ahab,  all other whaling waters swept \nseemed to have chased his foe into an ocean-fold, to slay him the more\nsecurely there; now, that he found himself hard by the very latitude\nand longitude where his tormenting wound had been inflicted; now that\na vessel had been spoken which on the very day preceding had actually\nencountered Moby Dick;  and now that all his successive meetings\nwith various ships contrastingly concurred to show the demoniac\nindifference with which the white whale tore his hunters, whether\nsinning or sinned against; now it was that there lurked a something in\nthe old man's eyes, which it was hardly sufferable for feeble souls to\nsee. As the unsetting polar star, which through the livelong, arctic,\nsix months' night sustains its piercing, steady, central gaze; so\nAhab's purpose now fixedly gleamed down upon the constant midnight of\nthe gloomy crew. It domineered above them so, that all their bodings,\ndoubts, misgivings, fears, were fain to hide beneath their souls, and\nnot sprout forth a single spear or leaf.\n\nIn this foreshadowing interval too, all humor, forced or natural,\nvanished. Stubb no more strove to raise a smile; Starbuck no more\nstrove to check one. Alike, joy and sorrow, hope and fear, seemed\nground to finest dust, and powdered, for the time, in the clamped\nmortar of Ahab's iron soul. Like machines, they dumbly moved about the\ndeck, ever conscious that the old man's despot eye was on them.\n\nBut did you deeply scan him in his more secret confidential hours;\nwhen he thought no glance but one was on him; then you would have seen\nthat even as Ahab's eyes so awed the crew's, the inscrutable Parsee's\nglance awed his; or somehow, at least, in some wild way, at times\naffected it. Such an added, gliding strangeness began to invest the\nthin Fedallah now; such ceaseless shudderings shook him; that the men\nlooked dubious at him; half uncertain, as it seemed, whether indeed he\nwere a mortal substance, or else a tremulous shadow cast upon the deck\nby some unseen being's body. And that shadow was always hovering\nthere. For not by night, even, had Fedallah ever certainly been known\nto slumber, or go below. He would stand still for hours: but never sat\nor leaned; his wan but wondrous eyes did plainly say  We two\nwatchmen never rest.\n\nNor, at any time, by night or day could the mariners now step upon the\ndeck, unless Ahab was before them; either standing in his pivot-hole,\nor exactly pacing the planks between two undeviating limits,  the\nmain-mast and the mizen; or else they saw him standing in the\ncabin-scuttle,  his living foot advanced upon the deck, as if to\nstep; his hat slouched heavily over his eyes; so that however\nmotionless he stood, however the days and nights were added on, that\nhe had not swung in his hammock; yet hidden beneath that slouching\nhat, they could never tell unerringly whether, for all this, his eyes\nwere really closed at times; or whether he was still intently scanning\nthem; no matter, though he stood so in the scuttle for a whole hour on\nthe stretch, and the unheeded night-damp gathered in beads of dew upon\nthat stone-carved coat and hat. The clothes that the night had wet,\nthe next day's sunshine dried upon him; and so, day after day, and\nnight after night; he went no more beneath the planks; whatever he\nwanted from the cabin that thing he sent for.\n\nHe ate in the same open air; that is, his two only meals, \nbreakfast and dinner: supper he never touched; nor reaped his beard;\nwhich darkly grew all gnarled, as unearthed roots of trees blown over,\nwhich still grow idly on at naked base, though perished in the upper\nverdure. But though his whole life was now become one watch on deck;\nand though the Parsee's mystic watch was without intermission as his\nown; yet these two never seemed to speak  one man to the other \nunless at long intervals some passing unmomentous matter made it\nnecessary. Though such a potent spell seemed secretly to join the\ntwain; openly, and to the awe-struck crew, they seemed pole-like\nasunder. If by day they chanced to speak one word; by night, dumb men\nwere both, so far as concerned the slightest verbal interchange. At\ntimes, for longest hours, without a single hail, they stood far parted\nin the starlight; Ahab in his scuttle, the Parsee by the mainmast; but\nstill fixedly gazing upon each other; as if in the Parsee Ahab saw his\nforethrown shadow, in Ahab the Parsee his abandoned substance.\n\nAnd yet, somehow, did Ahab  in his own proper self, as daily,\nhourly, and every instant, commandingly revealed to his subordinates,\n Ahab seemed an independent lord; the Parsee but his slave. Still\nagain both seemed yoked together, and an unseen tyrant driving them;\nthe lean shade siding the solid rib. For be this Parsee what he may,\nall rib and keel was solid Ahab.\n\nAt the first faintest glimmering of the dawn, his iron voice was heard\nfrom aft,  \"Man the mast-heads!\"  and all through the day, till\nafter sunset and after twilight, the same voice every hour, at the\nstriking of the helmsman's bell, was heard  \"What d'ye see? \nsharp! sharp!\"\n\nBut when three or four days had slided by, after meeting the\nchildren-seeking Rachel; and no spout had yet been seen; the\nmonomaniac old man seemed distrustful of his crew's fidelity; at\nleast, of nearly all except the Pagan harpooneers; he seemed to doubt,\neven, whether Stubb and Flask might not willingly overlook the sight\nhe sought. But if these suspicions were really his, he sagaciously\nrefrained from verbally expressing them, however his actions might\nseem to hint them.\n\n\"I will have the first sight of the whale myself,\"  he said. \"Aye!\nAhab must have the doubloon! and with his own hands he rigged a nest\nof basketed bowlines; and sending a hand aloft, with a single sheaved\nblock, to secure to the main-mast head, he received the two ends of\nthe downward-reeved rope; and attaching one to his basket prepared a\npin for the other end, in order to fasten it at the rail. This done,\nwith that end yet in his hand and standing beside the pin, he looked\nround upon his crew, sweeping from one to the other; pausing his\nglance long upon Daggoo, Queequeg, Tashtego; but shunning Fedallah;\nand then settling his firm relying eye upon the chief mate, said, \n\"Take the rope, sir  I give it into thy hands, Starbuck.\" Then\narranging his person in the basket, he gave the word for them to hoist\nhim to his perch, Starbuck being the one who secured the rope at last;\nand afterwards stood near it. And thus, with one hand clinging round\nthe royal mast, Ahab gazed abroad upon the sea for miles and miles,\n ahead, astern, this side, and that,  within the wide expanded\ncircle commanded at so great a height.\n\nWhen in working with his hands at some lofty almost isolated place in\nthe rigging, which chances to afford no foothold, the sailor at sea is\nhoisted up to that spot, and sustained there by the rope; under these\ncircumstances, its fastened end on deck is always given in strict\ncharge to some one man who has the special watch of it. Because in\nsuch a wilderness of running rigging, whose various different\nrelations aloft cannot always be infallibly discerned by what is seen\nof them at the deck; and when the deck-ends of these ropes are being\nevery few minutes cast down from the fastenings, it would be but a\nnatural fatality, if, unprovided with a constant watchman, the hoisted\nsailor should by some carelessness of the crew be cast adrift and fall\nall swooping to the sea. So Ahab's proceedings in this matter were not\nunusual; the only strange thing about them seemed to be, that\nStarbuck, almost the one only man who had ever ventured to oppose him\nwith anything in the slightest degree approaching to decision  one\nof those too, whose faithfulness on the look-out he had seemed to\ndoubt somewhat;  it was strange, that this was the very man he\nshould select for his watchman; freely giving his whole life into such\nan otherwise distrusted person's hands.\n\nNow, the first time Ahab was perched aloft; ere he had been there ten\nminutes; one of those red-billed savage sea-hawks which so often fly\nincommodiously close round the manned mast-heads of whalemen in these\nlatitudes; one of these birds came wheeling and screaming round his\nhead in a maze of untrackably swift circlings. Then it darted a\nthousand feet straight up into the air; then spiralized downwards, and\nwent eddying again round his head.\n\nBut with his gaze fixed upon the dim and distant horizon, Ahab seemed\nnot to mark this wild bird; nor, indeed, would any one else have\nmarked it much, it being no uncommon circumstance; only now almost the\nleast heedful eye seemed to see some sort of cunning meaning in almost\nevery sight.\n\n\"Your hat, your hat, sir!\" suddenly cried the Sicilian seaman, who\nbeing posted at the mizen-mast-head, stood directly behind Ahab,\nthough somewhat lower than his level, and with a deep gulf of air\ndividing them.\n\nBut already the sable wing was before the old man's eyes; the long\nhooked bill at his head: with a scream, the black hawk darted away\nwith his prize.\n\nAn eagle flew thrice round Tarquin's head, removing his cap to replace\nit, and thereupon Tanaquil, his wife, declared that Tarquin would be\nking of Rome. But only by the replacing of the cap was that omen\naccounted good. Ahab's hat was never restored; the wild hawk flew on\nand on with it; far in advance of the prow: and at last disappeared;\nwhile from the point of that disappearance, a minute black spot was\ndimly discerned, falling from that vast height into the sea.\n\nCHAPTER 131 The Pequod Meets The Delight.\n\nThe intense Pequod sailed on; the rolling waves and days went by; the\nlife-buoy-coffin still lightly swung; and another ship, most miserably\nmisnamed the Delight, was descried. As she drew nigh, all eyes were\nfixed upon her broad beams, called shears, which, in some\nwhaling-ships, cross the quarter-deck at the height of eight or nine\nfeet; serving to carry the spare, unrigged, or disabled boats.\n\nUpon the stranger's shears were beheld the shattered, white ribs, and\nsome few splintered planks, of what had once been a whale-boat; but\nyou now saw through this wreck, as plainly as you see through the\npeeled, half-unhinged, and bleaching skeleton of a horse.\n\n\"Hast seen the White Whale?\"\n\n\"Look!\" replied the hollow-cheeked captain from his taffrail; and with\nhis trumpet he pointed to the wreck.\n\n\"Hast killed him?\"\n\n\"The harpoon is not yet forged that ever will do that,\" answered the\nother, sadly glancing upon a rounded hammock on the deck, whose\ngathered sides some noiseless sailors were busy in sewing together.\n\n\"Not forged!\" and snatching Perth's levelled iron from the crotch,\nAhab held it out, exclaiming  \"Look ye, Nantucketer; here in this\nhand I hold his death! Tempered in blood, and tempered by lightning\nare these barbs; and I swear to temper them triply in that hot place\nbehind the fin, where the White Whale most feels his accursed life!\"\n\n\"Then God keep thee, old man  see'st thou that\"  pointing to the\nhammock  \"I bury but one of five stout men, who were alive only\nyesterday; but were dead ere night. Only that one I bury; the rest\nwere buried before they died; you sail upon their tomb.\" Then turning\nto his crew  \"Are ye ready there? place the plank then on the rail,\nand lift the body; so, then  Oh! God\"  advancing towards the\nhammock with uplifted hands  \"may the resurrection and the life \n\"\n\n\"Brace forward! Up helm!\" cried Ahab like lightning to his men.\n\nBut the suddenly started Pequod was not quick enough to escape the\nsound of the splash that the corpse soon made as it struck the sea;\nnot so quick, indeed, but that some of the flying bubbles might have\nsprinkled her hull with their ghostly baptism.\n\nAs Ahab now glided from the dejected Delight, the strange life-buoy\nhanging at the Pequod's stern came into conspicuous relief.\n\n\"Ha! yonder! look yonder, men!\" cried a foreboding voice in her\nwake. \"In vain, oh, ye strangers, ye fly our sad burial; ye but turn\nus your taffrail to show us your coffin!\"\n\nCHAPTER 132 The Symphony.\n\nIt was a clear steel-blue day. The firmaments of air and sea were\nhardly separable in that all-pervading azure; only, the pensive air\nwas transparently pure and soft, with a woman's look, and the robust\nand man-like sea heaved with long, strong, lingering swells, as\nSamson's chest in his sleep.\n\nHither, and thither, on high, glided the snow-white wings of small,\nunspeckled birds; these were the gentle thoughts of the feminine air;\nbut to and fro in the deeps, far down in the bottomless blue, rushed\nmighty leviathans, sword-fish, and sharks; and these were the strong,\ntroubled, murderous thinkings of the masculine sea.\n\nBut though thus contrasting within, the contrast was only in shades\nand shadows without; those two seemed one; it was only the sex, as it\nwere, that distinguished them.\n\nAloft, like a royal czar and king, the sun seemed giving this gentle\nair to this bold and rolling sea; even as bride to groom. And at the\ngirdling line of the horizon, a soft and tremulous motion  most\nseen here at the Equator  denoted the fond, throbbing trust, the\nloving alarms, with which the poor bride gave her bosom away.\n\nTied up and twisted; gnarled and knotted with wrinkles; haggardly firm\nand unyielding; his eyes glowing like coals, that still glow in the\nashes of ruin; untottering Ahab stood forth in the clearness of the\nmorn; lifting his splintered helmet of a brow to the fair girl's\nforehead of heaven.\n\nOh, immortal infancy, and innocency of the azure! Invisible winged\ncreatures that frolic all round us! Sweet childhood of air and sky!\nhow oblivious were ye of old Ahab's close-coiled woe! But so have I\nseen little Miriam and Martha, laughing-eyed elves, heedlessly gambol\naround their old sire; sporting with the circle of singed locks which\ngrew on the marge of that burnt-out crater of his brain.\n\nSlowly crossing the deck from the scuttle, Ahab leaned over the side\nand watched how his shadow in the water sank and sank to his gaze, the\nmore and the more that he strove to pierce the profundity. But the\nlovely aromas in that enchanted air did at last seem to dispel, for a\nmoment, the cankerous thing in his soul. That glad, happy air, that\nwinsome sky, did at last stroke and caress him; the step-mother world,\nso long cruel  forbidding  now threw affectionate arms round his\nstubborn neck, and did seem to joyously sob over him, as if over one,\nthat however wilful and erring, she could yet find it in her heart to\nsave and to bless. From beneath his slouched hat Ahab dropped a tear\ninto the sea; nor did all the Pacific contain such wealth as that one\nwee drop.\n\nStarbuck saw the old man; saw him, how he heavily leaned over the\nside; and he seemed to hear in his own true heart the measureless\nsobbing that stole out of the centre of the serenity around. Careful\nnot to touch him, or be noticed by him, he yet drew near to him, and\nstood there.\n\nAhab turned.\n\n\"Starbuck!\"\n\n\"Sir.\"\n\n\"Oh, Starbuck! it is a mild, mild wind, and a mild looking sky. On\nsuch a day  very much such a sweetness as this  I struck my\nfirst whale  a boy-harpooneer of eighteen! Forty  forty \nforty years ago!  ago! Forty years of continual whaling! forty\nyears of privation, and peril, and storm-time! forty years on the\npitiless sea! for forty years has Ahab forsaken the peaceful land, for\nforty years to make war on the horrors of the deep! Aye and yes,\nStarbuck, out of those forty years I have not spent three ashore. When\nI think of this life I have led; the desolation of solitude it has\nbeen; the masoned, walled-town of a Captain's exclusiveness, which\nadmits but small entrance to any sympathy from the green country\nwithout  oh, weariness! heaviness! Guinea-coast slavery of solitary\ncommand!  when I think of all this; only half-suspected, not so\nkeenly known to me before  and how for forty years I have fed upon\ndry salted fare  fit emblem of the dry nourishment of my soil! \nwhen the poorest landsman has had fresh fruit to his daily hand, and\nbroken the world's fresh bread to my mouldy crusts  away, whole\noceans away, from that young girl-wife I wedded past fifty, and sailed\nfor Cape Horn the next day, leaving but one dent in my marriage pillow\n wife? wife?  rather a widow with her husband alive! Aye, I\nwidowed that poor girl when I married her, Starbuck; and then, the\nmadness, the frenzy, the boiling blood and the smoking brow, with\nwhich, for a thousand lowerings old Ahab has furiously, foamingly\nchased his prey  more a demon than a man!  aye, aye! what a\nforty years' fool  fool  old fool, has old Ahab been! Why this\nstrife of the chase? why weary, and palsy the arm at the oar, and the\niron, and the lance? how the richer or better is Ahab now? Behold. Oh,\nStarbuck! is it not hard, that with this weary load I bear, one poor\nleg should have been snatched from under me? Here, brush this old hair\naside; it blinds me, that I seem to weep. Locks so grey did never grow\nbut from out some ashes! But do I look very old, so very, very old,\nStarbuck? I feel deadly faint, bowed, and humped, as though I were\nAdam, staggering beneath the piled centuries since Paradise. God! God!\nGod!  crack my heart!  stave my brain!  mockery! mockery!\nbitter, biting mockery of grey hairs, have I lived enough joy to wear\nye; and seem and feel thus intolerably old? Close! stand close to me,\nStarbuck; let me look into a human eye; it is better than to gaze into\nsea or sky; better than to gaze upon God. By the green land; by the\nbright hearth-stone! this is the magic glass, man; I see my wife and\nmy child in thine eye. No, no; stay on board, on board!  lower not\nwhen I do; when branded Ahab gives chase to Moby Dick. That hazard\nshall not be thine. No, no! not with the far away home I see in that\neye!\"\n\n\"Oh, my Captain! my Captain! noble soul! grand old heart, after all!\nwhy should any one give chase to that hated fish! Away with me! let us\nfly these deadly waters! let us home! Wife and child, too, are\nStarbuck's  wife and child of his brotherly, sisterly, play-fellow\nyouth; even as thine, sir, are the wife and child of thy loving,\nlonging, paternal old age! Away! let us away!  this instant let me\nalter the course! How cheerily, how hilariously, O my Captain, would\nwe bowl on our way to see old Nantucket again! I think, sir, they have\nsome such mild blue days, even as this, in Nantucket.\"\n\n\"They have, they have. I have seen them  some summer days in the\nmorning. About this time  yes, it is his noon nap now  the boy\nvivaciously wakes; sits up in bed; and his mother tells him of me, of\ncannibal old me; how I am abroad upon the deep, but will yet come back\nto dance him again.\"\n\n\"'Tis my Mary, my Mary herself! She promised that my boy, every\nmorning, should be carried to the hill to catch the first glimpse of\nhis father's sail! Yes, yes! no more! it is done! we head for\nNantucket! Come, my Captain, study out the course, and let us away!\nSee, see! the boy's face from the window! the boy's hand on the hill!\"\n\nBut Ahab's glance was averted; like a blighted fruit tree he shook,\nand cast his last, cindered apple to the soil.\n\n\"What is it, what nameless, inscrutable, unearthly thing is it; what\ncozening, hidden lord and master, and cruel, remorseless emperor\ncommands me; that against all natural lovings and longings, I so keep\npushing, and crowding, and jamming myself on all the time; recklessly\nmaking me ready to do what in my own proper, natural heart, I durst\nnot so much as dare? Is Ahab, Ahab? Is it I, God, or who, that lifts\nthis arm? But if the great sun move not of himself; but is as an\nerrand-boy in heaven; nor one single star can revolve, but by some\ninvisible power; how then can this one small heart beat; this one\nsmall brain think thoughts; unless God does that beating, does that\nthinking, does that living, and not I. By heaven, man, we are turned\nround and round in this world, like yonder windlass, and Fate is the\nhandspike. And all the time, lo! that smiling sky, and this unsounded\nsea! Look! see yon Albicore! who put it into him to chase and fang\nthat flying-fish? Where do murderers go, man! Who's to doom, when the\njudge himself is dragged to the bar? But it is a mild, mild wind, and\na mild looking sky; and the air smells now, as if it blew from a\nfar-away meadow; they have been making hay somewhere under the slopes\nof the Andes, Starbuck, and the mowers are sleeping among the new-mown\nhay. Sleeping? Aye, toil we how we may, we all sleep at last on the\nfield. Sleep? Aye, and rust amid greenness; as last year's scythes\nflung down, and left in the half-cut swaths  Starbuck!\"\n\nBut blanched to a corpse's hue with despair, the Mate had stolen away.\n\nAhab crossed the deck to gaze over on the other side; but started at two reflected, fixed eyes in the water there. Fedallah was motionlessly leaning over the same rail.\n\nCHAPTER 133\nThe Chase  First Day.\n\nThat night, in the mid-watch, when the old man  as his wont at intervals  stepped forth from the scuttle in which he leaned, and went to his pivot-hole, he suddenly thrust out his face fiercely, snuffing up the sea air as a sagacious ship's dog will, in drawing nigh to some barbarous isle. He declared that a whale must be near. Soon that peculiar odor, sometimes to a great distance given forth by the living sperm whale, was palpable to all the watch; nor was any mariner surprised when, after inspecting the compass, and then the dog-vane, and then ascertaining the precise bearing of the odor as nearly as possible, Ahab rapidly ordered the ship's course to be slightly altered, and the sail to be shortened.\n\nThe acute policy dictating these movements was sufficiently vindicated at daybreak, by the sight of a long sleek on the sea directly and lengthwise ahead, smooth as oil, and resembling in the pleated watery wrinkles bordering it, the polished metallic-like marks of some swift tide-rip, at the mouth of a deep, rapid stream.\n\n\"Man the mast-heads! Call all hands!\"\n\nThundering with the butts of three clubbed handspikes on the forecastle deck, Daggoo roused the sleepers with such judgment claps that they seemed to exhale from the scuttle, so instantaneously did they appear with their clothes in their hands.\n\n\"What d'ye see?\" cried Ahab, flattening his face to the sky.\n\n\"Nothing, nothing sir!\" was the sound hailing down in reply.\n\n\"T'gallant sails!  stunsails! alow and aloft, and on both sides!\"\n\nAll sail being set, he now cast loose the life-line, reserved for swaying him to the main royal-mast head; and in a few moments they were hoisting him thither, when, while but two thirds of the way aloft, and while peering ahead through the horizontal vacancy between the main-top-sail and top-gallant-sail, he raised a gull-like cry in the air. \"There she blows!  there she blows! A hump like a snow-hill! It is Moby Dick!\"\n\nFired by the cry which seemed simultaneously taken up by the three look-outs, the men on deck rushed to the rigging to behold the famous whale they had so long been pursuing. Ahab had now gained his final perch, some feet above the other look-outs, Tashtego standing just beneath him on the cap of the top-gallant-mast, so that the Indian's head was almost on a level with Ahab's heel. From this height the whale was now seen some mile or so ahead, at every roll of the sea revealing his high sparkling hump, and regularly jetting his silent spout into the air. To the credulous mariners it seemed the same silent spout they had so long ago beheld in the moonlit Atlantic and Indian Oceans.\n\n\"And did none of ye see it before?\" cried Ahab, hailing the perched men all around him.\n\n\"I saw him almost that same instant, sir, that Captain Ahab did, and I cried out,\" said Tashtego.\n\n\"Not the same instant; not the same  no, the doubloon is mine, Fate reserved the doubloon for me. I only; none of ye could have raised the White Whale first. There she blows!  there she blows!  there she blows! There again!  there again!\" he cried, in long-drawn, lingering, methodic tones, attuned to the gradual prolongings of the whale's visible jets. \"He's going to sound! In stunsails! Down top-gallant-sails! Stand by three boats. Mr. Starbuck, remember, stay on board, and keep the ship. Helm there! Luff, luff a point! So; steady, man, steady! There go flukes! No, no; only black water! All ready the boats there? Stand by, stand by! Lower me, Mr. Starbuck; lower, lower,  quick, quicker!\" and he slid through the air to the deck.\n\n\"He is heading straight to leeward, sir,\" cried Stubb, \"right away from us; cannot have seen the ship yet.\"\n\n\"Be dumb, man! Stand by the braces! Hard down the helm!  brace up! Shiver her!  shiver her!  So; well that! Boats, boats!\"\n\nSoon all the boats but Starbuck's were dropped; all the boat-sails set  all the paddles plying; with rippling swiftness, shooting to leeward; and Ahab heading the onset. A pale, death-glimmer lit up Fedallah's sunken eyes; a hideous motion gnawed his mouth.\n\nLike noiseless nautilus shells, their light prows sped through the sea; but only slowly they neared the foe. As they neared him, the ocean grew still more smooth; seemed drawing a carpet over its waves; seemed a noon-meadow, so serenely it spread. At length the breathless hunter came so nigh his seemingly unsuspecting prey, that his entire dazzling hump was distinctly visible, sliding along the sea as if an isolated thing, and continually set in a revolving ring of finest, fleecy, greenish foam. He saw the vast, involved wrinkles of the slightly projecting head beyond. Before it, far out on the soft Turkish-rugged waters, went the glistening white shadow from his broad, milky forehead, a musical rippling playfully accompanying the shade; and behind, the blue waters interchangeably flowed over into the moving valley of his steady wake; and on either hand bright bubbles arose and danced by his side. But these were broken again by the light toes of hundreds of gay fowl softly feathering the sea, alternate with their fitful flight; and like to some flag-staff rising from the painted hull of an argosy, the tall but shattered pole of a recent lance projected from the white whale's back; and at intervals one of the cloud of soft-toed fowls hovering, and to and fro skimming like a canopy over the fish, silently perched and rocked on this pole, the long tail feathers streaming like pennons.\n\nA gentle joyousness  a mighty mildness of repose in swiftness, invested the gliding whale. Not the white bull Jupiter swimming away with ravished Europa clinging to his graceful horns; his lovely, leering eyes sideways intent upon the maid; with smooth bewitching fleetness, rippling straight for the nuptial bower in Crete; not Jove, not that great majesty Supreme! did surpass the glorified White Whale as he so divinely swam.\n\nOn each soft side  coincident with the parted swell, that but once leaving him, then flowed so wide away  on each bright side, the whale shed off enticings. No wonder there had been some among the hunters who namelessly transported and allured by all this serenity, had ventured to assail it; but had fatally found that quietude but the vesture of tornadoes. Yet calm, enticing calm, oh, whale! thou glidest on, to all who for the first time eye thee, no matter how many in that same way thou may'st have bejuggled and destroyed before.\n\nAnd thus, through the serene tranquillities of the tropical sea, among waves whose hand-clappings were suspended by exceeding rapture, Moby Dick moved on, still withholding from sight the full terrors of his submerged trunk, entirely hiding the wrenched hideousness of his jaw. But soon the fore part of him slowly rose from the water; for an instant his whole marbleized body formed a high arch, like Virginia's Natural Bridge, and warningly waving his bannered flukes in the air, the grand god revealed himself, sounded, and went out of sight. Hoveringly halting, and dipping on the wing, the white sea-fowls longingly lingered over the agitated pool that he left.\n\nWith oars apeak, and paddles down, the sheets of their sails adrift, the three boats now stilly floated, awaiting Moby Dick's reappearance.\n\n\"An hour,\" said Ahab, standing rooted in his boat's stern; and he gazed beyond the whale's place, towards the dim blue spaces and wide wooing vacancies to leeward. It was only an instant; for again his eyes seemed whirling round in his head as he swept the watery circle. The breeze now freshened; the sea began to swell.\n\n\"The birds!  the birds!\" cried Tashtego.\n\nIn long Indian file, as when herons take wing, the white birds were now all flying towards Ahab's boat; and when within a few yards began fluttering over the water there, wheeling round and round, with joyous, expectant cries. Their vision was keener than man's; Ahab could discover no sign in the sea. But suddenly as he peered down and down into its depths, he profoundly saw a white living spot no bigger than a white weasel, with wonderful celerity uprising, and magnifying as it rose, till it turned, and then there were plainly revealed two long crooked rows of white, glistening teeth, floating up from the undiscoverable bottom. It was Moby Dick's open mouth and scrolled jaw; his vast, shadowed bulk still half blending with the blue of the sea. The glittering mouth yawned beneath the boat like an open-doored marble tomb; and giving one sidelong sweep with his steering oar, Ahab whirled the craft aside from this tremendous apparition. Then, calling upon Fedallah to change places with him, went forward to the bows, and seizing Perth's harpoon, commanded his crew to grasp their oars and stand by to stern.\n\nNow, by reason of this timely spinning round the boat upon its axis, its bow, by anticipation, was made to face the whale's head while yet under water. But as if perceiving this stratagem, Moby Dick, with that malicious intelligence ascribed to him, sidelingly transplanted himself, as it were, in an instant, shooting his pleated head lengthwise beneath the boat.\n\nThrough and through; through every plank and each rib, it thrilled for an instant, the whale obliquely lying on his back, in the manner of a biting shark, slowly and feelingly taking its bows full within his mouth, so that the long, narrow, scrolled lower jaw curled high up into the open air, and one of the teeth caught in a row-lock. The bluish pearl-white of the inside of the jaw was within six inches of Ahab's head, and reached higher than that. In this attitude the White Whale now shook the slight cedar as a mildly cruel cat her mouse. With unastonished eyes Fedallah gazed, and crossed his arms; but the tiger-yellow crew were tumbling over each other's heads to gain the uttermost stern.\n\nAnd now, while both elastic gunwales were springing in and out, as the whale dallied with the doomed craft in this devilish way; and from his body being submerged beneath the boat, he could not be darted at from the bows, for the bows were almost inside of him, as it were; and while the other boats involuntarily paused, as before a quick crisis impossible to withstand, then it was that monomaniac Ahab, furious with this tantalizing vicinity of his foe, which placed him all alive and helpless in the very jaws he hated; frenzied with all this, he seized the long bone with his naked hands, and wildly strove to wrench it from its gripe. As now he thus vainly strove, the jaw slipped from him; the frail gunwales bent in, collapsed, and snapped, as both jaws, like an enormous shears, sliding further aft, bit the craft completely in twain, and locked themselves fast again in the sea, midway between the two floating wrecks. These floated aside, the broken ends drooping, the crew at the stern-wreck clinging to the gunwales, and striving to hold fast to the oars to lash them across.\n\nAt that preluding moment, ere the boat was yet snapped, Ahab, the first to perceive the whale's intent, by the crafty upraising of his head, a movement that loosed his hold for the time; at that moment his hand had made one final effort to push the boat out of the bite. But only slipping further into the whale's mouth, and tilting over sideways as it slipped, the boat had shaken off his hold on the jaw; spilled him out of it, as he leaned to the push; and so he fell flat-faced upon the sea.\n\nRipplingly withdrawing from his prey, Moby Dick now lay at a little distance, vertically thrusting his oblong white head up and down in the billows; and at the same time slowly revolving his whole spindled body; so that when his vast wrinkled forehead rose  some twenty or more feet out of the water  the now rising swells, with all their confluent waves, dazzlingly broke against it; vindictively tossing their shivered spray still higher into the air. So, in a gale, the but half baffled Channel billows only recoil from the base of the Eddystone, triumphantly to overleap its summit with their scud.\n\nBut soon resuming his horizontal attitude, Moby Dick swam swiftly round and round the wrecked crew; sideways churning the water in his vengeful wake, as if lashing himself up to still another and more deadly assault. The sight of the splintered boat seemed to madden him, as the blood of grapes and mulberries cast before Antiochus's elephants in the book of Maccabees. Meanwhile Ahab half smothered in the foam of the whale's insolent tail, and too much of a cripple to swim,  though he could still keep afloat, even in the heart of such a whirlpool as that; helpless Ahab's head was seen, like a tossed bubble which the least chance shock might burst. From the boat's fragmentary stern, Fedallah incuriously and mildly eyed him; the clinging crew, at the other drifting end, could not succor him; more than enough was it for them to look to themselves. For so revolvingly appalling was the White Whale's aspect, and so planetarily swift the ever-contracting circles he made, that he seemed horizontally swooping upon them. And though the other boats, unharmed, still hovered hard by; still they dared not pull into the eddy to strike, lest that should be the signal for the instant destruction of the jeopardized castaways, Ahab and all; nor in that case could they themselves hope to escape. With straining eyes, then, they remained on the outer edge of the direful zone, whose centre had now become the old man's head.\n\nMeantime, from the beginning all this had been descried from the ship's mast heads; and squaring her yards, she had borne down upon the scene; and was now so nigh, that Ahab in the water hailed her!  \"Sail on the\"  but that moment a breaking sea dashed on him from Moby Dick, and whelmed him for the time. But struggling out of it again, and chancing to rise on a towering crest, he shouted,  \"Sail on the whale!  Drive him off!\"\n\nThe Pequod's prows were pointed; and breaking up the charmed circle, she effectually parted the white whale from his victim. As he sullenly swam off, the boats flew to the rescue.\n\nDragged into Stubb's boat with blood-shot, blinded eyes, the white brine caking in his wrinkles; the long tension of Ahab's bodily strength did crack, and helplessly he yielded to his body's doom: for a time, lying all crushed in the bottom of Stubb's boat, like one trodden under foot of herds of elephants. Far inland, nameless wails came from him, as desolate sounds from out ravines.\n\nBut this intensity of his physical prostration did but so much the more abbreviate it. In an instant's compass, great hearts sometimes condense to one deep pang, the sum total of those shallow pains kindly diffused through feebler men's whole lives. And so, such hearts, though summary in each one suffering; still, if the gods decree it, in their life-time aggregate a whole age of woe, wholly made up of instantaneous intensities; for even in their pointless centres, those noble natures contain the entire circumferences of inferior souls.\n\n\"The harpoon,\" said Ahab, half way rising, and draggingly leaning on one bended arm  \"is it safe?\"\n\n\"Aye, sir, for it was not darted; this is it,\" said Stubb, showing it.\n\n\"Lay it before me;  any missing men?\"\n\n\"One, two, three, four, five;  there were five oars, sir, and here are five men.\"\n\n\"That's good.  Help me, man; I wish to stand. So, so, I see him! there! there! going to leeward still; what a leaping spout!  Hands off from me! The eternal sap runs up in Ahab's bones again! Set the sail; out oars; the helm!\"\n\nIt is often the case that when a boat is stove, its crew, being picked up by another boat, help to work that second boat; and the chase is thus continued with what is called double-banked oars. It was thus now. But the added power of the boat did not equal the added power of the whale, for he seemed to have treble-banked his every fin; swimming with a velocity which plainly showed, that if now, under these circumstances, pushed on, the chase would prove an indefinitely prolonged, if not a hopeless one; nor could any crew endure for so long a period, such an unintermitted, intense straining at the oar; a thing barely tolerable only in some one brief vicissitude. The ship itself, then, as it sometimes happens, offered the most promising intermediate means of overtaking the chase. Accordingly, the boats now made for her, and were soon swayed up to their cranes  the two parts of the wrecked boat having been previously secured by her  and then hoisting everything to her side, and stacking her canvas high up, and sideways outstretching it with stun-sails, like the double-jointed wings of an albatross; the Pequod bore down in the leeward wake of Moby-Dick. At the well known, methodic intervals, the whale's glittering spout was regularly announced from the manned mast-heads; and when he would be reported as just gone down, Ahab would take the time, and then pacing the deck, binnacle-watch in hand, so soon as the last second of the allotted hour expired, his voice was heard.  \"Whose is the doubloon now? D'ye see him?\" and if the reply was, No, sir! straightway he commanded them to lift him to his perch. In this way the day wore on; Ahab, now aloft and motionless; anon, unrestingly pacing the planks.\n\nAs he was thus walking, uttering no sound, except to hail the men aloft, or to bid them hoist a sail still higher, or to spread one to a still greater breadth  thus to and fro pacing, beneath his slouched hat, at every turn he passed his own wrecked boat, which had been dropped upon the quarter-deck, and lay there reversed; broken bow to shattered stern. At last he paused before it; and as in an already over-clouded sky fresh troops of clouds will sometimes sail across, so over the old man's face there now stole some such added gloom as this.\n\nStubb saw him pause; and perhaps intending, not vainly, though, to evince his own unabated fortitude, and thus keep up a valiant place in his Captain's mind, he advanced, and eyeing the wreck exclaimed  \"The thistle the ass refused; it pricked his mouth too keenly, sir; ha! ha!\"\n\n\"What soulless thing is this that laughs before a wreck? Man, man! did I not know thee brave as fearless fire (and as mechanical) I could swear thou wert a poltroon. Groan nor laugh should be heard before a wreck.\"\n\n\"Aye, sir,\" said Starbuck drawing near, \"'tis a solemn sight; an omen, and an ill one.\"\n\n\"Omen? omen?  the dictionary! If the gods think to speak outright to man, they will honourably speak outright; not shake their heads, and give an old wives' darkling hint.  Begone! Ye two are the opposite poles of one thing; Starbuck is Stubb reversed, and Stubb is Starbuck; and ye two are all mankind; and Ahab stands alone among the millions of the peopled earth, nor gods nor men his neighbors! Cold, cold  I shiver!  How now? Aloft there! D'ye see him? Sing out for every spout, though he spout ten times a second!\"\n\nThe day was nearly done; only the hem of his golden robe was rustling. Soon, it was almost dark, but the look-out men still remained unset.\n\n\"Can't see the spout now, sir;  too dark\"  cried a voice from the air.\n\n\"How heading when last seen?\"\n\n\"As before, sir,  straight to leeward.\"\n\n\"Good! he will travel slower now 'tis night. Down royals and top-gallant stun-sails, Mr. Starbuck. We must not run over him before morning; he's making a passage now, and may heave-to a while. Helm there! keep her full before the wind!  Aloft! come down!  Mr. Stubb, send a fresh hand to the fore-mast head, and see it manned till morning.\"  Then advancing towards the doubloon in the main-mast  \"Men, this gold is mine, for I earned it; but I shall let it abide here till the White Whale is dead; and then, whosoever of ye first raises him, upon the day he shall be killed, this gold is that man's; and if on that day I shall again raise him, then, ten times its sum shall be divided among all of ye! Away now!  the deck is thine, sir!\"\n\nAnd so saying, he placed himself half way within the scuttle, and slouching his hat, stood there till dawn, except when at intervals rousing himself to see how the night wore on.\n\n This motion is peculiar to the sperm whale. It receives its designation (pitchpoling) from its being likened to that preliminary up-and-down poise of the whale-lance, in the exercise called pitchpoling, previously described. By this motion the whale must best and most comprehensively view whatever objects may be encircling him.\n\nCHAPTER 134\nThe Chase  Second Day.\n\nAt day-break, the three mast-heads were punctually manned afresh.\n\n\"D'ye see him?\" cried Ahab after allowing a little space for the light to spread.\n\n\"See nothing, sir.\"\n\n\"Turn up all hands and make sail! he travels faster than I thought for;  the top-gallant sails!  aye, they should have been kept on her all night. But no matter  'tis but resting for the rush.\"\n\nHere be it said, that this pertinacious pursuit of one particular whale, continued through day into night, and through night into day, is a thing by no means unprecedented in the South sea fishery. For such is the wonderful skill, prescience of experience, and invincible confidence acquired by some great natural geniuses among the Nantucket commanders; that from the simple observation of a whale when last descried, they will, under certain given circumstances, pretty accurately foretell both the direction in which he will continue to swim for a time, while out of sight, as well as his probable rate of progression during that period. And, in these cases, somewhat as a pilot, when about losing sight of a coast, whose general trending he well knows, and which he desires shortly to return to again, but at some further point; like as this pilot stands by his compass, and takes the precise bearing of the cape at present visible, in order the more certainly to hit aright the remote, unseen headland, eventually to be visited: so does the fisherman, at his compass, with the whale; for after being chased, and diligently marked, through several hours of daylight, then, when night obscures the fish, the creature's future wake through the darkness is almost as established to the sagacious mind of the hunter, as the pilot's coast is to him. So that to this hunter's wondrous skill, the proverbial evanescence of a thing writ in water, a wake, is to all desired purposes well nigh as reliable as the steadfast land. And as the mighty iron Leviathan of the modern railway is so familiarly known in its every pace, that, with watches in their hands, men time his rate as doctors that of a baby's pulse; and lightly say of it, the up train or the down train will reach such or such a spot, at such or such an hour; even so, almost, there are occasions when these Nantucketers time that other Leviathan of the deep, according to the observed humor of his speed; and say to themselves, so many hours hence this whale will have gone two hundred miles, will have about reached this or that degree of latitude or longitude. But to render this acuteness at all successful in the end, the wind and the sea must be the whaleman's allies; for of what present avail to the becalmed or windbound mariner is the skill that assures him he is exactly ninety-three leagues and a quarter from his port? Inferable from these statements, are many collateral subtile matters touching the chase of whales.\n\nThe ship tore on; leaving such a furrow in the sea as when a cannon-ball, missent, becomes a plough-share and turns up the level field.\n\n\"By salt and hemp!\" cried Stubb, \"but this swift motion of the deck creeps up one's legs and tingles at the heart. This ship and I are two brave fellows!  Ha, ha! Some one take me up, and launch me, spine-wise, on the sea,  for by live-oaks! my spine's a keel. Ha, ha! we go the gait that leaves no dust behind!\"\n\n\"There she blows  she blows!  she blows!  right ahead!\" was now the mast-head cry.\n\n\"Aye, aye!\" cried Stubb, \"I knew it  ye can't escape  blow on and split your spout, O whale! the mad fiend himself is after ye! blow your trump  blister your lungs!  Ahab will dam off your blood, as a miller shuts his watergate upon the stream!\"\n\nAnd Stubb did but speak out for well nigh all that crew. The frenzies of the chase had by this time worked them bubblingly up, like old wine worked anew. Whatever pale fears and forebodings some of them might have felt before; these were not only now kept out of sight through the growing awe of Ahab, but they were broken up, and on all sides routed, as timid prairie hares that scatter before the bounding bison. The hand of Fate had snatched all their souls; and by the stirring perils of the previous day; the rack of the past night's suspense; the fixed, unfearing, blind, reckless way in which their wild craft went plunging towards its flying mark; by all these things, their hearts were bowled along. The wind that made great bellies of their sails, and rushed the vessel on by arms invisible as irresistible; this seemed the symbol of that unseen agency which so enslaved them to the race.\n\nThey were one man, not thirty. For as the one ship that held them all; though it was put together of all contrasting things  oak, and maple, and pine wood; iron, and pitch, and hemp  yet all these ran into each other in the one concrete hull, which shot on its way, both balanced and directed by the long central keel; even so, all the individualities of the crew, this man's valor, that man's fear; guilt and guiltiness, all varieties were welded into oneness, and were all directed to that fatal goal which Ahab their one lord and keel did point to.\n\nThe rigging lived. The mast-heads, like the tops of tall palms, were outspreadingly tufted with arms and legs. Clinging to a spar with one hand, some reached forth the other with impatient wavings; others, shading their eyes from the vivid sunlight, sat far out on the rocking yards; all the spars in full bearing of mortals, ready and ripe for their fate. Ah! how they still strove through that infinite blueness to seek out the thing that might destroy them!\n\n\"Why sing ye not out for him, if ye see him?\" cried Ahab, when, after the lapse of some minutes since the first cry, no more had been heard. \"Sway me up, men; ye have been deceived; not Moby Dick casts one odd jet that way, and then disappears.\"\n\nIt was even so; in their headlong eagerness, the men had mistaken some other thing for the whale-spout, as the event itself soon proved; for hardly had Ahab reached his perch; hardly was the rope belayed to its pin on deck, when he struck the key-note to an orchestra, that made the air vibrate as with the combined discharges of rifles. The triumphant halloo of thirty buckskin lungs was heard, as  much nearer to the ship than the place of the imaginary jet, less than a mile ahead  Moby Dick bodily burst into view! For not by any calm and indolent spoutings; not by the peaceable gush of that mystic fountain in his head, did the White Whale now reveal his vicinity; but by the far more wondrous phenomenon of breaching. Rising with his utmost velocity from the furthest depths, the Sperm Whale thus booms his entire bulk into the pure element of air, and piling up a mountain of dazzling foam, shows his place to the distance of seven miles and more. In those moments, the torn, enraged waves he shakes off, seem his mane; in some cases, this breaching is his act of defiance.\n\n\"There she breaches! there she breaches!\" was the cry, as in his immeasurable bravadoes the White Whale tossed himself salmon-like to Heaven. So suddenly seen in the blue plain of the sea, and relieved against the still bluer margin of the sky, the spray that he raised, for the moment, intolerably glittered and glared like a glacier; and stood there gradually fading and fading away from its first sparkling intensity, to the dim mistiness of an advancing shower in a vale.\n\n\"Aye, breach your last to the sun, Moby Dick!\" cried Ahab, \"thy hour and thy harpoon are at hand!  Down! down all of ye, but one man at the fore. The boats!  stand by!\"\n\nUnmindful of the tedious rope-ladders of the shrouds, the men, like shooting stars, slid to the deck, by the isolated backstays and halyards; while Ahab, less dartingly, but still rapidly was dropped from his perch.\n\n\"Lower away,\" he cried, so soon as he had reached his boat  a spare one, rigged the afternoon previous. \"Mr. Starbuck, the ship is thine  keep away from the boats, but keep near them. Lower, all!\"\n\nAs if to strike a quick terror into them, by this time being the first assailant himself, Moby Dick had turned, and was now coming for the three crews. Ahab's boat was central; and cheering his men, he told them he would take the whale head-and-head,  that is, pull straight up to his forehead,  a not uncommon thing; for when within a certain limit, such a course excludes the coming onset from the whale's sidelong vision. But ere that close limit was gained, and while yet all three boats were plain as the ship's three masts to his eye; the White Whale churning himself into furious speed, almost in an instant as it were, rushing among the boats with open jaws, and a lashing tail, offered appalling battle on every side; and heedless of the irons darted at him from every boat, seemed only intent on annihilating each separate plank of which those boats were made. But skilfully manoeuvred, incessantly wheeling like trained chargers in the field; the boats for a while eluded him; though, at times, but by a plank's breadth; while all the time, Ahab's unearthly slogan tore every other cry but his to shreds.\n\nBut at last in his untraceable evolutions, the White Whale so crossed and recrossed, and in a thousand ways entangled the slack of the three lines now fast to him, that they foreshortened, and, of themselves, warped the devoted boats towards the planted irons in him; though now for a moment the whale drew aside a little, as if to rally for a more tremendous charge. Seizing that opportunity, Ahab first paid out more line: and then was rapidly hauling and jerking in upon it again  hoping that way to disencumber it of some snarls  when lo!  a sight more savage than the embattled teeth of sharks!\n\nCaught and twisted  corkscrewed in the mazes of the line, loose harpoons and lances, with all their bristling barbs and points, came flashing and dripping up to the chocks in the bows of Ahab's boat. Only one thing could be done. Seizing the boat-knife, he critically reached within  through  and then, without  the rays of steel; dragged in the line beyond, passed it, inboard, to the bowsman, and then, twice sundering the rope near the chocks  dropped the intercepted fagot of steel into the sea; and was all fast again. That instant, the White Whale made a sudden rush among the remaining tangles of the other lines; by so doing, irresistibly dragged the more involved boats of Stubb and Flask towards his flukes; dashed them together like two rolling husks on a surf-beaten beach, and then, diving down into the sea, disappeared in a boiling maelstrom, in which, for a space, the odorous cedar chips of the wrecks danced round and round, like the grated nutmeg in a swiftly stirred bowl of punch.\n\nWhile the two crews were yet circling in the waters, reaching out after the revolving line-tubs, oars, and other floating furniture, while aslope little Flask bobbed up and down like an empty vial, twitching his legs upwards to escape the dreaded jaws of sharks; and Stubb was lustily singing out for some one to ladle him up; and while the old man's line  now parting  admitted of his pulling into the creamy pool to rescue whom he could;  in that wild simultaneousness of a thousand concreted perils,  Ahab's yet unstricken boat seemed drawn up towards Heaven by invisible wires,  as, arrow-like, shooting perpendicularly from the sea, the White Whale dashed his broad forehead against its bottom, and sent it, turning over and over, into the air; till it fell again  gunwale downwards  and Ahab and his men struggled out from under it, like seals from a sea-side cave.\n\nThe first uprising momentum of the whale  modifying its direction as he struck the surface  involuntarily launched him along it, to a little distance from the centre of the destruction he had made; and with his back to it, he now lay for a moment slowly feeling with his flukes from side to side; and whenever a stray oar, bit of plank, the least chip or crumb of the boats touched his skin, his tail swiftly drew back, and came sideways smiting the sea. But soon, as if satisfied that his work for that time was done, he pushed his pleated forehead through the ocean, and trailing after him the intertangled lines, continued his leeward way at a traveller's methodic pace.\n\nAs before, the attentive ship having descried the whole fight, again came bearing down to the rescue, and dropping a boat, picked up the floating mariners, tubs, oars, and whatever else could be caught at, and safely landed them on her decks. Some sprained shoulders, wrists, and ankles; livid contusions; wrenched harpoons and lances; inextricable intricacies of rope; shattered oars and planks; all these were there; but no fatal or even serious ill seemed to have befallen any one. As with Fedallah the day before, so Ahab was now found grimly clinging to his boat's broken half, which afforded a comparatively easy float; nor did it so exhaust him as the previous day's mishap.\n\nBut when he was helped to the deck, all eyes were fastened upon him; as instead of standing by himself he still half-hung upon the shoulder of Starbuck, who had thus far been the foremost to assist him. His ivory leg had been snapped off, leaving but one short sharp splinter.\n\n\"Aye, aye, Starbuck, 'tis sweet to lean sometimes, be the leaner who he will; and would old Ahab had leaned oftener than he has.\"\n\n\"The ferrule has not stood, sir,\" said the carpenter, now coming up; \"I put good work into that leg.\"\n\n\"But no bones broken, sir, I hope,\" said Stubb with true concern.\n\n\"Aye! and all splintered to pieces, Stubb!  d'ye see it.  But even with a broken bone, old Ahab is untouched; and I account no living bone of mine one jot more me, than this dead one that's lost. Nor white whale, nor man, nor fiend, can so much as graze old Ahab in his own proper and inaccessible being. Can any lead touch yonder floor, any mast scrape yonder roof?  Aloft there! which way?\"\n\n\"Dead to leeward, sir.\"\n\n\"Up helm, then; pile on the sail again, ship keepers! down the rest of the spare boats and rig them  Mr. Starbuck away, and muster the boat's crews.\"\n\n\"Let me first help thee towards the bulwarks, sir.\"\n\n\"Oh, oh, oh! how this splinter gores me now! Accursed fate! that the unconquerable captain in the soul should have such a craven mate!\"\n\n\"Sir?\"\n\n\"My body, man, not thee. Give me something for a cane  there, that shivered lance will do. Muster the men. Surely I have not seen him yet. By heaven it cannot be!  missing?  quick! call them all.\"\n\nThe old man's hinted thought was true. Upon mustering the company, the Parsee was not there.\n\n\"The Parsee!\" cried Stubb  \"he must have been caught in  \"\n\n\"The black vomit wrench thee!  run all of ye above, alow, cabin, forecastle  find him  not gone  not gone!\"\n\nBut quickly they returned to him with the tidings that the Parsee was nowhere to be found.\n\n\"Aye, sir,\" said Stubb  \"caught among the tangles of your line  I thought I saw him dragging under.\"\n\n\"My line! My line? Gone?  gone? What means that little word?  What death-knell rings in it, that old Ahab shakes as if he were the belfry. The harpoon, too!  toss over the litter there,  d'ye see it?  the forged iron, men, the white whale's  no, no, no,  blistered fool! this hand did dart it!  'tis in the fish!  Aloft there! Keep him nailed  Quick!  all hands to the rigging of the boats  collect the oars  harpooneers! the irons, the irons!  hoist the royals higher  a pull on all the sheets!  helm there! steady, steady for your life! I'll ten times girdle the unmeasured globe; yea and dive straight through it, but I'll slay him yet!\n\n\"Great God! but for one single instant show thyself,\" cried Starbuck; \"never, never wilt thou capture him, old man  In Jesus' name no more of this, that's worse than devil's madness. Two days chased; twice stove to splinters; thy very leg once more snatched from under thee; thy evil shadow gone  all good angels mobbing thee with warnings:  what more wouldst thou have?  Shall we keep chasing this murderous fish till he swamps the last man? Shall we be dragged by him to the bottom of the sea? Shall we be towed by him to the infernal world? Oh, oh,  Impiety and blasphemy to hunt him more!\"\n\n\"Starbuck, of late I've felt strangely moved to thee; ever since that hour we both saw  thou know'st what, in one another's eyes. But in this matter of the whale, be the front of thy face to me as the palm of this hand  a lipless, unfeatured blank. Ahab is for ever Ahab, man. This whole act's immutably decreed. 'Twas rehearsed by thee and me a billion years before this ocean rolled. Fool! I am the Fates' lieutenant; I act under orders. Look thou, underling! that thou obeyest mine.  Stand round me, men. Ye see an old man cut down to the stump; leaning on a shivered lance; propped up on a lonely foot. 'Tis Ahab  his body's part; but Ahab's soul's a centipede, that moves upon a hundred legs. I feel strained, half stranded, as ropes that tow dismasted frigates in a gale; and I may look so. But ere I break, yell hear me crack; and till ye hear that, know that Ahab's hawser tows his purpose yet. Believe ye, men, in the things called omens? Then laugh aloud, and cry encore! For ere they drown, drowning things will twice rise to the surface; then rise again, to sink for evermore. So with Moby Dick  two days he's floated  tomorrow will be the third. Aye, men, he'll rise once more,  but only to spout his last! D'ye feel brave men, brave?\"\n\n\"As fearless fire,\" cried Stubb.\n\n\"And as mechanical,\" muttered Ahab. Then as the men went forward, he muttered on: \"The things called omens! And yesterday I talked the same to Starbuck there, concerning my broken boat. Oh! how valiantly I seek to drive out of others' hearts what's clinched so fast in mine!  The Parsee  the Parsee!  gone, gone? and he was to go before:  but still was to be seen again ere I could perish  How's that?  There's a riddle now might baffle all the lawyers backed by the ghosts of the whole line of judges:  like a hawk's beak it pecks my brain. I'll, I'll solve it, though!\"\n\nWhen dusk descended, the whale was still in sight to leeward.\n\nSo once more the sail was shortened, and everything passed nearly as on the previous night; only, the sound of hammers, and the hum of the grindstone was heard till nearly daylight, as the men toiled by lanterns in the complete and careful rigging of the spare boats and sharpening their fresh weapons for the morrow. Meantime, of the broken keel of Ahab's wrecked craft the carpenter made him another leg; while still as on the night before, slouched Ahab stood fixed within his scuttle; his hid, heliotrope glance anticipatingly gone backward on its dial; sat due eastward for the earliest sun.\n\nCHAPTER 135\nThe Chase.  Third Day.\n\nThe morning of the third day dawned fair and fresh, and once more the solitary night-man at the fore-mast-head was relieved by crowds of the daylight look-outs, who dotted every mast and almost every spar.\n\n\"D'ye see him?\" cried Ahab; but the whale was not yet in sight.\n\n\"In his infallible wake, though; but follow that wake, that's all. Helm there; steady, as thou goest, and hast been going. What a lovely day again! were it a new-made world, and made for a summer-house to the angels, and this morning the first of its throwing open to them, a fairer day could not dawn upon that world. Here's food for thought, had Ahab time to think; but Ahab never thinks; he only feels, feels, feels; that's tingling enough for mortal man! to think's audacity. God only has that right and privilege. Thinking is, or ought to be, a coolness and a calmness; and our poor hearts throb, and our poor brains beat too much for that. And yet, I've sometimes thought my brain was very calm  frozen calm, this old skull cracks so, like a glass in which the contents turned to ice, and shiver it. And still this hair is growing now; this moment growing, and heat must breed it; but no, it's like that sort of common grass that will grow anywhere, between the earthy clefts of Greenland ice or in Vesuvius lava. How the wild winds blow it; they whip it about me as the torn shreds of split sails lash the tossed ship they cling to. A vile wind that has no doubt blown ere this through prison corridors and cells, and wards of hospitals, and ventilated them, and now comes blowing hither as innocent as fleeces. Out upon it!  it's tainted. Were I the wind, I'd blow no more on such a wicked, miserable world. I'd crawl somewhere to a cave, and slink there. And yet, 'tis a noble and heroic thing, the wind! who ever conquered it? In every fight it has the last and bitterest blow. Run tilting at it, and you but run through it. Ha! a coward wind that strikes stark naked men, but will not stand to receive a single blow. Even Ahab is a braver thing  a nobler thing than that. Would now the wind but had a body; but all the things that most exasperate and outrage mortal man, all these things are bodiless, but only bodiless as objects, not as agents. There's a most special, a most cunning, oh, a most malicious difference! And yet, I say again, and swear it now, that there's something all glorious and gracious in the wind. These warm Trade Winds, at least, that in the clear heavens blow straight on, in strong and steadfast, vigorous mildness; and veer not from their mark, however the baser currents of the sea may turn and tack, and mightiest Mississippies of the land swift and swerve about, uncertain where to go at last. And by the eternal Poles! these same Trades that so directly blow my good ship on; these Trades, or something like them  something so unchangeable, and full as strong, blow my keeled soul along! To it! Aloft there! What d'ye see?\"\n\n\"Nothing, sir.\"\n\n\"Nothing! and noon at hand! The doubloon goes a-begging! See the sun! Aye, aye, it must be so. I've oversailed him. How, got the start? Aye, he's chasing me now; not I, him  that's bad; I might have known it, too. Fool! the lines  the harpoons he's towing. Aye, aye, I have run him by last night. About! about! Come down, all of ye, but the regular look outs! Man the braces!\"\n\nSteering as she had done, the wind had been somewhat on the Pequod's quarter, so that now being pointed in the reverse direction, the braced ship sailed hard upon the breeze as she rechurned the cream in her own white wake.\n\n\"Against the wind he now steers for the open jaw,\" murmured Starbuck to himself, as he coiled the new-hauled main-brace upon the rail. \"God keep us, but already my bones feel damp within me, and from the inside wet my flesh. I misdoubt me that I disobey my God in obeying him!\"\n\n\"Stand by to sway me up!\" cried Ahab, advancing to the hempen basket. \"We should meet him soon.\"\n\n\"Aye, aye, sir,\" and straightway Starbuck did Ahab's bidding, and once more Ahab swung on high.\n\nA whole hour now passed; gold-beaten out to ages. Time itself now held long breaths with keen suspense. But at last, some three points off the weather bow, Ahab descried the spout again, and instantly from the three mast-heads three shrieks went up as if the tongues of fire had voiced it.\n\n\"Forehead to forehead I meet thee, this third time, Moby Dick! On deck there!  brace sharper up; crowd her into the wind's eye. He's too far off to lower yet, Mr. Starbuck. The sails shake! Stand over that helmsman with a top-maul! So, so; he travels fast, and I must down. But let me have one more good round look aloft here at the sea; there's time for that. An old, old sight, and yet somehow so young; aye, and not changed a wink since I first saw it, a boy, from the sand-hills of Nantucket! The same!  the same!  the same to Noah as to me. There's a soft shower to leeward. Such lovely leewardings! They must lead somewhere  to something else than common land, more palmy than the palms. Leeward! the white whale goes that way; look to windward, then; the better if the bitterer quarter. But good bye, good bye, old mast-head! What's this?  green? aye, tiny mosses in these warped cracks. No such green weather stains on Ahab's head! There's the difference now between man's old age and matter's. But aye, old mast, we both grow old together; sound in our hulls, though, are we not, my ship? Aye, minus a leg, that's all. By heaven this dead wood has the better of my live flesh every way. I can't compare with it; and I've known some ships made of dead trees outlast the lives of men made of the most vital stuff of vital fathers. What's that he said? he should still go before me, my pilot; and yet to be seen again? But where? Will I have eyes at the bottom of the sea, supposing I descend those endless stairs? and all night I've been sailing from him, wherever he did sink to. Aye, aye, like many more thou told'st direful truth as touching thyself, O Parsee; but, Ahab, there thy shot fell short. Good-bye, mast-head  keep a good eye upon the whale, the while I'm gone. We'll talk to-morrow, nay, to-night, when the white whale lies down there, tied by head and tail.\"\n\nHe gave the word; and still gazing round him, was steadily lowered through the cloven blue air to the deck.\n\nIn due time the boats were lowered; but as standing in his shallop's stern, Ahab just hovered upon the point of the descent, he waved to the mate,  who held one of the tackle-ropes on deck  and bade him pause.\n\n\"Starbuck!\"\n\n\"Sir?\"\n\n\"For the third time my soul's ship starts upon this voyage, Starbuck.\"\n\n\"Aye, sir, thou wilt have it so.\"\n\n\"Some ships sail from their ports, and ever afterwards are missing, Starbuck!\"\n\n\"Truth, sir: saddest truth.\"\n\n\"Some men die at ebb tide; some at low water; some at the full of the flood;  and I feel now like a billow that's all one crested comb, Starbuck. I am old;  shake hands with me, man.\"\n\nTheir hands met; their eyes fastened; Starbuck's tears the glue.\n\n\"Oh, my captain, my captain!  noble heart  go not  go not!  see, it's a brave man that weeps; how great the agony of the persuasion then!\"\n\n\"Lower away!\"  cried Ahab, tossing the mate's arm from him. \"Stand by the crew!\"\n\nIn an instant the boat was pulling round close under the stern.\n\n\"The sharks! the sharks!\" cried a voice from the low cabin-window there; \"O master, my master, come back!\"\n\nBut Ahab heard nothing; for his own voice was high-lifted then; and the boat leaped on.\n\nYet the voice spake true; for scarce had he pushed from the ship, when numbers of sharks, seemingly rising from out the dark waters beneath the hull, maliciously snapped at the blades of the oars, every time they dipped in the water; and in this way accompanied the boat with their bites. It is a thing not uncommonly happening to the whale-boats in those swarming seas; the sharks at times apparently following them in the same prescient way that vultures hover over the banners of marching regiments in the east. But these were the first sharks that had been observed by the Pequod since the White Whale had been first descried; and whether it was that Ahab's crew were all such tiger-yellow barbarians, and therefore their flesh more musky to the senses of the sharks  a matter sometimes well known to affect them,  however it was, they seemed to follow that one boat without molesting the others.\n\n\"Heart of wrought steel!\" murmured Starbuck gazing over the side, and following with his eyes the receding boat  \"canst thou yet ring boldly to that sight?  lowering thy keel among ravening sharks, and followed by them, open-mouthed to the chase; and this the critical third day?  For when three days flow together in one continuous intense pursuit; be sure the first is the morning, the second the noon, and the third the evening and the end of that thing  be that end what it may. Oh! my God! what is this that shoots through me, and leaves me so deadly calm, yet expectant,  fixed at the top of a shudder! Future things swim before me, as in empty outlines and skeletons; all the past is somehow grown dim. Mary, girl! thou fadest in pale glories behind me; boy! I seem to see but thy eyes grown wondrous blue. Strangest problems of life seem clearing; but clouds sweep between  Is my journey's end coming? My legs feel faint; like his who has footed it all day. Feel thy heart,  beats it yet? Stir thyself, Starbuck!  stave it off  move, move! speak aloud!  Mast-head there! See ye my boy's hand on the hill?  Crazed;  aloft there!  keep thy keenest eye upon the boats:  mark well the whale!  Ho! again!  drive off that hawk! see! he pecks  he tears the vane\"  pointing to the red flag flying at the main-truck  \"Ha! he soars away with it!  Where's the old man now? see'st thou that sight, oh Ahab!  shudder, shudder!\"\n\nThe boats had not gone very far, when by a signal from the mast-heads  a downward pointed arm, Ahab knew that the whale had sounded; but intending to be near him at the next rising, he held on his way a little sideways from the vessel; the becharmed crew maintaining the profoundest silence, as the head-beat waves hammered and hammered against the opposing bow.\n\n\"Drive, drive in your nails, oh ye waves! to their uttermost heads drive them in! ye but strike a thing without a lid; and no coffin and no hearse can be mine:  and hemp only can kill me! Ha! ha!\"\n\nSuddenly the waters around them slowly swelled in broad circles; then quickly upheaved, as if sideways sliding from a submerged berg of ice, swiftly rising to the surface. A low rumbling sound was heard; a subterraneous hum; and then all held their breaths; as bedraggled with trailing ropes, and harpoons, and lances, a vast form shot lengthwise, but obliquely from the sea. Shrouded in a thin drooping veil of mist, it hovered for a moment in the rainbowed air; and then fell swamping back into the deep. Crushed thirty feet upwards, the waters flashed for an instant like heaps of fountains, then brokenly sank in a shower of flakes, leaving the circling surface creamed like new milk round the marble trunk of the whale.\n\n\"Give way!\" cried Ahab to the oarsmen, and the boats darted forward to the attack; but maddened by yesterday's fresh irons that corroded in him, Moby Dick seemed combinedly possessed by all the angels that fell from heaven. The wide tiers of welded tendons overspreading his broad white forehead, beneath the transparent skin, looked knitted together; as head on, he came churning his tail among the boats; and once more flailed them apart; spilling out the irons and lances from the two mates' boats, and dashing in one side of the upper part of their bows, but leaving Ahab's almost without a scar.\n\nWhile Daggoo and Queequeg were stopping the strained planks; and as the whale swimming out from them, turned, and showed one entire flank as he shot by them again; at that moment a quick cry went up. Lashed round and round to the fish's back; pinioned in the turns upon turns in which, during the past night, the whale had reeled the involutions of the lines around him, the half torn body of the Parsee was seen; his sable raiment frayed to shreds; his distended eyes turned full upon old Ahab.\n\nThe harpoon dropped from his hand.\n\n\"Befooled, befooled!\"  drawing in a long lean breath  \"Aye, Parsee! I see thee again.  Aye, and thou goest before; and this, this then is the hearse that thou didst promise. But I hold thee to the last letter of thy word. Where is the second hearse? Away, mates, to the ship! those boats are useless now; repair them if ye can in time, and return to me; if not, Ahab is enough to die  Down, men! the first thing that but offers to jump from this boat I stand in, that thing I harpoon. Ye are not other men, but my arms and my legs; and so obey me.  Where's the whale? gone down again?\"\n\nBut he looked too nigh the boat; for as if bent upon escaping with the corpse he bore, and as if the particular place of the last encounter had been but a stage in his leeward voyage, Moby Dick was now again steadily swimming forward; and had almost passed the ship,  which thus far had been sailing in the contrary direction to him, though for the present her headway had been stopped. He seemed swimming with his utmost velocity, and now only intent upon pursuing his own straight path in the sea.\n\n\"Oh! Ahab,\" cried Starbuck, \"not too late is it, even now, the third day, to desist. See! Moby Dick seeks thee not. It is thou, thou, that madly seekest him!\"\n\nSetting sail to the rising wind, the lonely boat was swiftly impelled to leeward, by both oars and canvas. And at last when Ahab was sliding by the vessel, so near as plainly to distinguish Starbuck's face as he leaned over the rail, he hailed him to turn the vessel about, and follow him, not too swiftly, at a judicious interval. Glancing upwards, he saw Tashtego, Queequeg, and Daggoo, eagerly mounting to the three mast-heads; while the oarsmen were rocking in the two staved boats which had but just been hoisted to the side, and were busily at work in repairing them. One after the other, through the port-holes, as he sped, he also caught flying glimpses of Stubb and Flask, busying themselves on deck among bundles of new irons and lances. As he saw all this; as he heard the hammers in the broken boats; far other hammers seemed driving a nail into his heart. But he rallied. And now marking that the vane or flag was gone from the main-mast-head, he shouted to Tashtego, who had just gained that perch, to descend again for another flag, and a hammer and nails, and so nail it to the mast.\n\nWhether fagged by the three days' running chase, and the resistance to his swimming in the knotted hamper he bore; or whether it was some latent deceitfulness and malice in him: whichever was true, the White Whale's way now began to abate, as it seemed, from the boat so rapidly nearing him once more; though indeed the whale's last start had not been so long a one as before. And still as Ahab glided over the waves the unpitying sharks accompanied him; and so pertinaciously stuck to the boat; and so continually bit at the plying oars, that the blades became jagged and crunched, and left small splinters in the sea, at almost every dip.\n\n\"Heed them not! those teeth but give new rowlocks to your oars. Pull on! 'tis the better rest, the shark's jaw than the yielding water.\"\n\n\"But at every bite, sir, the thin blades grow smaller and smaller!\"\n\n\"They will last long enough! pull on!  But who can tell\"  he muttered  \"whether these sharks swim to feast on the whale or on Ahab?  But pull on! Aye, all alive, now  we near him. The helm! take the helm! let me pass,\"  and so saying two of the oarsmen helped him forward to the bows of the still flying boat.\n\nAt length as the craft was cast to one side, and ran ranging along with the White Whale's flank, he seemed strangely oblivious of its advance  as the whale sometimes will  and Ahab was fairly within the smoky mountain mist, which, thrown off from the whale's spout, curled round his great, Monadnock hump; he was even thus close to him; when, with body arched back, and both arms lengthwise high-lifted to the poise, he darted his fierce iron, and his far fiercer curse into the hated whale. As both steel and curse sank to the socket, as if sucked into a morass, Moby Dick sideways writhed; spasmodically rolled his nigh flank against the bow, and, without staving a hole in it, so suddenly canted the boat over, that had it not been for the elevated part of the gunwale to which he then clung, Ahab would once more have been tossed into the sea. As it was, three of the oarsmen  who foreknew not the precise instant of the dart, and were therefore unprepared for its effects  these were flung out; but so fell, that, in an instant two of them clutched the gunwale again, and rising to its level on a combing wave, hurled themselves bodily inboard again; the third man helplessly dropping astern, but still afloat and swimming.\n\nAlmost simultaneously, with a mighty volition of ungraduated, instantaneous swiftness, the White Whale darted through the weltering sea. But when Ahab cried out to the steersman to take new turns with the line, and hold it so; and commanded the crew to turn round on their seats, and tow the boat up to the mark; the moment the treacherous line felt that double strain and tug, it snapped in the empty air!\n\n\"What breaks in me? Some sinew cracks!  'tis whole again; oars! oars! Burst in upon him!\"\n\nHearing the tremendous rush of the sea-crashing boat, the whale wheeled round to present his blank forehead at bay; but in that evolution, catching sight of the nearing black hull of the ship; seemingly seeing in it the source of all his persecutions; bethinking it  it may be  a larger and nobler foe; of a sudden, he bore down upon its advancing prow, smiting his jaws amid fiery showers of foam.\n\nAhab staggered; his hand smote his forehead. \"I grow blind; hands! stretch out before me that I may yet grope my way. Is't night?\"\n\n\"The whale! The ship!\" cried the cringing oarsmen.\n\n\"Oars! oars! Slope downwards to thy depths, O sea, that ere it be for ever too late, Ahab may slide this last, last time upon his mark! I see: the ship! the ship! Dash on, my men! Will ye not save my ship?\"\n\nBut as the oarsmen violently forced their boat through the sledge-hammering seas, the before whale-smitten bow-ends of two planks burst through, and in an instant almost, the temporarily disabled boat lay nearly level with the waves; its half-wading, splashing crew, trying hard to stop the gap and bale out the pouring water.\n\nMeantime, for that one beholding instant, Tashtego's mast-head hammer remained suspended in his hand; and the red flag, half-wrapping him as with a plaid, then streamed itself straight out from him, as his own forward-flowing heart; while Starbuck and Stubb, standing upon the bowsprit beneath, caught sight of the down-coming monster just as soon as he.\n\n\"The whale, the whale! Up helm, up helm! Oh, all ye sweet powers of air, now hug me close! Let not Starbuck die, if die he must, in a woman's fainting fit. Up helm, I say  ye fools, the jaw! the jaw! Is this the end of all my bursting prayers? all my life-long fidelities? Oh, Ahab, Ahab, lo, thy work. Steady! helmsman, steady. Nay, nay! Up helm again! He turns to meet us! Oh, his unappeasable brow drives on towards one, whose duty tells him he cannot depart. My God, stand by me now!\"\n\n\"Stand not by me, but stand under me, whoever you are that will now help Stubb; for Stubb, too, sticks here. I grin at thee, thou grinning whale! Who ever helped Stubb, or kept Stubb awake, but Stubb's own unwinking eye? And now poor Stubb goes to bed upon a mattrass that is all too soft; would it were stuffed with brushwood! I grin at thee, thou grinning whale! Look ye, sun, moon, and stars! I call ye assassins of as good a fellow as ever spouted up his ghost. For all that, I would yet ring glasses with ye, would ye but hand the cup! Oh, oh! oh, oh! thou grinning whale, but there'll be plenty of gulping soon! Why fly ye not, O Ahab! For me, off shoes and jacket to it; let Stubb die in his drawers! A most mouldy and over salted death, though;  cherries! cherries! cherries! Oh, Flask, for one red cherry ere we die!\"\n\n\"Cherries? I only wish that we were where they grow. Oh, Stubb, I hope my poor mother's drawn my part-pay ere this; if not, few coppers will now come to her, for the voyage is up.\"\n\nFrom the ship's bows, nearly all the seamen now hung inactive; hammers, bits of plank, lances, and harpoons, mechanically retained in their hands, just as they had darted from their various employments; all their enchanted eyes intent upon the whale, which from side to side strangely vibrating his predestinating head, sent a broad band of overspreading semicircular foam before him as he rushed. Retribution, swift vengeance, eternal malice were in his whole aspect, and spite of all that mortal man could do, the solid white buttress of his forehead smote the ship's starboard bow, till men and timbers reeled. Some fell flat upon their faces. Like dislodged trucks, the heads of the harpooneers aloft shook on their bull-like necks. Through the breach, they heard the waters pour, as mountain torrents down a flume.\n\n\"The ship! The hearse!  the second hearse!\" cried Ahab from the boat; \"its wood could only be American!\"\n\nDiving beneath the settling ship, the whale ran quivering along its keel; but turning under water, swiftly shot to the surface again, far off the other bow, but within a few yards of Ahab's boat, where, for a time, he lay quiescent.\n\n\"I turn my body from the sun. What ho, Tashtego! let me hear thy hammer. Oh! ye three unsurrendered spires of mine; thou uncracked keel; and only god-bullied hull; thou firm deck, and haughty helm, and Pole-pointed prow,  death-glorious ship! must ye then perish, and without me? Am I cut off from the last fond pride of meanest shipwrecked captains? Oh, lonely death on lonely life! Oh, now I feel my topmost greatness lies in my topmost grief. Ho, ho! from all your furthest bounds, pour ye now in, ye bold billows of my whole foregone life, and top this one piled comber of my death! Towards thee I roll, thou all-destroying but unconquering whale; to the last I grapple with thee; from hell's heart I stab at thee; for hate's sake I spit my last breath at thee. Sink all coffins and all hearses to one common pool! and since neither can be mine, let me then tow to pieces, while still chasing thee, though tied to thee, thou damned whale! THUS, I give up the spear!\"\n\nThe harpoon was darted; the stricken whale flew forward; with igniting velocity the line ran through the grooves;  ran foul. Ahab stooped to clear it; he did clear it; but the flying turn caught him round the neck, and voicelessly as Turkish mutes bowstring their victim, he was shot out of the boat, ere the crew knew he was gone. Next instant, the heavy eye-splice in the rope's final end flew out of the stark-empty tub, knocked down an oarsman, and smiting the sea, disappeared in its depths.\n\nFor an instant, the tranced boat's crew stood still; then turned. \"The ship? Great God, where is the ship?\" Soon they through dim, bewildering mediums saw her sidelong fading phantom, as in the gaseous Fata Morgana; only the uppermost masts out of water; while fixed by infatuation, or fidelity, or fate, to their once lofty perches, the pagan harpooneers still maintained their sinking lookouts on the sea. And now, concentric circles seized the lone boat itself, and all its crew, and each floating oar, and every lance-pole, and spinning, animate and inanimate, all round and round in one vortex, carried the smallest chip of the Pequod out of sight.\n\nBut as the last whelmings intermixingly poured themselves over the sunken head of the Indian at the mainmast, leaving a few inches of the erect spar yet visible, together with long streaming yards of the flag, which calmly undulated, with ironical coincidings, over the destroying billows they almost touched;  at that instant, a red arm and a hammer hovered backwardly uplifted in the open air, in the act of nailing the flag faster and yet faster to the subsiding spar. A sky-hawk that tauntingly had followed the main-truck downwards from its natural home among the stars, pecking at the flag, and incommoding Tashtego there; this bird now chanced to intercept its broad fluttering wing between the hammer and the wood; and simultaneously feeling that etherial thrill, the submerged savage beneath, in his death-gasp, kept his hammer frozen there; and so the bird of heaven, with archangelic shrieks, and his imperial beak thrust upwards, and his whole captive form folded in the flag of Ahab, went down with his ship, which, like Satan, would not sink to hell till she had dragged a living part of heaven along with her, and helmeted herself with it.\n\nNow small fowls flew screaming over the yet yawning gulf; a sullen white surf beat against its steep sides; then all collapsed, and the great shroud of the sea rolled on as it rolled five thousand years ago.\n\nEpilogue\n\n\"AND I ONLY AM ESCAPED ALONE TO TELL THEE\"  Job.\n\nThe drama's done. Why then here does any one step forth?  Because one did survive the wreck.\n\nIt so chanced, that after the Parsee's disappearance, I was he whom the Fates ordained to take the place of Ahab's bowsman, when that bowsman assumed the vacant post; the same, who, when on the last day the three men were tossed from out of the rocking boat, was dropped astern. So, floating on the margin of the ensuing scene, and in full sight of it, when the halfspent suction of the sunk ship reached me, I was then, but slowly, drawn towards the closing vortex. When I reached it, it had subsided to a creamy pool. Round and round, then, and ever contracting towards the button-like black bubble at the axis of that slowly wheeling circle, like another Ixion I did revolve. Till, gaining that vital centre, the black bubble upward burst; and now, liberated by reason of its cunning spring, and, owing to its great buoyancy, rising with great force, the coffin life-buoy shot lengthwise from the sea, fell over, and floated by my side. Buoyed up by that coffin, for almost one whole day and night, I floated on a soft and dirgelike main. The unharming sharks, they glided by as if with padlocks on their mouths; the savage sea-hawks sailed with sheathed beaks. On the second day, a sail drew near, nearer, and picked me up at last. It was the devious-cruising Rachel, that in her retracing search after her missing children, only found another orphan.\n\n\n------\n\n\n\nUTF-8 encoded sample plain-text file\n‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\n\nMarkus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25\n\n\nThe ASCII compatible UTF-8 encoding used in this plain-text file\nis defined in Unicode, ISO 10646-1, and RFC 2279.\n\n\nUsing Unicode/UTF-8, you can write in emails and source code things such as\n\nMathematics and sciences:\n\n  ∮ E⋅da = Q,  n → ∞, ∑ f(i) = ∏ g(i),      ⎧⎡⎛┌─────┐⎞⎤⎫\n                                            ⎪⎢⎜│a²+b³ ⎟⎥⎪\n  ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β),    ⎪⎢⎜│───── ⎟⎥⎪\n                                            ⎪⎢⎜⎷ c₈   ⎟⎥⎪\n  ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ,                   ⎨⎢⎜       ⎟⎥⎬\n                                            ⎪⎢⎜ ∞     ⎟⎥⎪\n  ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫),      ⎪⎢⎜ ⎲     ⎟⎥⎪\n                                            ⎪⎢⎜ ⎳aⁱ-bⁱ⎟⎥⎪\n  2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm     ⎩⎣⎝i=1    ⎠⎦⎭\n\nLinguistics and dictionaries:\n\n  ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn\n  Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ]\n\nAPL:\n\n  ((V⍳V)=⍳⍴V)/V←,V    ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈\n\nNicer typography in plain text files:\n\n  ╔══════════════════════════════════════════╗\n  ║                                          ║\n  ║   • ‘single’ and “double” quotes         ║\n  ║                                          ║\n  ║   • Curly apostrophes: “We’ve been here” ║\n  ║                                          ║\n  ║   • Latin-1 apostrophe and accents: '´`  ║\n  ║                                          ║\n  ║   • ‚deutsche‘ „Anführungszeichen“       ║\n  ║                                          ║\n  ║   • †, ‡, ‰, •, 3–4, —, −5/+5, ™, …      ║\n  ║                                          ║\n  ║   • ASCII safety test: 1lI|, 0OD, 8B     ║\n  ║                      ╭─────────╮         ║\n  ║   • the euro symbol: │ 14.95 € │         ║\n  ║                      ╰─────────╯         ║\n  ╚══════════════════════════════════════════╝\n\nCombining characters:\n\n  STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑\n\nGreek (in Polytonic):\n\n  The Greek anthem:\n\n  Σὲ γνωρίζω ἀπὸ τὴν κόψη\n  τοῦ σπαθιοῦ τὴν τρομερή,\n  σὲ γνωρίζω ἀπὸ τὴν ὄψη\n  ποὺ μὲ βία μετράει τὴ γῆ.\n\n  ᾿Απ᾿ τὰ κόκκαλα βγαλμένη\n  τῶν ῾Ελλήνων τὰ ἱερά\n  καὶ σὰν πρῶτα ἀνδρειωμένη\n  χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά!\n\n  From a speech of Demosthenes in the 4th century BC:\n\n  Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι,\n  ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς\n  λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ\n  τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿\n  εἰς τοῦτο προήκοντα,  ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ\n  πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν\n  οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι,\n  οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν\n  ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον\n  τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι\n  γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν\n  προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους\n  σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ\n  τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ\n  τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς\n  τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον.\n\n  Δημοσθένους, Γ´ ᾿Ολυνθιακὸς\n\nGeorgian:\n\n  From a Unicode conference invitation:\n\n  გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო\n  კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს,\n  ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს\n  ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი,\n  ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება\n  ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში,\n  ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში.\n\nRussian:\n\n  From a Unicode conference invitation:\n\n  Зарегистрируйтесь сейчас на Десятую Международную Конференцию по\n  Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии.\n  Конференция соберет широкий круг экспертов по  вопросам глобального\n  Интернета и Unicode, локализации и интернационализации, воплощению и\n  применению Unicode в различных операционных системах и программных\n  приложениях, шрифтах, верстке и многоязычных компьютерных системах.\n\nThai (UCS Level 2):\n\n  Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese\n  classic 'San Gua'):\n\n  [----------------------------|------------------------]\n    ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช  พระปกเกศกองบู๊กู้ขึ้นใหม่\n  สิบสองกษัตริย์ก่อนหน้าแลถัดไป       สององค์ไซร้โง่เขลาเบาปัญญา\n    ทรงนับถือขันทีเป็นที่พึ่ง           บ้านเมืองจึงวิปริตเป็นนักหนา\n  โฮจิ๋นเรียกทัพทั่วหัวเมืองมา         หมายจะฆ่ามดชั่วตัวสำคัญ\n    เหมือนขับไสไล่เสือจากเคหา      รับหมาป่าเข้ามาเลยอาสัญ\n  ฝ่ายอ้องอุ้นยุแยกให้แตกกัน          ใช้สาวนั้นเป็นชนวนชื่นชวนใจ\n    พลันลิฉุยกุยกีกลับก่อเหตุ          ช่างอาเพศจริงหนาฟ้าร้องไห้\n  ต้องรบราฆ่าฟันจนบรรลัย           ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ\n\n  (The above is a two-column text. If combining characters are handled\n  correctly, the lines of the second column should be aligned with the\n  | character above.)\n\nEthiopian:\n\n  Proverbs in the Amharic language:\n\n  ሰማይ አይታረስ ንጉሥ አይከሰስ።\n  ብላ ካለኝ እንደአባቴ በቆመጠኝ።\n  ጌጥ ያለቤቱ ቁምጥና ነው።\n  ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው።\n  የአፍ ወለምታ በቅቤ አይታሽም።\n  አይጥ በበላ ዳዋ ተመታ።\n  ሲተረጉሙ ይደረግሙ።\n  ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል።\n  ድር ቢያብር አንበሳ ያስር።\n  ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም።\n  እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም።\n  የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ።\n  ሥራ ከመፍታት ልጄን ላፋታት።\n  ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል።\n  የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ።\n  ተንጋሎ ቢተፉ ተመልሶ ባፉ።\n  ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው።\n  እግርህን በፍራሽህ ልክ ዘርጋ።\n\nRunes:\n\n  ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ\n\n  (Old English, which transcribed into Latin reads 'He cwaeth that he\n  bude thaem lande northweardum with tha Westsae.' and means 'He said\n  that he lived in the northern land near the Western Sea.')\n\nBraille:\n\n  ⡌⠁⠧⠑ ⠼⠁⠒  ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌\n\n  ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞\n  ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎\n  ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂\n  ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙\n  ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑\n  ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲\n\n  ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲\n\n  ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹\n  ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞\n  ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕\n  ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹\n  ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎\n  ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎\n  ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳\n  ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞\n  ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲\n\n  (The first couple of paragraphs of \"A Christmas Carol\" by Dickens)\n\nCompact font selection example text:\n\n  ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789\n  abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ\n  –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд\n  ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ ﬁ�⑀₂ἠḂӥẄɐː⍎אԱა\n\nGreetings in various languages:\n\n  Hello world, Καλημέρα κόσμε, コンニチハ\n\nBox drawing alignment tests:                                          █\n                                                                      ▉\n  ╔══╦══╗  ┌──┬──┐  ╭──┬──╮  ╭──┬──╮  ┏━━┳━━┓  ┎┒┏┑   ╷  ╻ ┏┯┓ ┌┰┐    ▊ ╱╲╱╲╳╳╳\n  ║┌─╨─┐║  │╔═╧═╗│  │╒═╪═╕│  │╓─╁─╖│  ┃┌─╂─┐┃  ┗╃╄┙  ╶┼╴╺╋╸┠┼┨ ┝╋┥    ▋ ╲╱╲╱╳╳╳\n  ║│╲ ╱│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ ╿ │┃  ┍╅╆┓   ╵  ╹ ┗┷┛ └┸┘    ▌ ╱╲╱╲╳╳╳\n  ╠╡ ╳ ╞╣  ├╢   ╟┤  ├┼─┼─┼┤  ├╫─╂─╫┤  ┣┿╾┼╼┿┫  ┕┛┖┚     ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳\n  ║│╱ ╲│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ ╽ │┃  ░░▒▒▓▓██ ┊  ┆ ╎ ╏  ┇ ┋ ▎\n  ║└─╥─┘║  │╚═╤═╝│  │╘═╪═╛│  │╙─╀─╜│  ┃└─╂─┘┃  ░░▒▒▓▓██ ┊  ┆ ╎ ╏  ┇ ┋ ▏\n  ╚══╩══╝  └──┴──┘  ╰──┴──╯  ╰──┴──╯  ┗━━┻━━┛  ▗▄▖▛▀▜   └╌╌┘ ╎ ┗╍╍┛ ┋  ▁▂▃▄▅▆▇█\n                                               ▝▀▘▙▄▟"
  },
  {
    "path": "src/test/resources/gremlin-server/bitsy.properties",
    "content": "# Sample configuration for Bitsy in Gremlin server\n# More details on tuning at https://github.com/lambdazen/bitsy/wiki/TuningBitsy.md\ngremlin.graph=com.lambdazen.bitsy.BitsyGraph\n\n# CHANGE THIS!!\ndbPath=/bitsy-db/\n"
  },
  {
    "path": "src/test/resources/gremlin-server/gremlin-server-bitsy.yaml",
    "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nhost: localhost\nport: 8182\nscriptEvaluationTimeout: 30000\ngraphs: {\n  graph: conf/bitsy.properties}\nscriptEngines: {\n  gremlin-groovy: {\n    plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},\n               com.lambdazen.bitsy.jsr223.BitsyGremlinPlugin: {},\n               org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},\n               org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}\nserializers:\n  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [com.lambdazen.bitsy.BitsyIoRegistryV3d0] }}            # application/vnd.gremlin-v3.0+gryo\n  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}                                                                      # application/vnd.gremlin-v3.0+gryo-stringd\n  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [com.lambdazen.bitsy.BitsyIoRegistryV3d0] }}        # application/json\nmetrics: {\n  slf4jReporter: {enabled: true, interval: 180000}}\nstrictTransactionManagement: false\nmaxInitialLineLength: 4096\nmaxHeaderSize: 8192\nmaxChunkSize: 8192\nmaxContentLength: 65536\nmaxAccumulationBufferComponents: 1024\nresultIterationBatchSize: 64\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/eB.txt",
    "content": "H=6#0021a662\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/txB.txt",
    "content": "H=2#0021a5e6\nV={\"id\":\"88617055-986f-43f2-9eb7-bf42fd8e152d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0299675e\nV={\"id\":\"705343cf-a6d7-4974-80a9-51c6e4591e5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b733db8b\nV={\"id\":\"ac07cfdb-72ea-4f2e-b9b7-8916815e3324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8027be93\nV={\"id\":\"d8dbd667-2c7d-4281-a279-8d0f2dba94b6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#87de2b63\nV={\"id\":\"9288d794-2db8-4d3f-a16c-e55d57ea9870\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e4d4f36\nV={\"id\":\"9f2cfe58-4f70-4163-bf10-6f59d5975410\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bcc1c663\nV={\"id\":\"efd17158-21c4-48ae-9967-8c08f287eb51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#981b8877\nV={\"id\":\"cc9d4b85-1240-43dd-a229-02d05572bce0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b1da2b3b\nV={\"id\":\"7dfbe2f0-cc90-4e71-bc8f-490bae80ebb0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#482ff46d\nV={\"id\":\"da97bbec-8d6f-419b-988d-647921bdc480\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5491b06e\nV={\"id\":\"b3beea69-2533-4b41-a677-87fd66e83372\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dab0bf\nV={\"id\":\"97d41caa-5c41-42f0-8436-5d7fcac95555\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#12bcfb40\nV={\"id\":\"9eab9c2f-3d02-4da3-876e-39a276bb7dc3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d36f1bb1\nV={\"id\":\"7f7d5b37-a343-4d28-92fd-eeee0ed1f893\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#622abe27\nV={\"id\":\"13f21014-d699-4055-991a-9604a8a47b43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eefbd811\nV={\"id\":\"4dc5f2ac-90be-48b4-8b29-f8d1b2dd5c63\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e61632db\nV={\"id\":\"d1772edb-db8e-4c90-8efb-2de7882525e2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b73d8369\nV={\"id\":\"9fb1924d-6a99-4b8d-8753-1973942cdf2d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68f355b5\nV={\"id\":\"66359d91-3fa9-4aef-8d92-c9d58a5e9145\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a1b6d414\nV={\"id\":\"3812c60f-e7a5-4976-8202-2e3d485c7400\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#83ef054c\nV={\"id\":\"0d3868a6-cb1d-46b4-b991-9c12e498698d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#56a76385\nV={\"id\":\"d7e3d2a4-9e55-4802-b1de-2657ac1eb6fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7111a838\nV={\"id\":\"5115f873-63f8-4e80-bc9f-944c8b9a4c3d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#380f9e5a\nV={\"id\":\"eccee69e-b491-47e1-b9fe-f35854b2f34a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1908e04b\nV={\"id\":\"3ce7e859-d3c9-4b9b-a689-cb29163d23ec\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fa7992c0\nV={\"id\":\"ff18f029-ee0b-4b56-9257-c6d8dc4d4a2b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e25c5a3\nV={\"id\":\"e01da54b-845e-43f9-9ea7-b1d05df25ab7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#185795d5\nV={\"id\":\"5e5cb34f-74f1-4387-ae79-5e6dd14dbf6e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#15b1ab71\nV={\"id\":\"88fb62d1-edbb-4a22-8095-37b30e765c10\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f43cc77b\nV={\"id\":\"11444e59-f3db-43bd-9e37-eee9682a0e29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#304225d4\nV={\"id\":\"7a81607c-7d33-487d-80a7-33e48ac380e5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#54d77c21\nV={\"id\":\"33ba8a9e-9f71-4b89-99b0-b3a635d21576\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6f491d89\nV={\"id\":\"8ce4049f-15fe-40a1-a533-624ec54ce284\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6d31ea99\nV={\"id\":\"d644a055-41c2-4b8d-a841-f7bdd3942725\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0193f110\nV={\"id\":\"ca465253-bd5c-4932-9fae-9a1cf686be8b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fabf55d\nV={\"id\":\"57832a48-df92-4040-9db0-439f9898aab5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3878e0bf\nV={\"id\":\"3caea050-1795-444b-bb15-4b3f5749ccea\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7cd0cf86\nV={\"id\":\"b02d213c-c962-48dc-b151-8c682c6fbfac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4b260b87\nV={\"id\":\"849b5176-5870-4cff-9fec-5717e48b5994\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e750068\nV={\"id\":\"53a51028-171b-4c43-b135-00975759f03b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#004d20f6\nV={\"id\":\"0d5ee97e-975b-4aa5-9487-9652122d187d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#107e4d0d\nV={\"id\":\"c5ed6328-3d83-4c8a-b864-d8308217d0b4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#04d3d0d5\nV={\"id\":\"a2bc8143-de62-4a9f-aadb-6c799aab86c8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#80b5c95c\nV={\"id\":\"0802f3b7-10dd-4229-9b5b-aed338654689\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#91eb673a\nV={\"id\":\"8303966c-78de-4e16-bf2c-5079ee486375\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c93af72d\nV={\"id\":\"aff1ca14-5f6b-46ea-afaf-54d5ff0dc1ff\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9d09ebf6\nV={\"id\":\"3bf121bf-0df4-4f3d-82be-3f4511fa214d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c4c93e31\nV={\"id\":\"639ee98e-2a26-44e6-a88f-461e0722ca43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2fd96b93\nV={\"id\":\"677ee5bb-de74-4de9-9237-7db62e174f75\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64705cfe\nV={\"id\":\"1ab91032-168c-416a-ad62-3337af769f29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#65fca356\nT=-1708318705#ae870fef\nV={\"id\":\"4939a570-2fc3-49c4-a88c-8dbf995ca059\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cbe9c5f7\nV={\"id\":\"62c59bfe-954b-4a8d-b166-79b0394db432\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b3f98903\nV={\"id\":\"cae53026-792f-4758-8836-82ef253b758b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be0fdd1f\nV={\"id\":\"0a423fea-ed66-4151-ac85-a16d28603099\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#46d8619c\nV={\"id\":\"7441ee87-ed85-4c7b-a6b7-9ef828a8ae66\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55891ca4\nV={\"id\":\"9dea9b70-22a7-4d66-b543-763d39e74ac3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6901f89a\nV={\"id\":\"bdf65c96-20b5-4418-9e27-2525e6ce9d64\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be873f0c\nV={\"id\":\"a6a428fe-b6d2-427a-8674-41735bed89a1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#36cd8ba2\nV={\"id\":\"5711a7cb-3025-4fad-8605-28d12a08e6a2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22c63a3b\nV={\"id\":\"ff60fb22-f142-435c-a1e9-dad78968e99d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#20e7c528\nV={\"id\":\"f390e034-c346-44c4-a919-bc45c615e70d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1b0707a2\nV={\"id\":\"6a27512d-9d8b-4190-87ec-cd4dc8f8964d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f5a3412b\nV={\"id\":\"91957136-002a-47e4-8351-a45531dd374b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8d403c50\nV={\"id\":\"0f73f23a-4113-48c1-ba3f-1596a2ed325e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#581ea883\nV={\"id\":\"893f6b99-7da4-4d2d-8660-b3025ef094d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c97c97ce\nV={\"id\":\"53ccbd4a-1071-4dd4-9797-cf9820d30f97\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eadd8e95\nV={\"id\":\"29b633c4-791d-4084-ac52-112bab10e8d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#79a97e91\nV={\"id\":\"5e32e7c0-3097-4af3-8534-41b00e5c2075\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abd83757\nV={\"id\":\"061aa8c7-3d4d-42a9-bf2c-5b41bf7c3334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a7bb8ad4\nV={\"id\":\"ef292fa8-42c6-4d7d-b664-be4ecdc9a334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d7092785\nV={\"id\":\"202a0cc9-de3e-45c5-b09d-ee5dfbf9f446\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ecb86525\nV={\"id\":\"204ffb01-4a52-41a1-bf62-ac8573f069e6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3f13c007\nV={\"id\":\"6fe4d83c-e4a4-4195-9618-8a9b8dcdeabe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c17785c\nV={\"id\":\"282e4ee9-15be-45de-be85-f7e5541b504f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0617b779\nV={\"id\":\"10df704b-c692-4934-836b-05937ffefd4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c0e9f439\nV={\"id\":\"1bcbe6d7-6c47-447e-b268-30f45e91d569\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e934a569\nV={\"id\":\"0c73d06c-57f1-4bf2-9f26-3e5bfbd6fb5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#99a8d417\nV={\"id\":\"a095ae24-9764-4f3a-8925-c2553c7bdf0a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e551cdc2\nV={\"id\":\"da27b121-cf6f-4062-8320-4a73e5bd5579\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#acb3edd7\nV={\"id\":\"a14c8381-b950-4cad-b4c9-c6e6e23de413\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9a27f052\nV={\"id\":\"b820a339-9a45-44b3-a40d-25347c50c1fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d5f4c62e\nV={\"id\":\"2bdd4ed5-e0be-4f73-8842-56aba2b0d788\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ff1615c8\nV={\"id\":\"82146009-6c33-433e-a28c-62f59abf6bdd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#941e52e5\nV={\"id\":\"7735542b-7a75-4262-b448-5195f286bac8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#861cef0d\nV={\"id\":\"acf127c3-39a7-4421-9131-8b4082c39a74\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#357e1fac\nV={\"id\":\"3311ee22-4b88-4126-83c3-b6e989a47bc9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bc280b6b\nV={\"id\":\"2352c173-6966-4269-9154-58e6b4ab9bb7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#25bd859c\nV={\"id\":\"056d15fa-0c9d-47c5-8339-18ab9a4b8a5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d18c08b2\nV={\"id\":\"3aee3a5b-4643-4e3e-82fe-f954ff2666af\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2f3e9de3\nV={\"id\":\"1d048031-14ef-4b52-9b71-630575186d88\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0b664aca\nV={\"id\":\"4c941fb7-da15-4e44-9722-5519f775f9c3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64eb0a30\nV={\"id\":\"fead9f79-1b9d-45cc-8b8f-509704b94324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#335049bd\nV={\"id\":\"7baad6bf-f18a-4de0-a819-38d12a6d7063\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#760171e2\nV={\"id\":\"477e49ab-4033-477b-b834-eb48ccf34341\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#23774854\nV={\"id\":\"6e839a0e-886c-4ec6-8389-7a18e988b123\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0738f1d9\nV={\"id\":\"944b3f17-2d84-4e4f-afa4-15908f4c0841\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cd0e4774\nV={\"id\":\"114e05da-5a69-4ff5-87fb-997b1f03c991\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f6692975\nV={\"id\":\"5c0f9af6-ff49-4938-807d-63e4c9d1faa3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c63cc9d8\nV={\"id\":\"92e0e9ae-e7c2-4a5b-b35d-efdfc296bc9e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0de7295f\nV={\"id\":\"d80c8a3a-dd7d-4c85-9603-85ef5bb20c41\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#add1d828\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/vA.txt",
    "content": "H=3#0021a605\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage1/vB.txt",
    "content": "H=4#0021a624\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/eB.txt",
    "content": "H=6#0021a662\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/txB.txt",
    "content": "H=2#0021a5e6\nV={\"id\":\"88617055-986f-43f2-9eb7-bf42fd8e152d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0299675e\nV={\"id\":\"705343cf-a6d7-4974-80a9-51c6e4591e5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b733db8b\nV={\"id\":\"ac07cfdb-72ea-4f2e-b9b7-8916815e3324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8027be93\nV={\"id\":\"d8dbd667-2c7d-4281-a279-8d0f2dba94b6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#87de2b63\nV={\"id\":\"9288d794-2db8-4d3f-a16c-e55d57ea9870\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e4d4f36\nV={\"id\":\"9f2cfe58-4f70-4163-bf10-6f59d5975410\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bcc1c663\nV={\"id\":\"efd17158-21c4-48ae-9967-8c08f287eb51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#981b8877\nV={\"id\":\"cc9d4b85-1240-43dd-a229-02d05572bce0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b1da2b3b\nV={\"id\":\"7dfbe2f0-cc90-4e71-bc8f-490bae80ebb0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#482ff46d\nV={\"id\":\"da97bbec-8d6f-419b-988d-647921bdc480\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5491b06e\nV={\"id\":\"b3beea69-2533-4b41-a677-87fd66e83372\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dab0bf\nV={\"id\":\"97d41caa-5c41-42f0-8436-5d7fcac95555\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#12bcfb40\nV={\"id\":\"9eab9c2f-3d02-4da3-876e-39a276bb7dc3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d36f1bb1\nV={\"id\":\"7f7d5b37-a343-4d28-92fd-eeee0ed1f893\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#622abe27\nV={\"id\":\"13f21014-d699-4055-991a-9604a8a47b43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eefbd811\nV={\"id\":\"4dc5f2ac-90be-48b4-8b29-f8d1b2dd5c63\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e61632db\nV={\"id\":\"d1772edb-db8e-4c90-8efb-2de7882525e2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b73d8369\nV={\"id\":\"9fb1924d-6a99-4b8d-8753-1973942cdf2d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68f355b5\nV={\"id\":\"66359d91-3fa9-4aef-8d92-c9d58a5e9145\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a1b6d414\nV={\"id\":\"3812c60f-e7a5-4976-8202-2e3d485c7400\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#83ef054c\nV={\"id\":\"0d3868a6-cb1d-46b4-b991-9c12e498698d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#56a76385\nV={\"id\":\"d7e3d2a4-9e55-4802-b1de-2657ac1eb6fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7111a838\nV={\"id\":\"5115f873-63f8-4e80-bc9f-944c8b9a4c3d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#380f9e5a\nV={\"id\":\"eccee69e-b491-47e1-b9fe-f35854b2f34a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1908e04b\nV={\"id\":\"3ce7e859-d3c9-4b9b-a689-cb29163d23ec\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fa7992c0\nV={\"id\":\"ff18f029-ee0b-4b56-9257-c6d8dc4d4a2b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e25c5a3\nV={\"id\":\"e01da54b-845e-43f9-9ea7-b1d05df25ab7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#185795d5\nV={\"id\":\"5e5cb34f-74f1-4387-ae79-5e6dd14dbf6e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#15b1ab71\nV={\"id\":\"88fb62d1-edbb-4a22-8095-37b30e765c10\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f43cc77b\nV={\"id\":\"11444e59-f3db-43bd-9e37-eee9682a0e29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#304225d4\nV={\"id\":\"7a81607c-7d33-487d-80a7-33e48ac380e5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#54d77c21\nV={\"id\":\"33ba8a9e-9f71-4b89-99b0-b3a635d21576\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6f491d89\nV={\"id\":\"8ce4049f-15fe-40a1-a533-624ec54ce284\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6d31ea99\nV={\"id\":\"d644a055-41c2-4b8d-a841-f7bdd3942725\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0193f110\nV={\"id\":\"ca465253-bd5c-4932-9fae-9a1cf686be8b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fabf55d\nV={\"id\":\"57832a48-df92-4040-9db0-439f9898aab5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3878e0bf\nV={\"id\":\"3caea050-1795-444b-bb15-4b3f5749ccea\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7cd0cf86\nV={\"id\":\"b02d213c-c962-48dc-b151-8c682c6fbfac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4b260b87\nV={\"id\":\"849b5176-5870-4cff-9fec-5717e48b5994\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e750068\nV={\"id\":\"53a51028-171b-4c43-b135-00975759f03b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#004d20f6\nV={\"id\":\"0d5ee97e-975b-4aa5-9487-9652122d187d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#107e4d0d\nV={\"id\":\"c5ed6328-3d83-4c8a-b864-d8308217d0b4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#04d3d0d5\nV={\"id\":\"a2bc8143-de62-4a9f-aadb-6c799aab86c8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#80b5c95c\nV={\"id\":\"0802f3b7-10dd-4229-9b5b-aed338654689\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#91eb673a\nV={\"id\":\"8303966c-78de-4e16-bf2c-5079ee486375\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c93af72d\nV={\"id\":\"aff1ca14-5f6b-46ea-afaf-54d5ff0dc1ff\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9d09ebf6\nV={\"id\":\"3bf121bf-0df4-4f3d-82be-3f4511fa214d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c4c93e31\nV={\"id\":\"639ee98e-2a26-44e6-a88f-461e0722ca43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2fd96b93\nV={\"id\":\"677ee5bb-de74-4de9-9237-7db62e174f75\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64705cfe\nV={\"id\":\"1ab91032-168c-416a-ad62-3337af769f29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#65fca356\nT=-1708318705#ae870fef\nV={\"id\":\"4939a570-2fc3-49c4-a88c-8dbf995ca059\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cbe9c5f7\nV={\"id\":\"62c59bfe-954b-4a8d-b166-79b0394db432\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b3f98903\nV={\"id\":\"cae53026-792f-4758-8836-82ef253b758b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be0fdd1f\nV={\"id\":\"0a423fea-ed66-4151-ac85-a16d28603099\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#46d8619c\nV={\"id\":\"7441ee87-ed85-4c7b-a6b7-9ef828a8ae66\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55891ca4\nV={\"id\":\"9dea9b70-22a7-4d66-b543-763d39e74ac3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6901f89a\nV={\"id\":\"bdf65c96-20b5-4418-9e27-2525e6ce9d64\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be873f0c\nV={\"id\":\"a6a428fe-b6d2-427a-8674-41735bed89a1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#36cd8ba2\nV={\"id\":\"5711a7cb-3025-4fad-8605-28d12a08e6a2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22c63a3b\nV={\"id\":\"ff60fb22-f142-435c-a1e9-dad78968e99d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something\n\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/vA.txt",
    "content": "H=3#0021a605\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage2/vB.txt",
    "content": "H=4#0021a624\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/eB.txt",
    "content": "H=6#0021a662\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/txB.txt",
    "content": "H=2#0021a5e6\nV={\"id\":\"88617055-986f-43f2-9eb7-bf42fd8e152d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0299675e\nV={\"id\":\"705343cf-a6d7-4974-80a9-51c6e4591e5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b733db8b\nV={\"id\":\"ac07cfdb-72ea-4f2e-b9b7-8916815e3324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8027be93\nV={\"id\":\"d8dbd667-2c7d-4281-a279-8d0f2dba94b6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#87de2b63\nV={\"id\":\"9288d794-2db8-4d3f-a16c-e55d57ea9870\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e4d4f36\nV={\"id\":\"9f2cfe58-4f70-4163-bf10-6f59d5975410\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bcc1c663\nV={\"id\":\"efd17158-21c4-48ae-9967-8c08f287eb51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#981b8877\nV={\"id\":\"cc9d4b85-1240-43dd-a229-02d05572bce0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b1da2b3b\nV={\"id\":\"7dfbe2f0-cc90-4e71-bc8f-490bae80ebb0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#482ff46d\nV={\"id\":\"da97bbec-8d6f-419b-988d-647921bdc480\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5491b06e\nV={\"id\":\"b3beea69-2533-4b41-a677-87fd66e83372\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dab0bf\nV={\"id\":\"97d41caa-5c41-42f0-8436-5d7fcac95555\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#12bcfb40\nV={\"id\":\"9eab9c2f-3d02-4da3-876e-39a276bb7dc3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d36f1bb1\nV={\"id\":\"7f7d5b37-a343-4d28-92fd-eeee0ed1f893\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#622abe27\nV={\"id\":\"13f21014-d699-4055-991a-9604a8a47b43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eefbd811\nV={\"id\":\"4dc5f2ac-90be-48b4-8b29-f8d1b2dd5c63\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e61632db\nV={\"id\":\"d1772edb-db8e-4c90-8efb-2de7882525e2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b73d8369\nV={\"id\":\"9fb1924d-6a99-4b8d-8753-1973942cdf2d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68f355b5\nV={\"id\":\"66359d91-3fa9-4aef-8d92-c9d58a5e9145\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a1b6d414\nV={\"id\":\"3812c60f-e7a5-4976-8202-2e3d485c7400\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#83ef054c\nV={\"id\":\"0d3868a6-cb1d-46b4-b991-9c12e498698d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#56a76385\nV={\"id\":\"d7e3d2a4-9e55-4802-b1de-2657ac1eb6fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7111a838\nV={\"id\":\"5115f873-63f8-4e80-bc9f-944c8b9a4c3d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#380f9e5a\nV={\"id\":\"eccee69e-b491-47e1-b9fe-f35854b2f34a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1908e04b\nV={\"id\":\"3ce7e859-d3c9-4b9b-a689-cb29163d23ec\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fa7992c0\nV={\"id\":\"ff18f029-ee0b-4b56-9257-c6d8dc4d4a2b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e25c5a3\nV={\"id\":\"e01da54b-845e-43f9-9ea7-b1d05df25ab7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#185795d5\nV={\"id\":\"5e5cb34f-74f1-4387-ae79-5e6dd14dbf6e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#15b1ab71\nV={\"id\":\"88fb62d1-edbb-4a22-8095-37b30e765c10\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f43cc77b\nV={\"id\":\"11444e59-f3db-43bd-9e37-eee9682a0e29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#304225d4\nV={\"id\":\"7a81607c-7d33-487d-80a7-33e48ac380e5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#54d77c21\nV={\"id\":\"33ba8a9e-9f71-4b89-99b0-b3a635d21576\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6f491d89\nV={\"id\":\"8ce4049f-15fe-40a1-a533-624ec54ce284\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6d31ea99\nV={\"id\":\"d644a055-41c2-4b8d-a841-f7bdd3942725\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0193f110\nV={\"id\":\"ca465253-bd5c-4932-9fae-9a1cf686be8b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fabf55d\nV={\"id\":\"57832a48-df92-4040-9db0-439f9898aab5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3878e0bf\nV={\"id\":\"3caea050-1795-444b-bb15-4b3f5749ccea\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7cd0cf86\nV={\"id\":\"b02d213c-c962-48dc-b151-8c682c6fbfac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4b260b87\nV={\"id\":\"849b5176-5870-4cff-9fec-5717e48b5994\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e750068\nV={\"id\":\"53a51028-171b-4c43-b135-00975759f03b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#004d20f6\nV={\"id\":\"0d5ee97e-975b-4aa5-9487-9652122d187d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#107e4d0d\nV={\"id\":\"c5ed6328-3d83-4c8a-b864-d8308217d0b4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#04d3d0d5\nV={\"id\":\"a2bc8143-de62-4a9f-aadb-6c799aab86c8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#80b5c95c\nV={\"id\":\"0802f3b7-10dd-4229-9b5b-aed338654689\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#91eb673a\nV={\"id\":\"8303966c-78de-4e16-bf2c-5079ee486375\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c93af72d\nV={\"id\":\"aff1ca14-5f6b-46ea-afaf-54d5ff0dc1ff\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9d09ebf6\nV={\"id\":\"3bf121bf-0df4-4f3d-82be-3f4511fa214d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c4c93e31\nV={\"id\":\"639ee98e-2a26-44e6-a88f-461e0722ca43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2fd96b93\nV={\"id\":\"677ee5bb-de74-4de9-9237-7db62e174f75\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64705cfe\nV={\"id\":\"1ab91032-168c-416a-ad62-3337af769f29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#65fca356\nT=-1708318705#ae870fef\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/vA.txt",
    "content": "H=3#0021a605\nV={\"id\":\"4939a570-2fc3-49c4-a88c-8dbf995ca059\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cbe9c5f7\nV={\"id\":\"62c59bfe-954b-4a8d-b166-79b0394db432\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b3f98903\nV={\"id\":\"cae53026-792f-4758-8836-82ef253b758b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be0fdd1f\nV={\"id\":\"0a423fea-ed66-4151-ac85-a16d28603099\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#46d8619c\nV={\"id\":\"7441ee87-ed85-4c7b-a6b7-9ef828a8ae66\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55891ca4\nV={\"id\":\"9dea9b70-22a7-4d66-b543-763d39e74ac3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6901f89a\nV={\"id\":\"bdf65c96-20b5-4418-9e27-2525e6ce9d64\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be873f0c\nV={\"id\":\"a6a428fe-b6d2-427a-8674-41735bed89a1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#36cd8ba2\nV={\"id\":\"5711a7cb-3025-4fad-8605-28d12a08e6a2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22c63a3b\nV={\"id\":\"ff60fb22-f142-435c-a1e9-dad78968e99d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#20e7c528\nV={\"id\":\"f390e034-c346-44c4-a919-bc45c615e70d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1b0707a2\nV={\"id\":\"6a27512d-9d8b-4190-87ec-cd4dc8f8964d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f5a3412b\nV={\"id\":\"91957136-002a-47e4-8351-a45531dd374b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8d403c50\nV={\"id\":\"0f73f23a-4113-48c1-ba3f-1596a2ed325e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#581ea883\nV={\"id\":\"893f6b99-7da4-4d2d-8660-b3025ef094d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c97c97ce\nV={\"id\":\"53ccbd4a-1071-4dd4-9797-cf9820d30f97\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eadd8e95\nV={\"id\":\"29b633c4-791d-4084-ac52-112bab10e8d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#79a97e91\nV={\"id\":\"5e32e7c0-3097-4af3-8534-41b00e5c2075\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abd83757\nV={\"id\":\"061aa8c7-3d4d-42a9-bf2c-5b41bf7c3334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a7bb8ad4\nV={\"id\":\"ef292fa8-42c6-4d7d-b664-be4ecdc9a334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d7092785\nV={\"id\":\"202a0cc9-de3e-45c5-b09d-ee5dfbf9f446\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ecb86525\nV={\"id\":\"204ffb01-4a52-41a1-bf62-ac8573f069e6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3f13c007\nV={\"id\":\"6fe4d83c-e4a4-4195-9618-8a9b8dcdeabe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c17785c\nV={\"id\":\"282e4ee9-15be-45de-be85-f7e5541b504f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0617b779\nV={\"id\":\"10df704b-c692-4934-836b-05937ffefd4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c0e9f439\nV={\"id\":\"1bcbe6d7-6c47-447e-b268-30f45e91d569\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e934a569\nV={\"id\":\"0c73d06c-57f1-4bf2-9f26-3e5bfbd6fb5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#99a8d417\nV={\"id\":\"a095ae24-9764-4f3a-8925-c2553c7bdf0a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e551cdc2\nV={\"id\":\"da27b121-cf6f-4062-8320-4a73e5bd5579\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#acb3edd7\nV={\"id\":\"a14c8381-b950-4cad-b4c9-c6e6e23de413\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9a27f052\nV={\"id\":\"b820a339-9a45-44b3-a40d-25347c50c1fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d5f4c62e\nV={\"id\":\"2bdd4ed5-e0be-4f73-8842-56aba2b0d788\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ff1615c8\nV={\"id\":\"82146009-6c33-433e-a28c-62f59abf6bdd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#941e52e5\nV={\"id\":\"7735542b-7a75-4262-b448-5195f286bac8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#861cef0d\nV={\"id\":\"acf127c3-39a7-4421-9131-8b4082c39a74\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#357e1fac\nV={\"id\":\"3311ee22-4b88-4126-83c3-b6e989a47bc9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bc280b6b\nV={\"id\":\"2352c173-6966-4269-9154-58e6b4ab9bb7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#25bd859c\nV={\"id\":\"056d15fa-0c9d-47c5-8339-18ab9a4b8a5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d18c08b2\nV={\"id\":\"3aee3a5b-4643-4e3e-82fe-f954ff2666af\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2f3e9de3\nV={\"id\":\"1d048031-14ef-4b52-9b71-630575186d88\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0b664aca\nV={\"id\":\"4c941fb7-da15-4e44-9722-5519f775f9c3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64eb0a30\nV={\"id\":\"fead9f79-1b9d-45cc-8b8f-509704b94324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#335049bd\nV={\"id\":\"7baad6bf-f18a-4de0-a819-38d12a6d7063\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#760171e2\nV={\"id\":\"477e49ab-4033-477b-b834-eb48ccf34341\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#23774854\nV={\"id\":\"6e839a0e-886c-4ec6-8389-7a18e988b123\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0738f1d9\nV={\"id\":\"944b3f17-2d84-4e4f-afa4-15908f4c0841\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cd0e4774\nV={\"id\":\"114e05da-5a69-4ff5-87fb-997b1f03c991\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f6692975\nV={\"id\":\"5c0f9af6-ff49-4938-807d-63e4c9d1faa3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c63cc9d8\nV={\"id\":\"92e0e9ae-e7c2-4a5b-b35d-efdfc296bc9e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0de7295f\nV={\"id\":\"d80c8a3a-dd7d-4c85-9603-85ef5bb20c41\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#add1d828\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage3/vB.txt",
    "content": "H=4#0021a624\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/eB.txt",
    "content": "H=6#0021a662\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/txB.txt",
    "content": "H=2#0021a5e6\nV={\"id\":\"88617055-986f-43f2-9eb7-bf42fd8e152d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0299675e\nV={\"id\":\"705343cf-a6d7-4974-80a9-51c6e4591e5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b733db8b\nV={\"id\":\"ac07cfdb-72ea-4f2e-b9b7-8916815e3324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8027be93\nV={\"id\":\"d8dbd667-2c7d-4281-a279-8d0f2dba94b6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#87de2b63\nV={\"id\":\"9288d794-2db8-4d3f-a16c-e55d57ea9870\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e4d4f36\nV={\"id\":\"9f2cfe58-4f70-4163-bf10-6f59d5975410\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bcc1c663\nV={\"id\":\"efd17158-21c4-48ae-9967-8c08f287eb51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#981b8877\nV={\"id\":\"cc9d4b85-1240-43dd-a229-02d05572bce0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b1da2b3b\nV={\"id\":\"7dfbe2f0-cc90-4e71-bc8f-490bae80ebb0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#482ff46d\nV={\"id\":\"da97bbec-8d6f-419b-988d-647921bdc480\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5491b06e\nV={\"id\":\"b3beea69-2533-4b41-a677-87fd66e83372\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dab0bf\nV={\"id\":\"97d41caa-5c41-42f0-8436-5d7fcac95555\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#12bcfb40\nV={\"id\":\"9eab9c2f-3d02-4da3-876e-39a276bb7dc3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d36f1bb1\nV={\"id\":\"7f7d5b37-a343-4d28-92fd-eeee0ed1f893\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#622abe27\nV={\"id\":\"13f21014-d699-4055-991a-9604a8a47b43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eefbd811\nV={\"id\":\"4dc5f2ac-90be-48b4-8b29-f8d1b2dd5c63\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e61632db\nV={\"id\":\"d1772edb-db8e-4c90-8efb-2de7882525e2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b73d8369\nV={\"id\":\"9fb1924d-6a99-4b8d-8753-1973942cdf2d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68f355b5\nV={\"id\":\"66359d91-3fa9-4aef-8d92-c9d58a5e9145\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a1b6d414\nV={\"id\":\"3812c60f-e7a5-4976-8202-2e3d485c7400\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#83ef054c\nV={\"id\":\"0d3868a6-cb1d-46b4-b991-9c12e498698d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#56a76385\nV={\"id\":\"d7e3d2a4-9e55-4802-b1de-2657ac1eb6fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7111a838\nV={\"id\":\"5115f873-63f8-4e80-bc9f-944c8b9a4c3d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#380f9e5a\nV={\"id\":\"eccee69e-b491-47e1-b9fe-f35854b2f34a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1908e04b\nV={\"id\":\"3ce7e859-d3c9-4b9b-a689-cb29163d23ec\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fa7992c0\nV={\"id\":\"ff18f029-ee0b-4b56-9257-c6d8dc4d4a2b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e25c5a3\nV={\"id\":\"e01da54b-845e-43f9-9ea7-b1d05df25ab7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#185795d5\nV={\"id\":\"5e5cb34f-74f1-4387-ae79-5e6dd14dbf6e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#15b1ab71\nV={\"id\":\"88fb62d1-edbb-4a22-8095-37b30e765c10\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f43cc77b\nV={\"id\":\"11444e59-f3db-43bd-9e37-eee9682a0e29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#304225d4\nV={\"id\":\"7a81607c-7d33-487d-80a7-33e48ac380e5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#54d77c21\nV={\"id\":\"33ba8a9e-9f71-4b89-99b0-b3a635d21576\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6f491d89\nV={\"id\":\"8ce4049f-15fe-40a1-a533-624ec54ce284\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6d31ea99\nV={\"id\":\"d644a055-41c2-4b8d-a841-f7bdd3942725\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0193f110\nV={\"id\":\"ca465253-bd5c-4932-9fae-9a1cf686be8b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fabf55d\nV={\"id\":\"57832a48-df92-4040-9db0-439f9898aab5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3878e0bf\nV={\"id\":\"3caea050-1795-444b-bb15-4b3f5749ccea\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7cd0cf86\nV={\"id\":\"b02d213c-c962-48dc-b151-8c682c6fbfac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4b260b87\nV={\"id\":\"849b5176-5870-4cff-9fec-5717e48b5994\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e750068\nV={\"id\":\"53a51028-171b-4c43-b135-00975759f03b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#004d20f6\nV={\"id\":\"0d5ee97e-975b-4aa5-9487-9652122d187d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#107e4d0d\nV={\"id\":\"c5ed6328-3d83-4c8a-b864-d8308217d0b4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#04d3d0d5\nV={\"id\":\"a2bc8143-de62-4a9f-aadb-6c799aab86c8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#80b5c95c\nV={\"id\":\"0802f3b7-10dd-4229-9b5b-aed338654689\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#91eb673a\nV={\"id\":\"8303966c-78de-4e16-bf2c-5079ee486375\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c93af72d\nV={\"id\":\"aff1ca14-5f6b-46ea-afaf-54d5ff0dc1ff\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9d09ebf6\nV={\"id\":\"3bf121bf-0df4-4f3d-82be-3f4511fa214d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c4c93e31\nV={\"id\":\"639ee98e-2a26-44e6-a88f-461e0722ca43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2fd96b93\nV={\"id\":\"677ee5bb-de74-4de9-9237-7db62e174f75\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64705cfe\nV={\"id\":\"1ab91032-168c-416a-ad62-3337af769f29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#65fca356\nT=-1708318705#ae870fef\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/vA.txt",
    "content": "H=3#0021a605\nV={\"id\":\"4939a570-2fc3-49c4-a88c-8dbf995ca059\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cbe9c5f7\nV={\"id\":\"62c59bfe-954b-4a8d-b166-79b0394db432\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b3f98903\nV={\"id\":\"cae53026-792f-4758-8836-82ef253b758b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be0fdd1f\nV={\"id\":\"0a423fea-ed66-4151-ac85-a16d28603099\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#46d8619c\nV={\"id\":\"7441ee87-ed85-4c7b-a6b7-9ef828a8ae66\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55891ca4\nV={\"id\":\"9dea9b70-22a7-4d66-b543-763d39e74ac3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6901f89a\nV={\"id\":\"bdf65c96-20b5-4418-9e27-2525e6ce9d64\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be873f0c\nV={\"id\":\"a6a428fe-b6d2-427a-8674-41735bed89a1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#36cd8ba2\nV={\"id\":\"5711a7cb-3025-4fad-8605-28d12a08e6a2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22c63a3b\nV={\"id\":\"ff60fb22-f142-435c-a1e9-dad78968e99d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#20e7c528\nV={\"id\":\"f390e034-c346-44c4-a919-bc45c615e70d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1b0707a2\nV={\"id\":\"6a27512d-9d8b-4190-87ec-cd4dc8f8964d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f5a3412b\nV={\"id\":\"91957136-002a-47e4-8351-a45531dd374b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8d403c50\nV={\"id\":\"0f73f23a-4113-48c1-ba3f-1596a2ed325e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#581ea883\nV={\"id\":\"893f6b99-7da4-4d2d-8660-b3025ef094d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c97c97ce\nV={\"id\":\"53ccbd4a-1071-4dd4-9797-cf9820d30f97\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eadd8e95\nV={\"id\":\"29b633c4-791d-4084-ac52-112bab10e8d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#79a97e91\nV={\"id\":\"5e32e7c0-3097-4af3-8534-41b00e5c2075\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abd83757\nV={\"id\":\"061aa8c7-3d4d-42a9-bf2c-5b41bf7c3334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a7bb8ad4\nV={\"id\":\"ef292fa8-42c6-4d7d-b664-be4ecdc9a334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d7092785\nV={\"id\":\"202a0cc9-de3e-45c5-b09d-ee5dfbf9f446\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ecb86525\nV={\"id\":\"204ffb01-4a52-41a1-bf62-ac8573f069e6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3f13c007\nV={\"id\":\"6fe4d83c-e4a4-4195-9618-8a9b8dcdeabe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c17785c\nV={\"id\":\"282e4ee9-15be-45de-be85-f7e5541b504f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0617b779\nV={\"id\":\"10df704b-c692-4934-836b-05937ffefd4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c0e9f439\nL=2#00237762\nV={\"id\":\"1bcbe6d7-6c47-447e-b268-30f45e91d569\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e934a569\nV={\"id\":\"0c73d06c-57f1-4bf2-9f26-3e5bfbd6fb5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#99a8d417\nV={\"id\":\"a095ae24-9764-4f3a-8925-c2553c7bdf0a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e551cdc2\nV={\"id\":\"da27b121-cf6f-4062-8320-4a73e5bd5579\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#acb3edd7\nV={\"id\":\"a14c8381-b950-4cad-b4c9-c6e6e23de413\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9a27f052\nV={\"id\":\"b820a339-9a45-44b3-a40d-25347c50c1fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d5f4c62e\nV={\"id\":\"2bdd4ed5-e0be-4f73-8842-56aba2b0d788\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ff1615c8\nV={\"id\":\"82146009-6c33-433e-a28c-62f59abf6bdd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#941e52e5\nV={\"id\":\"7735542b-7a75-4262-b448-5195f286bac8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#861cef0d\nV={\"id\":\"acf127c3-39a7-4421-9131-8b4082c39a74\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#357e1fac\nV={\"id\":\"3311ee22-4b88-4126-83c3-b6e989a47bc9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bc280b6b\nV={\"id\":\"2352c173-6966-4269-9154-58e6b4ab9bb7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#25bd859c\nV={\"id\":\"056d15fa-0c9d-47c5-8339-18ab9a4b8a5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d18c08b2\nV={\"id\":\"3aee3a5b-4643-4e3e-82fe-f954ff2666af\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2f3e9de3\nV={\"id\":\"1d048031-14ef-4b52-9b71-630575186d88\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0b664aca\nV={\"id\":\"4c941fb7-da15-4e44-9722-5519f775f9c3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64eb0a30\nV={\"id\":\"fead9f79-1b9d-45cc-8b8f-509704b94324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#335049bd\nV={\"id\":\"7baad6bf-f18a-4de0-a819-38d12a6d7063\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#760171e2\nV={\"id\":\"477e49ab-4033-477b-b834-eb48ccf34341\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#23774854\nV={\"id\":\"6e839a0e-886c-4ec6-8389-7a18e988b123\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0738f1d9\nV={\"id\":\"944b3f17-2d84-4e4f-afa4-15908f4c0841\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cd0e4774\nV={\"id\":\"114e05da-5a69-4ff5-87fb-997b1f03c991\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f6692975\nV={\"id\":\"5c0f9af6-ff49-4938-807d-63e4c9d1faa3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c63cc9d8\nV={\"id\":\"92e0e9ae-e7c2-4a5b-b35d-efdfc296bc9e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0de7295f\nV={\"id\":\"d80c8a3a-dd7d-4c85-9603-85ef5bb20c41\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#add1d828\n"
  },
  {
    "path": "src/test/resources/recovery/stage4/vB.txt",
    "content": "H=4#0021a624\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/eB.txt",
    "content": "H=6#0021a662\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/txB.txt",
    "content": "H=2#0021a5e6\nV={\"id\":\"88617055-986f-43f2-9eb7-bf42fd8e152d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0299675e\nV={\"id\":\"705343cf-a6d7-4974-80a9-51c6e4591e5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b733db8b\nV={\"id\":\"ac07cfdb-72ea-4f2e-b9b7-8916815e3324\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8027be93\nV={\"id\":\"d8dbd667-2c7d-4281-a279-8d0f2dba94b6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#87de2b63\nV={\"id\":\"9288d794-2db8-4d3f-a16c-e55d57ea9870\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e4d4f36\nV={\"id\":\"9f2cfe58-4f70-4163-bf10-6f59d5975410\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#bcc1c663\nV={\"id\":\"efd17158-21c4-48ae-9967-8c08f287eb51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#981b8877\nV={\"id\":\"cc9d4b85-1240-43dd-a229-02d05572bce0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b1da2b3b\nV={\"id\":\"7dfbe2f0-cc90-4e71-bc8f-490bae80ebb0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#482ff46d\nV={\"id\":\"da97bbec-8d6f-419b-988d-647921bdc480\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5491b06e\nV={\"id\":\"b3beea69-2533-4b41-a677-87fd66e83372\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dab0bf\nV={\"id\":\"97d41caa-5c41-42f0-8436-5d7fcac95555\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#12bcfb40\nV={\"id\":\"9eab9c2f-3d02-4da3-876e-39a276bb7dc3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d36f1bb1\nV={\"id\":\"7f7d5b37-a343-4d28-92fd-eeee0ed1f893\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#622abe27\nV={\"id\":\"13f21014-d699-4055-991a-9604a8a47b43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eefbd811\nV={\"id\":\"4dc5f2ac-90be-48b4-8b29-f8d1b2dd5c63\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e61632db\nV={\"id\":\"d1772edb-db8e-4c90-8efb-2de7882525e2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b73d8369\nV={\"id\":\"9fb1924d-6a99-4b8d-8753-1973942cdf2d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68f355b5\nV={\"id\":\"66359d91-3fa9-4aef-8d92-c9d58a5e9145\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a1b6d414\nV={\"id\":\"3812c60f-e7a5-4976-8202-2e3d485c7400\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#83ef054c\nV={\"id\":\"0d3868a6-cb1d-46b4-b991-9c12e498698d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#56a76385\nV={\"id\":\"d7e3d2a4-9e55-4802-b1de-2657ac1eb6fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7111a838\nV={\"id\":\"5115f873-63f8-4e80-bc9f-944c8b9a4c3d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#380f9e5a\nV={\"id\":\"eccee69e-b491-47e1-b9fe-f35854b2f34a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1908e04b\nV={\"id\":\"3ce7e859-d3c9-4b9b-a689-cb29163d23ec\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fa7992c0\nV={\"id\":\"ff18f029-ee0b-4b56-9257-c6d8dc4d4a2b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e25c5a3\nV={\"id\":\"e01da54b-845e-43f9-9ea7-b1d05df25ab7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#185795d5\nV={\"id\":\"5e5cb34f-74f1-4387-ae79-5e6dd14dbf6e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#15b1ab71\nV={\"id\":\"88fb62d1-edbb-4a22-8095-37b30e765c10\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f43cc77b\nV={\"id\":\"11444e59-f3db-43bd-9e37-eee9682a0e29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#304225d4\nV={\"id\":\"7a81607c-7d33-487d-80a7-33e48ac380e5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#54d77c21\nV={\"id\":\"33ba8a9e-9f71-4b89-99b0-b3a635d21576\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6f491d89\nV={\"id\":\"8ce4049f-15fe-40a1-a533-624ec54ce284\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6d31ea99\nV={\"id\":\"d644a055-41c2-4b8d-a841-f7bdd3942725\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0193f110\nV={\"id\":\"ca465253-bd5c-4932-9fae-9a1cf686be8b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fabf55d\nV={\"id\":\"57832a48-df92-4040-9db0-439f9898aab5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3878e0bf\nV={\"id\":\"3caea050-1795-444b-bb15-4b3f5749ccea\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7cd0cf86\nV={\"id\":\"b02d213c-c962-48dc-b151-8c682c6fbfac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4b260b87\nV={\"id\":\"849b5176-5870-4cff-9fec-5717e48b5994\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1e750068\nV={\"id\":\"53a51028-171b-4c43-b135-00975759f03b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#004d20f6\nV={\"id\":\"0d5ee97e-975b-4aa5-9487-9652122d187d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#107e4d0d\nV={\"id\":\"c5ed6328-3d83-4c8a-b864-d8308217d0b4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#04d3d0d5\nV={\"id\":\"a2bc8143-de62-4a9f-aadb-6c799aab86c8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#80b5c95c\nV={\"id\":\"0802f3b7-10dd-4229-9b5b-aed338654689\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#91eb673a\nV={\"id\":\"8303966c-78de-4e16-bf2c-5079ee486375\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c93af72d\nV={\"id\":\"aff1ca14-5f6b-46ea-afaf-54d5ff0dc1ff\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9d09ebf6\nV={\"id\":\"3bf121bf-0df4-4f3d-82be-3f4511fa214d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c4c93e31\nV={\"id\":\"639ee98e-2a26-44e6-a88f-461e0722ca43\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2fd96b93\nV={\"id\":\"677ee5bb-de74-4de9-9237-7db62e174f75\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#64705cfe\nV={\"id\":\"1ab91032-168c-416a-ad62-3337af769f29\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#65fca356\nT=-1708318705#ae870fef\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/vA.txt",
    "content": "H=3#0021a605\nV={\"id\":\"4939a570-2fc3-49c4-a88c-8dbf995ca059\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cbe9c5f7\nV={\"id\":\"62c59bfe-954b-4a8d-b166-79b0394db432\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b3f98903\nV={\"id\":\"cae53026-792f-4758-8836-82ef253b758b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be0fdd1f\nV={\"id\":\"0a423fea-ed66-4151-ac85-a16d28603099\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#46d8619c\nV={\"id\":\"7441ee87-ed85-4c7b-a6b7-9ef828a8ae66\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55891ca4\nV={\"id\":\"9dea9b70-22a7-4d66-b543-763d39e74ac3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6901f89a\nV={\"id\":\"bdf65c96-20b5-4418-9e27-2525e6ce9d64\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#be873f0c\nV={\"id\":\"a6a428fe-b6d2-427a-8674-41735bed89a1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#36cd8ba2\nV={\"id\":\"5711a7cb-3025-4fad-8605-28d12a08e6a2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22c63a3b\nV={\"id\":\"ff60fb22-f142-435c-a1e9-dad78968e99d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#20e7c528\nV={\"id\":\"f390e034-c346-44c4-a919-bc45c615e70d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1b0707a2\nV={\"id\":\"6a27512d-9d8b-4190-87ec-cd4dc8f8964d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f5a3412b\nV={\"id\":\"91957136-002a-47e4-8351-a45531dd374b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8d403c50\nV={\"id\":\"0f73f23a-4113-48c1-ba3f-1596a2ed325e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#581ea883\nV={\"id\":\"893f6b99-7da4-4d2d-8660-b3025ef094d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c97c97ce\nV={\"id\":\"53ccbd4a-1071-4dd4-9797-cf9820d30f97\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#eadd8e95\nV={\"id\":\"29b633c4-791d-4084-ac52-112bab10e8d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#79a97e91\nV={\"id\":\"5e32e7c0-3097-4af3-8534-41b00e5c2075\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abd83757\nV={\"id\":\"061aa8c7-3d4d-42a9-bf2c-5b41bf7c3334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a7bb8ad4\nV={\"id\":\"ef292fa8-42c6-4d7d-b664-be4ecdc9a334\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d7092785\nV={\"id\":\"202a0cc9-de3e-45c5-b09d-ee5dfbf9f446\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ecb86525\nV={\"id\":\"204ffb01-4a52-41a1-bf62-ac8573f069e6\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3f13c007\nV={\"id\":\"6fe4d83c-e4a4-4195-9618-8a9b8dcdeabe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c17785c\nV={\"id\":\"282e4ee9-15be-45de-be85-f7e5541b504f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0617b779\nV={\"id\":\"10df704b-c692-4934-836b-05937ffefd4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c0e9f439\nL=2#00237762\nV={\"id\":\"1bcbe6d7-6c47-447e-b268-30f45e91d569\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e934a569\nV={\"id\":\"0c73d06c-57f1-4bf2-9f26-3e5bfbd6fb5a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#99a8d417\nV={\"id\":\"a095ae24-9764-4f3a-8925-c2553c7bdf0a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e551cdc2\nV={\"id\":\"da27b121-cf6f-4062-8320-4a73e5bd5579\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#acb3edd7\nV={\"id\":\"a14c8381-b950-4cad-b4c9-c6e6e23de413\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9a27f052\nV={\"id\":\"b820a339-9a45-44b3-a40d-25347c50c1fb\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d5f4c62e\nV={\"id\":\"2bdd4ed5-e0be-4f73-8842-56aba2b0d788\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ff1615c8\nV={\"id\":\"82146009-6c33-433e-a28c-62f59abf6bdd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#941e52e5\nV={\"id\":\"7735542b-7a75-4262-b448-5195f286bac8\",\"v\":1ሰማይ አይታረስ ንጉሥ አይከሰስ።\n  ብላ ካለኝ እንደአባቴ በቆመጠኝ።\n  ጌጥ ያለቤቱ ቁምጥና ነው።\n  ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው።\n  የአፍ ወለምታ በቅቤ አይታሽም።\n  አይጥ በበላ ዳዋ ተመታ።\n  ሲተረጉሙ ይደረግሙ።\n  ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል።\n  ድር ቢያብር አንበሳ ያስር።\n"
  },
  {
    "path": "src/test/resources/recovery/stage5/vB.txt",
    "content": "H=4#0021a624\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\nE={\"id\":\"804c73b7-1cd1-45fa-aa03-85d5656131a1\",\"v\":1,\"s\":\"M\",\"o\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"b31135af-901f-4ae6-9247-d8460a53682e\"}#cecefc15\nE={\"id\":\"03302f69-421e-4b7d-9e77-fb8d9dc25f05\",\"v\":1,\"s\":\"M\",\"o\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"l\":\"label\\n with multi-lines\",\"i\":\"081f8436-d6dc-42ee-84f6-53570de028c9\"}#5ded03fe\nE={\"id\":\"e1a8b2bd-6511-48c0-8d57-ebde590a332f\",\"v\":1,\"s\":\"M\",\"o\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"l\":\"label\\n with multi-lines\",\"i\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\"}#b3bdc3f6\nE={\"id\":\"8784ea77-bf40-4f04-925a-534a4528dde9\",\"v\":1,\"s\":\"M\",\"o\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\"}#7d7b5c12\nE={\"id\":\"f35d1f29-6cae-49bf-bf51-d31858c1692f\",\"v\":1,\"s\":\"M\",\"o\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"l\":\"label\\n with multi-lines\",\"i\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\"}#58ce3246\nE={\"id\":\"390a1fd4-d945-406d-91b2-57837420b211\",\"v\":1,\"s\":\"M\",\"o\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\"}#e85d1acc\nE={\"id\":\"58685e72-6ee6-4b8d-9554-47152e1eca3a\",\"v\":1,\"s\":\"M\",\"o\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"l\":\"label\\n with multi-lines\",\"i\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\"}#8b8cedbb\nE={\"id\":\"b499e4ed-cad6-431b-841b-bda5247b4066\",\"v\":1,\"s\":\"M\",\"o\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"l\":\"label\\n with multi-lines\",\"i\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\"}#0141ed12\nE={\"id\":\"904a0a02-ea6c-4e13-b2a7-0bf187073055\",\"v\":1,\"s\":\"M\",\"o\":\"d3477712-828c-467e-a500-d65e32097c85\",\"l\":\"label\\n with multi-lines\",\"i\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\"}#ccbf5428\nE={\"id\":\"77f64ad9-7407-4497-b5f2-3b45262eb03c\",\"v\":1,\"s\":\"M\",\"o\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\"}#24c69a9c\nE={\"id\":\"7a4250ff-fef3-422e-a2de-7e80295caab9\",\"v\":1,\"s\":\"M\",\"o\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"l\":\"label\\n with multi-lines\",\"i\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\"}#b431c9bd\nE={\"id\":\"521fd700-05f0-4765-b06b-78147af9c84b\",\"v\":1,\"s\":\"M\",\"o\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"l\":\"label\\n with multi-lines\",\"i\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\"}#5490d960\nE={\"id\":\"0680ce68-da10-4f0c-98bb-77dd6cfff0dd\",\"v\":1,\"s\":\"M\",\"o\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"l\":\"label\\n with multi-lines\",\"i\":\"d3477712-828c-467e-a500-d65e32097c85\"}#319a2a18\nE={\"id\":\"71fc2c5d-15ac-4f73-b18e-e5477f4d27fa\",\"v\":1,\"s\":\"M\",\"o\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"l\":\"label\\n with multi-lines\",\"i\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\"}#75c1b3d4\nE={\"id\":\"578ac1df-93d6-4013-ae61-29b7207c7e63\",\"v\":1,\"s\":\"M\",\"o\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"l\":\"label\\n with multi-lines\",\"i\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\"}#cedd1583\nE={\"id\":\"6205953c-a64e-42af-86b5-7e217f8002a5\",\"v\":1,\"s\":\"M\",\"o\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"l\":\"label\\n with multi-lines\",\"i\":\"302be4e2-b381-474a-a351-f275d6c3215a\"}#cfe9c78b\nE={\"id\":\"4338182a-d3cf-4aa0-8eae-a3be48ca9f69\",\"v\":1,\"s\":\"M\",\"o\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"l\":\"label\\n with multi-lines\",\"i\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\"}#95d4c4f0\nE={\"id\":\"95b128df-8d98-4ef4-9c2d-267912b36853\",\"v\":1,\"s\":\"M\",\"o\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"l\":\"label\\n with multi-lines\",\"i\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\"}#459a573f\nE={\"id\":\"f3e6a68e-9e86-4d06-b740-829a3cba2045\",\"v\":1,\"s\":\"M\",\"o\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"l\":\"label\\n with multi-lines\",\"i\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\"}#93e8bbc2\nE={\"id\":\"4e3e9254-dd08-4ec2-9c40-79f8d2d78ae3\",\"v\":1,\"s\":\"M\",\"o\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"l\":\"label\\n with multi-lines\",\"i\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\"}#f8ede449\nE={\"id\":\"0270e33b-8333-4cd9-9727-984a8c9647d0\",\"v\":1,\"s\":\"M\",\"o\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"l\":\"label\\n with multi-lines\",\"i\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\"}#2381309f\nE={\"id\":\"ef84c81b-585c-49a8-92b5-16a31630fdbb\",\"v\":1,\"s\":\"M\",\"o\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"l\":\"label\\n with multi-lines\",\"i\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\"}#b3da57e2\nE={\"id\":\"50e8ab98-9f19-47fd-aeb7-dd770c0c3b61\",\"v\":1,\"s\":\"M\",\"o\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"l\":\"label\\n with multi-lines\",\"i\":\"4964e145-32e6-4f51-98d8-5535f3546929\"}#2a173fd5\nE={\"id\":\"26be8423-2746-4c02-b414-9d178ae7a134\",\"v\":1,\"s\":\"M\",\"o\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"l\":\"label\\n with multi-lines\",\"i\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\"}#d80fdbe8\nE={\"id\":\"029090d7-1ade-4387-9882-6e9e925fb69c\",\"v\":1,\"s\":\"M\",\"o\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"l\":\"label\\n with multi-lines\",\"i\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\"}#1f13fbac\nE={\"id\":\"ccdb6e73-9217-4e84-aae1-3c0bd8fca7b0\",\"v\":1,\"s\":\"M\",\"o\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\"}#7b1f430e\nE={\"id\":\"5292bbfb-d68c-44c1-832c-5cb42d992d8b\",\"v\":1,\"s\":\"M\",\"o\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"l\":\"label\\n with multi-lines\",\"i\":\"66ba0186-e709-4c05-8305-1ffed1143089\"}#a9a62e17\nE={\"id\":\"3000d197-68b2-4182-9e90-7ccecf58b199\",\"v\":1,\"s\":\"M\",\"o\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"l\":\"label\\n with multi-lines\",\"i\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\"}#851b7dc7\nE={\"id\":\"b846625b-7ee3-4487-9c30-fe77b001d283\",\"v\":1,\"s\":\"M\",\"o\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"l\":\"label\\n with multi-lines\",\"i\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\"}#3f115798\nE={\"id\":\"8263afcd-479b-4d6b-9c7e-5bcca31ed60b\",\"v\":1,\"s\":\"M\",\"o\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"l\":\"label\\n with multi-lines\",\"i\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\"}#accad448\nE={\"id\":\"9c3d1af2-8bb2-457d-b3d0-ecd7dbd81c3d\",\"v\":1,\"s\":\"M\",\"o\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"l\":\"label\\n with multi-lines\",\"i\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\"}#93fd7b76\nE={\"id\":\"273f0d1a-275e-46b3-b117-440bd70421c0\",\"v\":1,\"s\":\"M\",\"o\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\"}#bcf386e3\nE={\"id\":\"107e4a36-a580-42ca-a22e-fa3895e620ba\",\"v\":1,\"s\":\"M\",\"o\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"l\":\"label\\n with multi-lines\",\"i\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\"}#1dd69b3e\nE={\"id\":\"74a55bd0-2f0a-45b5-939a-6f20f9f2aba3\",\"v\":1,\"s\":\"M\",\"o\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"l\":\"label\\n with multi-lines\",\"i\":\"e1332322-88c0-4468-a862-9f45311067ac\"}#363de35e\nE={\"id\":\"240afb59-0dc3-4b0f-bbbd-84ec63ea56b5\",\"v\":1,\"s\":\"M\",\"o\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"l\":\"label\\n with multi-lines\",\"i\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\"}#78bfcd48\nE={\"id\":\"79c976e5-3e7d-4407-8d78-8984e8ee32fe\",\"v\":1,\"s\":\"M\",\"o\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"l\":\"label\\n with multi-lines\",\"i\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\"}#fa291de8\nE={\"id\":\"219d3214-1850-4ac1-a7ff-573c69a88af8\",\"v\":1,\"s\":\"M\",\"o\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a756d65-e069-4e58-ae8e-3abf082496da\"}#b7cb1ad6\nE={\"id\":\"b0dcdd0c-deba-4a7d-8402-17f29f4489f1\",\"v\":1,\"s\":\"M\",\"o\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\"}#70a943df\nE={\"id\":\"d6070049-6365-4703-802c-748261c70508\",\"v\":1,\"s\":\"M\",\"o\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"l\":\"label\\n with multi-lines\",\"i\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\"}#7bafba80\nE={\"id\":\"f4910b68-7843-450c-aee3-da4516f7b118\",\"v\":1,\"s\":\"M\",\"o\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"l\":\"label\\n with multi-lines\",\"i\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\"}#d930e97e\nE={\"id\":\"6bf0cca9-8f51-4c1d-a6d2-c66ca90cedf5\",\"v\":1,\"s\":\"M\",\"o\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"l\":\"label\\n with multi-lines\",\"i\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\"}#92a8e6d4\nE={\"id\":\"14894ace-b151-4509-a8f5-5181b4e463d0\",\"v\":1,\"s\":\"M\",\"o\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"l\":\"label\\n with multi-lines\",\"i\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\"}#fadafbf0\nE={\"id\":\"aff119c4-d6a2-4cb8-924d-e8e5b73bdc4d\",\"v\":1,\"s\":\"M\",\"o\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\"}#034f405d\nE={\"id\":\"29282d33-da5c-4663-9e10-f5161cd2cc2d\",\"v\":1,\"s\":\"M\",\"o\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"l\":\"label\\n with multi-lines\",\"i\":\"108a0886-27a2-4f6e-bc12-67b051861197\"}#46edab09\nE={\"id\":\"3325e648-670a-4db8-ace3-6d37a0cd1b06\",\"v\":1,\"s\":\"M\",\"o\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"l\":\"label\\n with multi-lines\",\"i\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\"}#ead36f3d\nE={\"id\":\"0c635c4e-4aa1-4f7c-8be3-764df35c8567\",\"v\":1,\"s\":\"M\",\"o\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"l\":\"label\\n with multi-lines\",\"i\":\"846a5573-1815-4629-8be0-55eda1204b7d\"}#6e4fcae9\nE={\"id\":\"73ad443e-f233-4089-8179-f59c08b42239\",\"v\":1,\"s\":\"M\",\"o\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a014bff-371e-4740-8a43-33e03685a99f\"}#94272859\nE={\"id\":\"b0ccc7f4-c1cb-4eaa-94f7-221b7a1853bd\",\"v\":1,\"s\":\"M\",\"o\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"l\":\"label\\n with multi-lines\",\"i\":\"22e3370a-2d70-4e35-9599-ab78b814532e\"}#4459e173\nE={\"id\":\"23a2f626-0163-4d27-b1df-e54bb33f1d88\",\"v\":1,\"s\":\"M\",\"o\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"l\":\"label\\n with multi-lines\",\"i\":\"949e4daf-c136-4716-b23a-73e25c6489cc\"}#81418acb\nE={\"id\":\"e6b5344a-31db-49d3-9fa6-585d91cafef3\",\"v\":1,\"s\":\"M\",\"o\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"l\":\"label\\n with multi-lines\",\"i\":\"699e450b-51c1-4ade-a5d4-82404cd81654\"}#18011a65\nE={\"id\":\"a3ff3cc3-e427-476f-b67a-2053d0311ee2\",\"v\":1,\"s\":\"M\",\"o\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"l\":\"label\\n with multi-lines\",\"i\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\"}#2760c68c\nE={\"id\":\"bd876c2e-f1d9-46b5-9ebb-3212531c6262\",\"v\":1,\"s\":\"M\",\"o\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e06501f-3cb1-4a85-b148-407a711373c1\"}#8392c5e8\nE={\"id\":\"39019d0e-03a4-41bf-a525-d3b83891dbb6\",\"v\":1,\"s\":\"M\",\"o\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\"}#b48e26ff\nE={\"id\":\"ae4e5f58-160c-4dd0-b9a3-6a2754f1001f\",\"v\":1,\"s\":\"M\",\"o\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"l\":\"label\\n with multi-lines\",\"i\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\"}#3a6aa91e\nE={\"id\":\"93c2953a-2fd2-4caa-b9a6-963ba7773599\",\"v\":1,\"s\":\"M\",\"o\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\"}#fc73b93b\nE={\"id\":\"f3b7d6ec-4415-44b3-a981-1918f81ef851\",\"v\":1,\"s\":\"M\",\"o\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"l\":\"label\\n with multi-lines\",\"i\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\"}#55868086\nE={\"id\":\"6b27ad0c-e310-433a-9058-35ce7a8d1704\",\"v\":1,\"s\":\"M\",\"o\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"l\":\"label\\n with multi-lines\",\"i\":\"b83eac55-4589-4a17-90cc-cb24640727f1\"}#8f39461c\nE={\"id\":\"dd67b143-3a7c-4c54-a3b8-f459812e5e8e\",\"v\":1,\"s\":\"M\",\"o\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"l\":\"label\\n with multi-lines\",\"i\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\"}#d2499996\nE={\"id\":\"db6905ca-2e48-44ce-850c-fa594c852678\",\"v\":1,\"s\":\"M\",\"o\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"l\":\"label\\n with multi-lines\",\"i\":\"d41954be-3d11-473e-92c3-209fabfc13e3\"}#5ab08e5b\nE={\"id\":\"7d8860a2-7d8c-4754-80f8-c0f4e840b6b1\",\"v\":1,\"s\":\"M\",\"o\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"l\":\"label\\n with multi-lines\",\"i\":\"9a37b710-2dce-4283-994a-a95975660ae7\"}#28ef3e2f\nE={\"id\":\"933a7de9-a5e5-467b-9272-df7840b96156\",\"v\":1,\"s\":\"M\",\"o\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"l\":\"label\\n with multi-lines\",\"i\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\"}#695be7c6\nE={\"id\":\"3d7cb93f-5ba2-45a2-b672-822d438df47b\",\"v\":1,\"s\":\"M\",\"o\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"l\":\"label\\n with multi-lines\",\"i\":\"3215900c-8252-4027-9956-22e43e46a123\"}#bcee1da4\nE={\"id\":\"ced4254b-e43c-4460-8e80-963aa93f3a97\",\"v\":1,\"s\":\"M\",\"o\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"l\":\"label\\n with multi-lines\",\"i\":\"a82b5a47-1213-4132-a5ef-66e52716f789\"}#7b95e590\nE={\"id\":\"f6da2faf-ee1f-4534-9bd5-db7cbc33cf55\",\"v\":1,\"s\":\"M\",\"o\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"l\":\"label\\n with multi-lines\",\"i\":\"a812c713-46c8-4895-a610-a616c6aa792d\"}#94b647ed\nE={\"id\":\"66247646-3490-412c-9aaa-0e4dd1c6a2dd\",\"v\":1,\"s\":\"M\",\"o\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\"}#1ff54eae\nE={\"id\":\"58240965-488d-4353-9670-74008dc4f2d8\",\"v\":1,\"s\":\"M\",\"o\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"l\":\"label\\n with multi-lines\",\"i\":\"77cf4be1-be66-45b8-903f-f1740d698120\"}#04e76170\nE={\"id\":\"90a1fae4-06eb-48fe-afc5-9f5c6b53fe4e\",\"v\":1,\"s\":\"M\",\"o\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"l\":\"label\\n with multi-lines\",\"i\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\"}#5904a3f9\nE={\"id\":\"6f0ad059-0b25-469b-bf84-3c02680cdcd5\",\"v\":1,\"s\":\"M\",\"o\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"l\":\"label\\n with multi-lines\",\"i\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\"}#52975593\nE={\"id\":\"24aeb471-4a07-4798-b33b-3ed68fd0db89\",\"v\":1,\"s\":\"M\",\"o\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"l\":\"label\\n with multi-lines\",\"i\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\"}#440d6a51\nE={\"id\":\"ef57d5bc-2701-43a7-ad56-c8d96983bd7a\",\"v\":1,\"s\":\"M\",\"o\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"l\":\"label\\n with multi-lines\",\"i\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\"}#23a3ea34\nE={\"id\":\"36c401da-dc33-4087-a50f-d6a9501cf72a\",\"v\":1,\"s\":\"M\",\"o\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"l\":\"label\\n with multi-lines\",\"i\":\"a632888c-7486-42cf-93d5-d1aff3395a47\"}#f56c8f9a\nE={\"id\":\"8026beaa-170a-45a0-8e7b-5cc5d7caa5fa\",\"v\":1,\"s\":\"M\",\"o\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"l\":\"label\\n with multi-lines\",\"i\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\"}#94780096\nE={\"id\":\"5a571fd9-91a4-47d8-a9b1-41616f741bd5\",\"v\":1,\"s\":\"M\",\"o\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\"}#5e506578\nE={\"id\":\"e8cda01d-e169-4277-a5e7-10e5847d615c\",\"v\":1,\"s\":\"M\",\"o\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\"}#d4cc0c42\nE={\"id\":\"e5448c3c-4fdf-4c7e-baa3-abb29171fa08\",\"v\":1,\"s\":\"M\",\"o\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"l\":\"label\\n with multi-lines\",\"i\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\"}#bf852970\nE={\"id\":\"945ddcb5-67df-4d91-b985-d02b51b2db18\",\"v\":1,\"s\":\"M\",\"o\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"l\":\"label\\n with multi-lines\",\"i\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\"}#67392e9f\nE={\"id\":\"fe528e79-9b14-41bb-a4be-49e3bf61e554\",\"v\":1,\"s\":\"M\",\"o\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"l\":\"label\\n with multi-lines\",\"i\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\"}#85393692\nE={\"id\":\"26114871-f2a7-4894-bd6d-1922c38c9861\",\"v\":1,\"s\":\"M\",\"o\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"l\":\"label\\n with multi-lines\",\"i\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\"}#dbe772fa\nE={\"id\":\"170b651d-830d-4065-847c-877d14e18d94\",\"v\":1,\"s\":\"M\",\"o\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"l\":\"label\\n with multi-lines\",\"i\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\"}#afca4775\nE={\"id\":\"6ab9736c-138f-4f6f-a3b0-65513eea5c56\",\"v\":1,\"s\":\"M\",\"o\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"l\":\"label\\n with multi-lines\",\"i\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\"}#7652a454\nE={\"id\":\"166e4435-7653-42b5-8904-a39d2c229351\",\"v\":1,\"s\":\"M\",\"o\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"l\":\"label\\n with multi-lines\",\"i\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\"}#eb0c9eb5\nE={\"id\":\"fa5be5aa-a293-4c98-8873-b7bad7ab7c21\",\"v\":1,\"s\":\"M\",\"o\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"l\":\"label\\n with multi-lines\",\"i\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\"}#0b3c2e65\nE={\"id\":\"1c6e222c-631c-45d0-bd98-924eeccfa0fb\",\"v\":1,\"s\":\"M\",\"o\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"l\":\"label\\n with multi-lines\",\"i\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\"}#d75d7386\nE={\"id\":\"c4e04a23-6c5e-4dd5-8246-66a49890322a\",\"v\":1,\"s\":\"M\",\"o\":\"3215900c-8252-4027-9956-22e43e46a123\",\"l\":\"label\\n with multi-lines\",\"i\":\"363fc50d-2628-424a-abf8-665b29a2b22d\"}#7e9dd200\nE={\"id\":\"4a9b3290-a265-4c0a-b0e9-0c66c1c0c1e6\",\"v\":1,\"s\":\"M\",\"o\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"l\":\"label\\n with multi-lines\",\"i\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\"}#b449d213\nE={\"id\":\"326d76e9-46a9-4b02-b905-9fa5322407cd\",\"v\":1,\"s\":\"M\",\"o\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"l\":\"label\\n with multi-lines\",\"i\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\"}#91bba6e7\nE={\"id\":\"32b3aac5-357c-4b0b-8ae0-de3c195bdad1\",\"v\":1,\"s\":\"M\",\"o\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"l\":\"label\\n with multi-lines\",\"i\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\"}#030a9a38\nE={\"id\":\"36f5cfa9-8202-4ac0-bb53-3cf6ae203d5b\",\"v\":1,\"s\":\"M\",\"o\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"l\":\"label\\n with multi-lines\",\"i\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\"}#3e1714b6\nE={\"id\":\"98c554d2-9182-4765-909c-edc5427ade5c\",\"v\":1,\"s\":\"M\",\"o\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"l\":\"label\\n with multi-lines\",\"i\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\"}#54b7e0ea\nE={\"id\":\"3aa10590-4115-4d70-817b-c5a06818215d\",\"v\":1,\"s\":\"M\",\"o\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"l\":\"label\\n with multi-lines\",\"i\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\"}#28be99f4\nE={\"id\":\"c58e03ad-3662-43c1-a881-94bef15f522f\",\"v\":1,\"s\":\"M\",\"o\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"l\":\"label\\n with multi-lines\",\"i\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\"}#d4fced2d\nE={\"id\":\"f77ba846-2fb4-4e2f-a5ec-3add32b7eac4\",\"v\":1,\"s\":\"M\",\"o\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"l\":\"label\\n with multi-lines\",\"i\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\"}#1d1dd7b9\nE={\"id\":\"7491c951-0cd7-42b5-ac96-ef4899cfbca1\",\"v\":1,\"s\":\"M\",\"o\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"l\":\"label\\n with multi-lines\",\"i\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\"}#07c00499\nE={\"id\":\"d789c47f-10ae-4ff3-9329-6d43ff030dfc\",\"v\":1,\"s\":\"M\",\"o\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"l\":\"label\\n with multi-lines\",\"i\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\"}#9e4e8277\nE={\"id\":\"b66c20f0-aeb1-4f67-9a26-32cdadff4649\",\"v\":1,\"s\":\"M\",\"o\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"l\":\"label\\n with multi-lines\",\"i\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\"}#03597b7d\nE={\"id\":\"3e4a3b19-82f6-47ff-bb75-d7c0cc5a87fa\",\"v\":1,\"s\":\"M\",\"o\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"l\":\"label\\n with multi-lines\",\"i\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\"}#00c8dcbb\nE={\"id\":\"9fffc00b-65a4-4515-9447-a13fde7a41ec\",\"v\":1,\"s\":\"M\",\"o\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"l\":\"label\\n with multi-lines\",\"i\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\"}#f26a66e8\nE={\"id\":\"a7fcdab0-845e-4105-8e99-bba06853aded\",\"v\":1,\"s\":\"M\",\"o\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"l\":\"label\\n with multi-lines\",\"i\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\"}#ffea950e\nE={\"id\":\"9a71606c-3154-4990-8c34-2329c84b27b0\",\"v\":1,\"s\":\"M\",\"o\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"l\":\"label\\n with multi-lines\",\"i\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\"}#378e5fc1\nL=9#0023783b\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/eB.txt",
    "content": "H=6#0021a662\nE={\"id\":\"804c73b7-1cd1-45fa-aa03-85d5656131a1\",\"v\":1,\"s\":\"M\",\"o\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"b31135af-901f-4ae6-9247-d8460a53682e\"}#cecefc15\nE={\"id\":\"03302f69-421e-4b7d-9e77-fb8d9dc25f05\",\"v\":1,\"s\":\"M\",\"o\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"l\":\"label\\n with multi-lines\",\"i\":\"081f8436-d6dc-42ee-84f6-53570de028c9\"}#5ded03fe\nE={\"id\":\"e1a8b2bd-6511-48c0-8d57-ebde590a332f\",\"v\":1,\"s\":\"M\",\"o\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"l\":\"label\\n with multi-lines\",\"i\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\"}#b3bdc3f6\nE={\"id\":\"8784ea77-bf40-4f04-925a-534a4528dde9\",\"v\":1,\"s\":\"M\",\"o\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\"}#7d7b5c12\nE={\"id\":\"f35d1f29-6cae-49bf-bf51-d31858c1692f\",\"v\":1,\"s\":\"M\",\"o\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"l\":\"label\\n with multi-lines\",\"i\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\"}#58ce3246\nE={\"id\":\"390a1fd4-d945-406d-91b2-57837420b211\",\"v\":1,\"s\":\"M\",\"o\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\"}#e85d1acc\nE={\"id\":\"58685e72-6ee6-4b8d-9554-47152e1eca3a\",\"v\":1,\"s\":\"M\",\"o\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"l\":\"label\\n with multi-lines\",\"i\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\"}#8b8cedbb\nE={\"id\":\"b499e4ed-cad6-431b-841b-bda5247b4066\",\"v\":1,\"s\":\"M\",\"o\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"l\":\"label\\n with multi-lines\",\"i\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\"}#0141ed12\nE={\"id\":\"904a0a02-ea6c-4e13-b2a7-0bf187073055\",\"v\":1,\"s\":\"M\",\"o\":\"d3477712-828c-467e-a500-d65e32097c85\",\"l\":\"label\\n with multi-lines\",\"i\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\"}#ccbf5428\nE={\"id\":\"77f64ad9-7407-4497-b5f2-3b45262eb03c\",\"v\":1,\"s\":\"M\",\"o\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\"}#24c69a9c\nE={\"id\":\"7a4250ff-fef3-422e-a2de-7e80295caab9\",\"v\":1,\"s\":\"M\",\"o\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"l\":\"label\\n with multi-lines\",\"i\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\"}#b431c9bd\nE={\"id\":\"521fd700-05f0-4765-b06b-78147af9c84b\",\"v\":1,\"s\":\"M\",\"o\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"l\":\"label\\n with multi-lines\",\"i\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\"}#5490d960\nE={\"id\":\"0680ce68-da10-4f0c-98bb-77dd6cfff0dd\",\"v\":1,\"s\":\"M\",\"o\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"l\":\"label\\n with multi-lines\",\"i\":\"d3477712-828c-467e-a500-d65e32097c85\"}#319a2a18\nE={\"id\":\"71fc2c5d-15ac-4f73-b18e-e5477f4d27fa\",\"v\":1,\"s\":\"M\",\"o\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"l\":\"label\\n with multi-lines\",\"i\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\"}#75c1b3d4\nE={\"id\":\"578ac1df-93d6-4013-ae61-29b7207c7e63\",\"v\":1,\"s\":\"M\",\"o\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"l\":\"label\\n with multi-lines\",\"i\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\"}#cedd1583\nE={\"id\":\"6205953c-a64e-42af-86b5-7e217f8002a5\",\"v\":1,\"s\":\"M\",\"o\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"l\":\"label\\n with multi-lines\",\"i\":\"302be4e2-b381-474a-a351-f275d6c3215a\"}#cfe9c78b\nE={\"id\":\"4338182a-d3cf-4aa0-8eae-a3be48ca9f69\",\"v\":1,\"s\":\"M\",\"o\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"l\":\"label\\n with multi-lines\",\"i\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\"}#95d4c4f0\nE={\"id\":\"95b128df-8d98-4ef4-9c2d-267912b36853\",\"v\":1,\"s\":\"M\",\"o\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"l\":\"label\\n with multi-lines\",\"i\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\"}#459a573f\nE={\"id\":\"f3e6a68e-9e86-4d06-b740-829a3cba2045\",\"v\":1,\"s\":\"M\",\"o\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"l\":\"label\\n with multi-lines\",\"i\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\"}#93e8bbc2\nE={\"id\":\"4e3e9254-dd08-4ec2-9c40-79f8d2d78ae3\",\"v\":1,\"s\":\"M\",\"o\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"l\":\"label\\n with multi-lines\",\"i\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\"}#f8ede449\nE={\"id\":\"0270e33b-8333-4cd9-9727-984a8c9647d0\",\"v\":1,\"s\":\"M\",\"o\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"l\":\"label\\n with multi-lines\",\"i\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\"}#2381309f\nE={\"id\":\"ef84c81b-585c-49a8-92b5-16a31630fdbb\",\"v\":1,\"s\":\"M\",\"o\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"l\":\"label\\n with multi-lines\",\"i\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\"}#b3da57e2\nE={\"id\":\"50e8ab98-9f19-47fd-aeb7-dd770c0c3b61\",\"v\":1,\"s\":\"M\",\"o\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"l\":\"label\\n with multi-lines\",\"i\":\"4964e145-32e6-4f51-98d8-5535f3546929\"}#2a173fd5\nE={\"id\":\"26be8423-2746-4c02-b414-9d178ae7a134\",\"v\":1,\"s\":\"M\",\"o\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"l\":\"label\\n with multi-lines\",\"i\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\"}#d80fdbe8\nE={\"id\":\"029090d7-1ade-4387-9882-6e9e925fb69c\",\"v\":1,\"s\":\"M\",\"o\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"l\":\"label\\n with multi-lines\",\"i\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\"}#1f13fbac\nE={\"id\":\"ccdb6e73-9217-4e84-aae1-3c0bd8fca7b0\",\"v\":1,\"s\":\"M\",\"o\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\"}#7b1f430e\nE={\"id\":\"5292bbfb-d68c-44c1-832c-5cb42d992d8b\",\"v\":1,\"s\":\"M\",\"o\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"l\":\"label\\n with multi-lines\",\"i\":\"66ba0186-e709-4c05-8305-1ffed1143089\"}#a9a62e17\nE={\"id\":\"3000d197-68b2-4182-9e90-7ccecf58b199\",\"v\":1,\"s\":\"M\",\"o\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"l\":\"label\\n with multi-lines\",\"i\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\"}#851b7dc7\nE={\"id\":\"b846625b-7ee3-4487-9c30-fe77b001d283\",\"v\":1,\"s\":\"M\",\"o\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"l\":\"label\\n with multi-lines\",\"i\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\"}#3f115798\nE={\"id\":\"8263afcd-479b-4d6b-9c7e-5bcca31ed60b\",\"v\":1,\"s\":\"M\",\"o\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"l\":\"label\\n with multi-lines\",\"i\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\"}#accad448\nE={\"id\":\"9c3d1af2-8bb2-457d-b3d0-ecd7dbd81c3d\",\"v\":1,\"s\":\"M\",\"o\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"l\":\"label\\n with multi-lines\",\"i\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\"}#93fd7b76\nE={\"id\":\"273f0d1a-275e-46b3-b117-440bd70421c0\",\"v\":1,\"s\":\"M\",\"o\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\"}#bcf386e3\nE={\"id\":\"107e4a36-a580-42ca-a22e-fa3895e620ba\",\"v\":1,\"s\":\"M\",\"o\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"l\":\"label\\n with multi-lines\",\"i\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\"}#1dd69b3e\nE={\"id\":\"74a55bd0-2f0a-45b5-939a-6f20f9f2aba3\",\"v\":1,\"s\":\"M\",\"o\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"l\":\"label\\n with multi-lines\",\"i\":\"e1332322-88c0-4468-a862-9f45311067ac\"}#363de35e\nE={\"id\":\"240afb59-0dc3-4b0f-bbbd-84ec63ea56b5\",\"v\":1,\"s\":\"M\",\"o\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"l\":\"label\\n with multi-lines\",\"i\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\"}#78bfcd48\nE={\"id\":\"79c976e5-3e7d-4407-8d78-8984e8ee32fe\",\"v\":1,\"s\":\"M\",\"o\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"l\":\"label\\n with multi-lines\",\"i\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\"}#fa291de8\nE={\"id\":\"219d3214-1850-4ac1-a7ff-573c69a88af8\",\"v\":1,\"s\":\"M\",\"o\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a756d65-e069-4e58-ae8e-3abf082496da\"}#b7cb1ad6\nE={\"id\":\"b0dcdd0c-deba-4a7d-8402-17f29f4489f1\",\"v\":1,\"s\":\"M\",\"o\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\"}#70a943df\nE={\"id\":\"d6070049-6365-4703-802c-748261c70508\",\"v\":1,\"s\":\"M\",\"o\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"l\":\"label\\n with multi-lines\",\"i\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\"}#7bafba80\nE={\"id\":\"f4910b68-7843-450c-aee3-da4516f7b118\",\"v\":1,\"s\":\"M\",\"o\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"l\":\"label\\n with multi-lines\",\"i\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\"}#d930e97e\nE={\"id\":\"6bf0cca9-8f51-4c1d-a6d2-c66ca90cedf5\",\"v\":1,\"s\":\"M\",\"o\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"l\":\"label\\n with multi-lines\",\"i\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\"}#92a8e6d4\nE={\"id\":\"14894ace-b151-4509-a8f5-5181b4e463d0\",\"v\":1,\"s\":\"M\",\"o\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"l\":\"label\\n with multi-lines\",\"i\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\"}#fadafbf0\nE={\"id\":\"aff119c4-d6a2-4cb8-924d-e8e5b73bdc4d\",\"v\":1,\"s\":\"M\",\"o\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\"}#034f405d\nE={\"id\":\"29282d33-da5c-4663-9e10-f5161cd2cc2d\",\"v\":1,\"s\":\"M\",\"o\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"l\":\"label\\n with multi-lines\",\"i\":\"108a0886-27a2-4f6e-bc12-67b051861197\"}#46edab09\nE={\"id\":\"3325e648-670a-4db8-ace3-6d37a0cd1b06\",\"v\":1,\"s\":\"M\",\"o\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"l\":\"label\\n with multi-lines\",\"i\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\"}#ead36f3d\nE={\"id\":\"0c635c4e-4aa1-4f7c-8be3-764df35c8567\",\"v\":1,\"s\":\"M\",\"o\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"l\":\"label\\n with multi-lines\",\"i\":\"846a5573-1815-4629-8be0-55eda1204b7d\"}#6e4fcae9\nE={\"id\":\"73ad443e-f233-4089-8179-f59c08b42239\",\"v\":1,\"s\":\"M\",\"o\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a014bff-371e-4740-8a43-33e03685a99f\"}#94272859\nE={\"id\":\"b0ccc7f4-c1cb-4eaa-94f7-221b7a1853bd\",\"v\":1,\"s\":\"M\",\"o\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"l\":\"label\\n with multi-lines\",\"i\":\"22e3370a-2d70-4e35-9599-ab78b814532e\"}#4459e173\nE={\"id\":\"23a2f626-0163-4d27-b1df-e54bb33f1d88\",\"v\":1,\"s\":\"M\",\"o\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"l\":\"label\\n with multi-lines\",\"i\":\"949e4daf-c136-4716-b23a-73e25c6489cc\"}#81418acb\nE={\"id\":\"e6b5344a-31db-49d3-9fa6-585d91cafef3\",\"v\":1,\"s\":\"M\",\"o\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"l\":\"label\\n with multi-lines\",\"i\":\"699e450b-51c1-4ade-a5d4-82404cd81654\"}#18011a65\nE={\"id\":\"a3ff3cc3-e427-476f-b67a-2053d0311ee2\",\"v\":1,\"s\":\"M\",\"o\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"l\":\"label\\n with multi-lines\",\"i\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\"}#2760c68c\nE={\"id\":\"bd876c2e-f1d9-46b5-9ebb-3212531c6262\",\"v\":1,\"s\":\"M\",\"o\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e06501f-3cb1-4a85-b148-407a711373c1\"}#8392c5e8\nE={\"id\":\"39019d0e-03a4-41bf-a525-d3b83891dbb6\",\"v\":1,\"s\":\"M\",\"o\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\"}#b48e26ff\nE={\"id\":\"ae4e5f58-160c-4dd0-b9a3-6a2754f1001f\",\"v\":1,\"s\":\"M\",\"o\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"l\":\"label\\n with multi-lines\",\"i\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\"}#3a6aa91e\nE={\"id\":\"93c2953a-2fd2-4caa-b9a6-963ba7773599\",\"v\":1,\"s\":\"M\",\"o\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\"}#fc73b93b\nE={\"id\":\"f3b7d6ec-4415-44b3-a981-1918f81ef851\",\"v\":1,\"s\":\"M\",\"o\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"l\":\"label\\n with multi-lines\",\"i\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\"}#55868086\nE={\"id\":\"6b27ad0c-e310-433a-9058-35ce7a8d1704\",\"v\":1,\"s\":\"M\",\"o\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"l\":\"label\\n with multi-lines\",\"i\":\"b83eac55-4589-4a17-90cc-cb24640727f1\"}#8f39461c\nE={\"id\":\"dd67b143-3a7c-4c54-a3b8-f459812e5e8e\",\"v\":1,\"s\":\"M\",\"o\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"l\":\"label\\n with multi-lines\",\"i\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\"}#d2499996\nE={\"id\":\"db6905ca-2e48-44ce-850c-fa594c852678\",\"v\":1,\"s\":\"M\",\"o\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"l\":\"label\\n with multi-lines\",\"i\":\"d41954be-3d11-473e-92c3-209fabfc13e3\"}#5ab08e5b\nE={\"id\":\"7d8860a2-7d8c-4754-80f8-c0f4e840b6b1\",\"v\":1,\"s\":\"M\",\"o\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"l\":\"label\\n with multi-lines\",\"i\":\"9a37b710-2dce-4283-994a-a95975660ae7\"}#28ef3e2f\nE={\"id\":\"933a7de9-a5e5-467b-9272-df7840b96156\",\"v\":1,\"s\":\"M\",\"o\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"l\":\"label\\n with multi-lines\",\"i\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\"}#695be7c6\nE={\"id\":\"3d7cb93f-5ba2-45a2-b672-822d438df47b\",\"v\":1,\"s\":\"M\",\"o\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"l\":\"label\\n with multi-lines\",\"i\":\"3215900c-8252-4027-9956-22e43e46a123\"}#bcee1da4\nE={\"id\":\"ced4254b-e43c-4460-8e80-963aa93f3a97\",\"v\":1,\"s\":\"M\",\"o\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"l\":\"label\\n with multi-lines\",\"i\":\"a82b5a47-1213-4132-a5ef-66e52716f789\"}#7b95e590\nE={\"id\":\"f6da2faf-ee1f-4534-9bd5-db7cbc33cf55\",\"v\":1,\"s\":\"M\",\"o\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"l\":\"label\\n with multi-lines\",\"i\":\"a812c713-46c8-4895-a610-a616c6aa792d\"}#94b647ed\nE={\"id\":\"66247646-3490-412c-9aaa-0e4dd1c6a2dd\",\"v\":1,\"s\":\"M\",\"o\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\"}#1ff54eae\nE={\"id\":\"58240965-488d-4353-9670-74008dc4f2d8\",\"v\":1,\"s\":\"M\",\"o\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"l\":\"label\\n with multi-lines\",\"i\":\"77cf4be1-be66-45b8-903f-f1740d698120\"}#04e76170\nE={\"id\":\"90a1fae4-06eb-48fe-afc5-9f5c6b53fe4e\",\"v\":1,\"s\":\"M\",\"o\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"l\":\"label\\n with multi-lines\",\"i\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\"}#5904a3f9\nE={\"id\":\"6f0ad059-0b25-469b-bf84-3c02680cdcd5\",\"v\":1,\"s\":\"M\",\"o\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"l\":\"label\\n with multi-lines\",\"i\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\"}#52975593\nE={\"id\":\"24aeb471-4a07-4798-b33b-3ed68fd0db89\",\"v\":1,\"s\":\"M\",\"o\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"l\":\"label\\n with multi-lines\",\"i\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\"}#440d6a51\nE={\"id\":\"ef57d5bc-2701-43a7-ad56-c8d96983bd7a\",\"v\":1,\"s\":\"M\",\"o\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"l\":\"label\\n with multi-lines\",\"i\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\"}#23a3ea34\nE={\"id\":\"36c401da-dc33-4087-a50f-d6a9501cf72a\",\"v\":1,\"s\":\"M\",\"o\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"l\":\"label\\n with multi-lines\",\"i\":\"a632888c-7486-42cf-93d5-d1aff3395a47\"}#f56c8f9a\nE={\"id\":\"8026beaa-170a-45a0-8e7b-5cc5d7caa5fa\",\"v\":1,\"s\":\"M\",\"o\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"l\":\"label\\n with multi-lines\",\"i\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\"}#94780096\nE={\"id\":\"5a571fd9-91a4-47d8-a9b1-41616f741bd5\",\"v\":1,\"s\":\"M\",\"o\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\"}#5e506578\nE={\"id\":\"e8cda01d-e169-4277-a5e7-10e5847d615c\",\"v\":1,\"s\":\"M\",\"o\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\"}#d4cc0c42\nE={\"id\":\"e5448c3c-4fdf-4c7e-baa3-abb29171fa08\",\"v\":1,\"s\":\"M\",\"o\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"l\":\"label\\n with multi-lines\",\"i\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\"}#bf852970\nE={\"id\":\"945ddcb5-67df-4d91-b985-d02b51b2db18\",\"v\":1,\"s\":\"M\",\"o\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"l\":\"label\\n with multi-lines\",\"i\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\"}#67392e9f\nE={\"id\":\"fe528e79-9b14-41bb-a4be-49e3bf61e554\",\"v\":1,\"s\":\"M\",\"o\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"l\":\"label\\n with multi-lines\",\"i\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\"}#85393692\nE={\"id\":\"26114871-f2a7-4894-bd6d-1922c38c9861\",\"v\":1,\"s\":\"M\",\"o\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"l\":\"label\\n with multi-lines\",\"i\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\"}#dbe772fa\nE={\"id\":\"170b651d-830d-4065-847c-877d14e18d94\",\"v\":1,\"s\":\"M\",\"o\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"l\":\"label\\n with multi-lines\",\"i\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\"}#afca4775\nE={\"id\":\"6ab9736c-138f-4f6f-a3b0-65513eea5c56\",\"v\":1,\"s\":\"M\",\"o\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"l\":\"label\\n with multi-lines\",\"i\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\"}#7652a454\nE={\"id\":\"166e4435-7653-42b5-8904-a39d2c229351\",\"v\":1,\"s\":\"M\",\"o\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"l\":\"label\\n with multi-lines\",\"i\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\"}#eb0c9eb5\nE={\"id\":\"fa5be5aa-a293-4c98-8873-b7bad7ab7c21\",\"v\":1,\"s\":\"M\",\"o\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"l\":\"label\\n with multi-lines\",\"i\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\"}#0b3c2e65\nE={\"id\":\"1c6e222c-631c-45d0-bd98-924eeccfa0fb\",\"v\":1,\"s\":\"M\",\"o\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"l\":\"label\\n with multi-lines\",\"i\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\"}#d75d7386\nE={\"id\":\"c4e04a23-6c5e-4dd5-8246-66a49890322a\",\"v\":1,\"s\":\"M\",\"o\":\"3215900c-8252-4027-9956-22e43e46a123\",\"l\":\"label\\n with multi-lines\",\"i\":\"363fc50d-2628-424a-abf8-665b29a2b22d\"}#7e9dd200\nE={\"id\":\"4a9b3290-a265-4c0a-b0e9-0c66c1c0c1e6\",\"v\":1,\"s\":\"M\",\"o\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"l\":\"label\\n with multi-lines\",\"i\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\"}#b449d213\nE={\"id\":\"326d76e9-46a9-4b02-b905-9fa5322407cd\",\"v\":1,\"s\":\"M\",\"o\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"l\":\"label\\n with multi-lines\",\"i\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\"}#91bba6e7\nE={\"id\":\"32b3aac5-357c-4b0b-8ae0-de3c195bdad1\",\"v\":1,\"s\":\"M\",\"o\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"l\":\"label\\n with multi-lines\",\"i\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\"}#030a9a38\nE={\"id\":\"36f5cfa9-8202-4ac0-bb53-3cf6ae203d5b\",\"v\":1,\"s\":\"M\",\"o\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"l\":\"label\\n with multi-lines\",\"i\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\"}#3e1714b6\nE={\"id\":\"98c554d2-9182-4765-909c-edc5427ade5c\",\"v\":1,\"s\":\"M\",\"o\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"l\":\"label\\n with multi-lines\",\"i\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\"}#54b7e0ea\nE={\"id\":\"3aa10590-4115-4d70-817b-c5a06818215d\",\"v\":1,\"s\":\"M\",\"o\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"l\":\"label\\n with multi-lines\",\"i\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\"}#28be99f4\nE={\"id\":\"c58e03ad-3662-43c1-a881-94bef15f522f\",\"v\":1,\"s\":\"M\",\"o\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"l\":\"label\\n with multi-lines\",\"i\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\"}#d4fced2d\nE={\"id\":\"f77ba846-2fb4-4e2f-a5ec-3add32b7eac4\",\"v\":1,\"s\":\"M\",\"o\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"l\":\"label\\n with multi-lines\",\"i\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\"}#1d1dd7b9\nE={\"id\":\"7491c951-0cd7-42b5-ac96-ef4899cfbca1\",\"v\":1,\"s\":\"M\",\"o\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"l\":\"label\\n with multi-lines\",\"i\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\"}#7c00499\nE={\"id\":\"d789c47f-10ae-4ff3-9329-6d43ff030dfc\",\"v\":1,\"s\":\"M\",\"o\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"l\":\"label\\n with multi-lines\",\"i\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\"}#9e4e8277\nE={\"id\":\"b66c20f0-aeb1-4f67-9a26-32cdadff4649\",\"v\":1,\"s\":\"M\",\"o\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"l\":\"label\\n with multi-lines\",\"i\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\"}#03597b7d\nE={\"id\":\"3e4a3b19-82f6-47ff-bb75-d7c0cc5a87fa\",\"v\":1,\"s\":\"M\",\"o\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"l\":\"label\\n with multi-lines\",\"i\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\"}#00c8dcbb\nE={\"id\":\"9fffc00b-65a4-4515-9447-a13fde7a41ec\",\"v\":1,\"s\":\"M\",\"o\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"l\":\"label\\n with multi-lines\",\"i\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\"}#f26a66e8\nE={\"id\":\"a7fcdab0-845e-4105-8e99-bba06853aded\",\"v\":1,\"s\":\"M\",\"o\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"l\":\"label\\n with multi-lines\",\"i\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\"}#ffea950e\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/txB.txt",
    "content": "H=10#041314cf\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/vA.txt",
    "content": "H=3#0021a605\nL=2#00237762\nV={\"id\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d87902cd\nV={\"id\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#aa782433\nV={\"id\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dcfe68\nV={\"id\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1789f3b0\nV={\"id\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7d990817\nV={\"id\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4ac30bc3\nV={\"id\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#76b366a2\nV={\"id\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2c9685a9\nV={\"id\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d55fc916\nV={\"id\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c202de9e\nV={\"id\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0295aae5\nV={\"id\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7a5fc823\nV={\"id\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d80bfa12\nV={\"id\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9c01de21\nV={\"id\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d4026b13\nV={\"id\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ec7dabc2\nV={\"id\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#06e0d8fd\nV={\"id\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68539f98\nV={\"id\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2e651e6d\nV={\"id\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a8d960db\nV={\"id\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0ee5dd7a\nV={\"id\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#01f4651e\nV={\"id\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b5a86012\nV={\"id\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3023947b\nV={\"id\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#659f6b90\nV={\"id\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9f19fdc6\nV={\"id\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#543854c2\nV={\"id\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#789edfec\nV={\"id\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d88ddfcf\nV={\"id\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#856fdc7b\nV={\"id\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#002de60b\nV={\"id\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#16b7df3c\nV={\"id\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5e4fac97\nV={\"id\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#09a249df\nV={\"id\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d40e0349\nV={\"id\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#17e2d350\nV={\"id\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d3c0284a\nV={\"id\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#df930bc8\nV={\"id\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#44a6a41f\nV={\"id\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7c66cbb9\nV={\"id\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#84f46339\nV={\"id\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fc359ab8\nV={\"id\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0c26173d\nV={\"id\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e230e54\nV={\"id\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5c13abde\nV={\"id\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0a378f9e\nV={\"id\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6c54f7f3\nV={\"id\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e0cd633c\nV={\"id\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a050e387\nV={\"id\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8c772382\nV={\"id\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#48dc1c88\nV={\"id\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cd306e45\nV={\"id\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5c9e9901\nV={\"id\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#27f6895c\nV={\"id\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#73e24a90\nV={\"id\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#652b6f75\nV={\"id\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#14969f70\nV={\"id\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#40757213\nV={\"id\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#aa0b8894\nV={\"id\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ca907a78\nV={\"id\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#276cc2b7\nV={\"id\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9226606e\nV={\"id\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abad5d27\nV={\"id\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#02664edd\nV={\"id\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5aac2742\nV={\"id\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8fed3b2b\nV={\"id\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3cd6aa34\nV={\"id\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#af05fef6\nV={\"id\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#644e9886\nV={\"id\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a50971fd\nV={\"id\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#49d49997\nV={\"id\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#888d1d8a\nV={\"id\":\"d3477712-828c-467e-a500-d65e32097c85\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ca090713\nV={\"id\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7e076c38\nV={\"id\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e9fa1c69\nV={\"id\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3deadc99\nV={\"id\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f4a858cc\nV={\"id\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55201a53\nV={\"id\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fac5140e\nV={\"id\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#50f68f15\nV={\"id\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b8306b9f\nV={\"id\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c0d2af1\nV={\"id\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22f5e62b\nV={\"id\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#684a6ef8\nV={\"id\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#610a0d9a\nV={\"id\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c3ac78a\nV={\"id\":\"3215900c-8252-4027-9956-22e43e46a123\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#59ca2086\nV={\"id\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ddf0444a\nV={\"id\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#022a1502\nV={\"id\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fb771a1\nV={\"id\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1a2764ae\nV={\"id\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9f8320df\nV={\"id\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#678773ff\nV={\"id\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#add271f2\nV={\"id\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f01f5146\nV={\"id\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#dae1035b\nV={\"id\":\"4964e145-32e6-4f51-98d8-5535f3546929\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3685d37d\nV={\"id\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5d60db4a\nV={\"id\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#775e846b\nV={\"id\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e78d9fb3\nV={\"id\":\"606a8426-a75b-4ab2-9a37-0cbcaafa0e1c\",\"v\":1,\"s\":\"M\"}#b7016099\nL=9#0023783b\n"
  },
  {
    "path": "src/test/resources/recovery/stage6/vB.txt",
    "content": "H=4#0021a624\nV={\"id\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d87902cd\nV={\"id\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#aa782433\nV={\"id\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dcfe68\nV={\"id\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1789f3b0\nV={\"id\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7d990817\nV={\"id\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4ac30bc3\nV={\"id\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#76b366a2\nV={\"id\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2c9685a9\nV={\"id\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d55fc916\nV={\"id\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c202de9e\nV={\"id\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0295aae5\nV={\"id\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7a5fc823\nV={\"id\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d80bfa12\nV={\"id\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9c01de21\nV={\"id\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d4026b13\nV={\"id\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ec7dabc2\nV={\"id\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#06e0d8fd\nV={\"id\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68539f98\nV={\"id\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2e651e6d\nV={\"id\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a8d960db\nV={\"id\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0ee5dd7a\nV={\"id\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#01f4651e\nV={\"id\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b5a86012\nV={\"id\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3023947b\nV={\"id\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#659f6b90\nV={\"id\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9f19fdc6\nV={\"id\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#543854c2\nV={\"id\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#789edfec\nV={\"id\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d88ddfcf\nV={\"id\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#856fdc7b\nV={\"id\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#002de60b\nV={\"id\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#16b7df3c\nV={\"id\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5e4fac97\nV={\"id\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#09a249df\nV={\"id\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d40e0349\nV={\"id\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#17e2d350\nV={\"id\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d3c0284a\nV={\"id\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#df930bc8\nV={\"id\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#44a6a41f\nV={\"id\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7c66cbb9\nV={\"id\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#84f46339\nV={\"id\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fc359ab8\nV={\"id\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0c26173d\nV={\"id\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e230e54\nV={\"id\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5c13abde\nV={\"id\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0a378f9e\nV={\"id\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6c54f7f3\nV={\"id\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e0cd633c\nV={\"id\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a050e387\nV={\"id\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8c772382\nV={\"id\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#48dc1c88\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/eA.txt",
    "content": "H=5#0021a643\nL=2#00237762\nE={\"id\":\"804c73b7-1cd1-45fa-aa03-85d5656131a1\",\"v\":1,\"s\":\"M\",\"o\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"b31135af-901f-4ae6-9247-d8460a53682e\"}#cecefc15\nE={\"id\":\"03302f69-421e-4b7d-9e77-fb8d9dc25f05\",\"v\":1,\"s\":\"M\",\"o\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"l\":\"label\\n with multi-lines\",\"i\":\"081f8436-d6dc-42ee-84f6-53570de028c9\"}#5ded03fe\nE={\"id\":\"e1a8b2bd-6511-48c0-8d57-ebde590a332f\",\"v\":1,\"s\":\"M\",\"o\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"l\":\"label\\n with multi-lines\",\"i\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\"}#b3bdc3f6\nE={\"id\":\"8784ea77-bf40-4f04-925a-534a4528dde9\",\"v\":1,\"s\":\"M\",\"o\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\"}#7d7b5c12\nE={\"id\":\"f35d1f29-6cae-49bf-bf51-d31858c1692f\",\"v\":1,\"s\":\"M\",\"o\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"l\":\"label\\n with multi-lines\",\"i\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\"}#58ce3246\nE={\"id\":\"390a1fd4-d945-406d-91b2-57837420b211\",\"v\":1,\"s\":\"M\",\"o\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\"}#e85d1acc\nE={\"id\":\"58685e72-6ee6-4b8d-9554-47152e1eca3a\",\"v\":1,\"s\":\"M\",\"o\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"l\":\"label\\n with multi-lines\",\"i\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\"}#8b8cedbb\nE={\"id\":\"b499e4ed-cad6-431b-841b-bda5247b4066\",\"v\":1,\"s\":\"M\",\"o\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"l\":\"label\\n with multi-lines\",\"i\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\"}#0141ed12\nE={\"id\":\"904a0a02-ea6c-4e13-b2a7-0bf187073055\",\"v\":1,\"s\":\"M\",\"o\":\"d3477712-828c-467e-a500-d65e32097c85\",\"l\":\"label\\n with multi-lines\",\"i\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\"}#ccbf5428\nE={\"id\":\"77f64ad9-7407-4497-b5f2-3b45262eb03c\",\"v\":1,\"s\":\"M\",\"o\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\"}#24c69a9c\nE={\"id\":\"7a4250ff-fef3-422e-a2de-7e80295caab9\",\"v\":1,\"s\":\"M\",\"o\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"l\":\"label\\n with multi-lines\",\"i\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\"}#b431c9bd\nE={\"id\":\"521fd700-05f0-4765-b06b-78147af9c84b\",\"v\":1,\"s\":\"M\",\"o\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"l\":\"label\\n with multi-lines\",\"i\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\"}#5490d960\nE={\"id\":\"0680ce68-da10-4f0c-98bb-77dd6cfff0dd\",\"v\":1,\"s\":\"M\",\"o\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"l\":\"label\\n with multi-lines\",\"i\":\"d3477712-828c-467e-a500-d65e32097c85\"}#319a2a18\nE={\"id\":\"71fc2c5d-15ac-4f73-b18e-e5477f4d27fa\",\"v\":1,\"s\":\"M\",\"o\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"l\":\"label\\n with multi-lines\",\"i\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\"}#75c1b3d4\nE={\"id\":\"578ac1df-93d6-4013-ae61-29b7207c7e63\",\"v\":1,\"s\":\"M\",\"o\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"l\":\"label\\n with multi-lines\",\"i\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\"}#cedd1583\nE={\"id\":\"6205953c-a64e-42af-86b5-7e217f8002a5\",\"v\":1,\"s\":\"M\",\"o\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"l\":\"label\\n with multi-lines\",\"i\":\"302be4e2-b381-474a-a351-f275d6c3215a\"}#cfe9c78b\nE={\"id\":\"4338182a-d3cf-4aa0-8eae-a3be48ca9f69\",\"v\":1,\"s\":\"M\",\"o\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"l\":\"label\\n with multi-lines\",\"i\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\"}#95d4c4f0\nE={\"id\":\"95b128df-8d98-4ef4-9c2d-267912b36853\",\"v\":1,\"s\":\"M\",\"o\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"l\":\"label\\n with multi-lines\",\"i\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\"}#459a573f\nE={\"id\":\"f3e6a68e-9e86-4d06-b740-829a3cba2045\",\"v\":1,\"s\":\"M\",\"o\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"l\":\"label\\n with multi-lines\",\"i\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\"}#93e8bbc2\nE={\"id\":\"4e3e9254-dd08-4ec2-9c40-79f8d2d78ae3\",\"v\":1,\"s\":\"M\",\"o\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"l\":\"label\\n with multi-lines\",\"i\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\"}#f8ede449\nE={\"id\":\"0270e33b-8333-4cd9-9727-984a8c9647d0\",\"v\":1,\"s\":\"M\",\"o\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"l\":\"label\\n with multi-lines\",\"i\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\"}#2381309f\nE={\"id\":\"ef84c81b-585c-49a8-92b5-16a31630fdbb\",\"v\":1,\"s\":\"M\",\"o\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"l\":\"label\\n with multi-lines\",\"i\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\"}#b3da57e2\nE={\"id\":\"50e8ab98-9f19-47fd-aeb7-dd770c0c3b61\",\"v\":1,\"s\":\"M\",\"o\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"l\":\"label\\n with multi-lines\",\"i\":\"4964e145-32e6-4f51-98d8-5535f3546929\"}#2a173fd5\nE={\"id\":\"26be8423-2746-4c02-b414-9d178ae7a134\",\"v\":1,\"s\":\"M\",\"o\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"l\":\"label\\n with multi-lines\",\"i\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\"}#d80fdbe8\nE={\"id\":\"029090d7-1ade-4387-9882-6e9e925fb69c\",\"v\":1,\"s\":\"M\",\"o\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"l\":\"label\\n with multi-lines\",\"i\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\"}#1f13fbac\nE={\"id\":\"ccdb6e73-9217-4e84-aae1-3c0bd8fca7b0\",\"v\":1,\"s\":\"M\",\"o\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\"}#7b1f430e\nE={\"id\":\"5292bbfb-d68c-44c1-832c-5cb42d992d8b\",\"v\":1,\"s\":\"M\",\"o\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"l\":\"label\\n with multi-lines\",\"i\":\"66ba0186-e709-4c05-8305-1ffed1143089\"}#a9a62e17\nE={\"id\":\"3000d197-68b2-4182-9e90-7ccecf58b199\",\"v\":1,\"s\":\"M\",\"o\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"l\":\"label\\n with multi-lines\",\"i\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\"}#851b7dc7\nE={\"id\":\"b846625b-7ee3-4487-9c30-fe77b001d283\",\"v\":1,\"s\":\"M\",\"o\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"l\":\"label\\n with multi-lines\",\"i\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\"}#3f115798\nE={\"id\":\"8263afcd-479b-4d6b-9c7e-5bcca31ed60b\",\"v\":1,\"s\":\"M\",\"o\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"l\":\"label\\n with multi-lines\",\"i\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\"}#accad448\nE={\"id\":\"9c3d1af2-8bb2-457d-b3d0-ecd7dbd81c3d\",\"v\":1,\"s\":\"M\",\"o\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"l\":\"label\\n with multi-lines\",\"i\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\"}#93fd7b76\nE={\"id\":\"273f0d1a-275e-46b3-b117-440bd70421c0\",\"v\":1,\"s\":\"M\",\"o\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\"}#bcf386e3\nE={\"id\":\"107e4a36-a580-42ca-a22e-fa3895e620ba\",\"v\":1,\"s\":\"M\",\"o\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"l\":\"label\\n with multi-lines\",\"i\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\"}#1dd69b3e\nE={\"id\":\"74a55bd0-2f0a-45b5-939a-6f20f9f2aba3\",\"v\":1,\"s\":\"M\",\"o\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"l\":\"label\\n with multi-lines\",\"i\":\"e1332322-88c0-4468-a862-9f45311067ac\"}#363de35e\nE={\"id\":\"240afb59-0dc3-4b0f-bbbd-84ec63ea56b5\",\"v\":1,\"s\":\"M\",\"o\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"l\":\"label\\n with multi-lines\",\"i\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\"}#78bfcd48\nE={\"id\":\"79c976e5-3e7d-4407-8d78-8984e8ee32fe\",\"v\":1,\"s\":\"M\",\"o\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"l\":\"label\\n with multi-lines\",\"i\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\"}#fa291de8\nE={\"id\":\"219d3214-1850-4ac1-a7ff-573c69a88af8\",\"v\":1,\"s\":\"M\",\"o\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a756d65-e069-4e58-ae8e-3abf082496da\"}#b7cb1ad6\nE={\"id\":\"b0dcdd0c-deba-4a7d-8402-17f29f4489f1\",\"v\":1,\"s\":\"M\",\"o\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\"}#70a943df\nE={\"id\":\"d6070049-6365-4703-802c-748261c70508\",\"v\":1,\"s\":\"M\",\"o\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"l\":\"label\\n with multi-lines\",\"i\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\"}#7bafba80\nE={\"id\":\"f4910b68-7843-450c-aee3-da4516f7b118\",\"v\":1,\"s\":\"M\",\"o\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"l\":\"label\\n with multi-lines\",\"i\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\"}#d930e97e\nE={\"id\":\"6bf0cca9-8f51-4c1d-a6d2-c66ca90cedf5\",\"v\":1,\"s\":\"M\",\"o\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"l\":\"label\\n with multi-lines\",\"i\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\"}#92a8e6d4\nE={\"id\":\"14894ace-b151-4509-a8f5-5181b4e463d0\",\"v\":1,\"s\":\"M\",\"o\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"l\":\"label\\n with multi-lines\",\"i\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\"}#fadafbf0\nE={\"id\":\"aff119c4-d6a2-4cb8-924d-e8e5b73bdc4d\",\"v\":1,\"s\":\"M\",\"o\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\"}#034f405d\nE={\"id\":\"29282d33-da5c-4663-9e10-f5161cd2cc2d\",\"v\":1,\"s\":\"M\",\"o\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"l\":\"label\\n with multi-lines\",\"i\":\"108a0886-27a2-4f6e-bc12-67b051861197\"}#46edab09\nE={\"id\":\"3325e648-670a-4db8-ace3-6d37a0cd1b06\",\"v\":1,\"s\":\"M\",\"o\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"l\":\"label\\n with multi-lines\",\"i\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\"}#ead36f3d\nE={\"id\":\"0c635c4e-4aa1-4f7c-8be3-764df35c8567\",\"v\":1,\"s\":\"M\",\"o\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"l\":\"label\\n with multi-lines\",\"i\":\"846a5573-1815-4629-8be0-55eda1204b7d\"}#6e4fcae9\nE={\"id\":\"73ad443e-f233-4089-8179-f59c08b42239\",\"v\":1,\"s\":\"M\",\"o\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a014bff-371e-4740-8a43-33e03685a99f\"}#94272859\nE={\"id\":\"b0ccc7f4-c1cb-4eaa-94f7-221b7a1853bd\",\"v\":1,\"s\":\"M\",\"o\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"l\":\"label\\n with multi-lines\",\"i\":\"22e3370a-2d70-4e35-9599-ab78b814532e\"}#4459e173\nE={\"id\":\"23a2f626-0163-4d27-b1df-e54bb33f1d88\",\"v\":1,\"s\":\"M\",\"o\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"l\":\"label\\n with multi-lines\",\"i\":\"949e4daf-c136-4716-b23a-73e25c6489cc\"}#81418acb\nE={\"id\":\"e6b5344a-31db-49d3-9fa6-585d91cafef3\",\"v\":1,\"s\":\"M\",\"o\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"l\":\"label\\n with multi-lines\",\"i\":\"699e450b-51c1-4ade-a5d4-82404cd81654\"}#18011a65\nE={\"id\":\"a3ff3cc3-e427-476f-b67a-2053d0311ee2\",\"v\":1,\"s\":\"M\",\"o\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"l\":\"label\\n with multi-lines\",\"i\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\"}#2760c68c\nE={\"id\":\"bd876c2e-f1d9-46b5-9ebb-3212531c6262\",\"v\":1,\"s\":\"M\",\"o\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e06501f-3cb1-4a85-b148-407a711373c1\"}#8392c5e8\nE={\"id\":\"39019d0e-03a4-41bf-a525-d3b83891dbb6\",\"v\":1,\"s\":\"M\",\"o\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\"}#b48e26ff\nE={\"id\":\"ae4e5f58-160c-4dd0-b9a3-6a2754f1001f\",\"v\":1,\"s\":\"M\",\"o\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"l\":\"label\\n with multi-lines\",\"i\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\"}#3a6aa91e\nE={\"id\":\"93c2953a-2fd2-4caa-b9a6-963ba7773599\",\"v\":1,\"s\":\"M\",\"o\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\"}#fc73b93b\nE={\"id\":\"f3b7d6ec-4415-44b3-a981-1918f81ef851\",\"v\":1,\"s\":\"M\",\"o\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"l\":\"label\\n with multi-lines\",\"i\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\"}#55868086\nE={\"id\":\"6b27ad0c-e310-433a-9058-35ce7a8d1704\",\"v\":1,\"s\":\"M\",\"o\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"l\":\"label\\n with multi-lines\",\"i\":\"b83eac55-4589-4a17-90cc-cb24640727f1\"}#8f39461c\nE={\"id\":\"dd67b143-3a7c-4c54-a3b8-f459812e5e8e\",\"v\":1,\"s\":\"M\",\"o\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"l\":\"label\\n with multi-lines\",\"i\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\"}#d2499996\nE={\"id\":\"db6905ca-2e48-44ce-850c-fa594c852678\",\"v\":1,\"s\":\"M\",\"o\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"l\":\"label\\n with multi-lines\",\"i\":\"d41954be-3d11-473e-92c3-209fabfc13e3\"}#5ab08e5b\nE={\"id\":\"7d8860a2-7d8c-4754-80f8-c0f4e840b6b1\",\"v\":1,\"s\":\"M\",\"o\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"l\":\"label\\n with multi-lines\",\"i\":\"9a37b710-2dce-4283-994a-a95975660ae7\"}#28ef3e2f\nE={\"id\":\"933a7de9-a5e5-467b-9272-df7840b96156\",\"v\":1,\"s\":\"M\",\"o\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"l\":\"label\\n with multi-lines\",\"i\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\"}#695be7c6\nE={\"id\":\"3d7cb93f-5ba2-45a2-b672-822d438df47b\",\"v\":1,\"s\":\"M\",\"o\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"l\":\"label\\n with multi-lines\",\"i\":\"3215900c-8252-4027-9956-22e43e46a123\"}#bcee1da4\nE={\"id\":\"ced4254b-e43c-4460-8e80-963aa93f3a97\",\"v\":1,\"s\":\"M\",\"o\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"l\":\"label\\n with multi-lines\",\"i\":\"a82b5a47-1213-4132-a5ef-66e52716f789\"}#7b95e590\nE={\"id\":\"f6da2faf-ee1f-4534-9bd5-db7cbc33cf55\",\"v\":1,\"s\":\"M\",\"o\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"l\":\"label\\n with multi-lines\",\"i\":\"a812c713-46c8-4895-a610-a616c6aa792d\"}#94b647ed\nE={\"id\":\"66247646-3490-412c-9aaa-0e4dd1c6a2dd\",\"v\":1,\"s\":\"M\",\"o\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\"}#1ff54eae\nE={\"id\":\"58240965-488d-4353-9670-74008dc4f2d8\",\"v\":1,\"s\":\"M\",\"o\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"l\":\"label\\n with multi-lines\",\"i\":\"77cf4be1-be66-45b8-903f-f1740d698120\"}#04e76170\nE={\"id\":\"90a1fae4-06eb-48fe-afc5-9f5c6b53fe4e\",\"v\":1,\"s\":\"M\",\"o\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"l\":\"label\\n with multi-lines\",\"i\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\"}#5904a3f9\nE={\"id\":\"6f0ad059-0b25-469b-bf84-3c02680cdcd5\",\"v\":1,\"s\":\"M\",\"o\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"l\":\"label\\n with multi-lines\",\"i\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\"}#52975593\nE={\"id\":\"24aeb471-4a07-4798-b33b-3ed68fd0db89\",\"v\":1,\"s\":\"M\",\"o\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"l\":\"label\\n with multi-lines\",\"i\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\"}#440d6a51\nE={\"id\":\"ef57d5bc-2701-43a7-ad56-c8d96983bd7a\",\"v\":1,\"s\":\"M\",\"o\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"l\":\"label\\n with multi-lines\",\"i\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\"}#23a3ea34\nE={\"id\":\"36c401da-dc33-4087-a50f-d6a9501cf72a\",\"v\":1,\"s\":\"M\",\"o\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"l\":\"label\\n with multi-lines\",\"i\":\"a632888c-7486-42cf-93d5-d1aff3395a47\"}#f56c8f9a\nE={\"id\":\"8026beaa-170a-45a0-8e7b-5cc5d7caa5fa\",\"v\":1,\"s\":\"M\",\"o\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"l\":\"label\\n with multi-lines\",\"i\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\"}#94780096\nE={\"id\":\"5a571fd9-91a4-47d8-a9b1-41616f741bd5\",\"v\":1,\"s\":\"M\",\"o\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\"}#5e506578\nE={\"id\":\"e8cda01d-e169-4277-a5e7-10e5847d615c\",\"v\":1,\"s\":\"M\",\"o\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\"}#d4cc0c42\nE={\"id\":\"e5448c3c-4fdf-4c7e-baa3-abb29171fa08\",\"v\":1,\"s\":\"M\",\"o\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"l\":\"label\\n with multi-lines\",\"i\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\"}#bf852970\nE={\"id\":\"945ddcb5-67df-4d91-b985-d02b51b2db18\",\"v\":1,\"s\":\"M\",\"o\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"l\":\"label\\n with multi-lines\",\"i\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\"}#67392e9f\nE={\"id\":\"fe528e79-9b14-41bb-a4be-49e3bf61e554\",\"v\":1,\"s\":\"M\",\"o\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"l\":\"label\\n with multi-lines\",\"i\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\"}#85393692\nE={\"id\":\"26114871-f2a7-4894-bd6d-1922c38c9861\",\"v\":1,\"s\":\"M\",\"o\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"l\":\"label\\n with multi-lines\",\"i\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\"}#dbe772fa\nE={\"id\":\"170b651d-830d-4065-847c-877d14e18d94\",\"v\":1,\"s\":\"M\",\"o\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"l\":\"label\\n with multi-lines\",\"i\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\"}#afca4775\nE={\"id\":\"6ab9736c-138f-4f6f-a3b0-65513eea5c56\",\"v\":1,\"s\":\"M\",\"o\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"l\":\"label\\n with multi-lines\",\"i\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\"}#7652a454\nE={\"id\":\"166e4435-7653-42b5-8904-a39d2c229351\",\"v\":1,\"s\":\"M\",\"o\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"l\":\"label\\n with multi-lines\",\"i\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\"}#eb0c9eb5\nE={\"id\":\"fa5be5aa-a293-4c98-8873-b7bad7ab7c21\",\"v\":1,\"s\":\"M\",\"o\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"l\":\"label\\n with multi-lines\",\"i\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\"}#0b3c2e65\nE={\"id\":\"1c6e222c-631c-45d0-bd98-924eeccfa0fb\",\"v\":1,\"s\":\"M\",\"o\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"l\":\"label\\n with multi-lines\",\"i\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\"}#d75d7386\nE={\"id\":\"c4e04a23-6c5e-4dd5-8246-66a49890322a\",\"v\":1,\"s\":\"M\",\"o\":\"3215900c-8252-4027-9956-22e43e46a123\",\"l\":\"label\\n with multi-lines\",\"i\":\"363fc50d-2628-424a-abf8-665b29a2b22d\"}#7e9dd200\nE={\"id\":\"4a9b3290-a265-4c0a-b0e9-0c66c1c0c1e6\",\"v\":1,\"s\":\"M\",\"o\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"l\":\"label\\n with multi-lines\",\"i\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\"}#b449d213\nE={\"id\":\"326d76e9-46a9-4b02-b905-9fa5322407cd\",\"v\":1,\"s\":\"M\",\"o\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"l\":\"label\\n with multi-lines\",\"i\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\"}#91bba6e7\nE={\"id\":\"32b3aac5-357c-4b0b-8ae0-de3c195bdad1\",\"v\":1,\"s\":\"M\",\"o\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"l\":\"label\\n with multi-lines\",\"i\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\"}#030a9a38\nE={\"id\":\"36f5cfa9-8202-4ac0-bb53-3cf6ae203d5b\",\"v\":1,\"s\":\"M\",\"o\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"l\":\"label\\n with multi-lines\",\"i\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\"}#3e1714b6\nE={\"id\":\"98c554d2-9182-4765-909c-edc5427ade5c\",\"v\":1,\"s\":\"M\",\"o\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"l\":\"label\\n with multi-lines\",\"i\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\"}#54b7e0ea\nE={\"id\":\"3aa10590-4115-4d70-817b-c5a06818215d\",\"v\":1,\"s\":\"M\",\"o\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"l\":\"label\\n with multi-lines\",\"i\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\"}#28be99f4\nE={\"id\":\"c58e03ad-3662-43c1-a881-94bef15f522f\",\"v\":1,\"s\":\"M\",\"o\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"l\":\"label\\n with multi-lines\",\"i\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\"}#d4fced2d\nE={\"id\":\"f77ba846-2fb4-4e2f-a5ec-3add32b7eac4\",\"v\":1,\"s\":\"M\",\"o\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"l\":\"label\\n with multi-lines\",\"i\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\"}#1d1dd7b9\nE={\"id\":\"7491c951-0cd7-42b5-ac96-ef4899cfbca1\",\"v\":1,\"s\":\"M\",\"o\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"l\":\"label\\n with multi-lines\",\"i\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\"}#07c00499\nE={\"id\":\"d789c47f-10ae-4ff3-9329-6d43ff030dfc\",\"v\":1,\"s\":\"M\",\"o\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"l\":\"label\\n with multi-lines\",\"i\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\"}#9e4e8277\nE={\"id\":\"b66c20f0-aeb1-4f67-9a26-32cdadff4649\",\"v\":1,\"s\":\"M\",\"o\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"l\":\"label\\n with multi-lines\",\"i\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\"}#03597b7d\nE={\"id\":\"3e4a3b19-82f6-47ff-bb75-d7c0cc5a87fa\",\"v\":1,\"s\":\"M\",\"o\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"l\":\"label\\n with multi-lines\",\"i\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\"}#00c8dcbb\nE={\"id\":\"9fffc00b-65a4-4515-9447-a13fde7a41ec\",\"v\":1,\"s\":\"M\",\"o\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"l\":\"label\\n with multi-lines\",\"i\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\"}#f26a66e8\nE={\"id\":\"a7fcdab0-845e-4105-8e99-bba06853aded\",\"v\":1,\"s\":\"M\",\"o\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"l\":\"label\\n with multi-lines\",\"i\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\"}#ffea950e\nE={\"id\":\"9a71606c-3154-4990-8c34-2329c84b27b0\",\"v\":1,\"s\":\"M\",\"o\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"l\":\"label\\n with multi-lines\",\"i\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\"}#378e5fc1\nL=9#0023783b\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/eB.txt",
    "content": "H=6#0021a662\nE={\"id\":\"804c73b7-1cd1-45fa-aa03-85d5656131a1\",\"v\":1,\"s\":\"M\",\"o\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"b31135af-901f-4ae6-9247-d8460a53682e\"}#cecefc15\nE={\"id\":\"03302f69-421e-4b7d-9e77-fb8d9dc25f05\",\"v\":1,\"s\":\"M\",\"o\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"l\":\"label\\n with multi-lines\",\"i\":\"081f8436-d6dc-42ee-84f6-53570de028c9\"}#5ded03fe\nE={\"id\":\"e1a8b2bd-6511-48c0-8d57-ebde590a332f\",\"v\":1,\"s\":\"M\",\"o\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"l\":\"label\\n with multi-lines\",\"i\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\"}#b3bdc3f6\nE={\"id\":\"8784ea77-bf40-4f04-925a-534a4528dde9\",\"v\":1,\"s\":\"M\",\"o\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\"}#7d7b5c12\nE={\"id\":\"f35d1f29-6cae-49bf-bf51-d31858c1692f\",\"v\":1,\"s\":\"M\",\"o\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"l\":\"label\\n with multi-lines\",\"i\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\"}#58ce3246\nE={\"id\":\"390a1fd4-d945-406d-91b2-57837420b211\",\"v\":1,\"s\":\"M\",\"o\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\"}#e85d1acc\nE={\"id\":\"58685e72-6ee6-4b8d-9554-47152e1eca3a\",\"v\":1,\"s\":\"M\",\"o\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"l\":\"label\\n with multi-lines\",\"i\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\"}#8b8cedbb\nE={\"id\":\"b499e4ed-cad6-431b-841b-bda5247b4066\",\"v\":1,\"s\":\"M\",\"o\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"l\":\"label\\n with multi-lines\",\"i\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\"}#0141ed12\nE={\"id\":\"904a0a02-ea6c-4e13-b2a7-0bf187073055\",\"v\":1,\"s\":\"M\",\"o\":\"d3477712-828c-467e-a500-d65e32097c85\",\"l\":\"label\\n with multi-lines\",\"i\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\"}#ccbf5428\nE={\"id\":\"77f64ad9-7407-4497-b5f2-3b45262eb03c\",\"v\":1,\"s\":\"M\",\"o\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\"}#24c69a9c\nE={\"id\":\"7a4250ff-fef3-422e-a2de-7e80295caab9\",\"v\":1,\"s\":\"M\",\"o\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"l\":\"label\\n with multi-lines\",\"i\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\"}#b431c9bd\nE={\"id\":\"521fd700-05f0-4765-b06b-78147af9c84b\",\"v\":1,\"s\":\"M\",\"o\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"l\":\"label\\n with multi-lines\",\"i\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\"}#5490d960\nE={\"id\":\"0680ce68-da10-4f0c-98bb-77dd6cfff0dd\",\"v\":1,\"s\":\"M\",\"o\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"l\":\"label\\n with multi-lines\",\"i\":\"d3477712-828c-467e-a500-d65e32097c85\"}#319a2a18\nE={\"id\":\"71fc2c5d-15ac-4f73-b18e-e5477f4d27fa\",\"v\":1,\"s\":\"M\",\"o\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"l\":\"label\\n with multi-lines\",\"i\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\"}#75c1b3d4\nE={\"id\":\"578ac1df-93d6-4013-ae61-29b7207c7e63\",\"v\":1,\"s\":\"M\",\"o\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"l\":\"label\\n with multi-lines\",\"i\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\"}#cedd1583\nE={\"id\":\"6205953c-a64e-42af-86b5-7e217f8002a5\",\"v\":1,\"s\":\"M\",\"o\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"l\":\"label\\n with multi-lines\",\"i\":\"302be4e2-b381-474a-a351-f275d6c3215a\"}#cfe9c78b\nE={\"id\":\"4338182a-d3cf-4aa0-8eae-a3be48ca9f69\",\"v\":1,\"s\":\"M\",\"o\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"l\":\"label\\n with multi-lines\",\"i\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\"}#95d4c4f0\nE={\"id\":\"95b128df-8d98-4ef4-9c2d-267912b36853\",\"v\":1,\"s\":\"M\",\"o\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"l\":\"label\\n with multi-lines\",\"i\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\"}#459a573f\nE={\"id\":\"f3e6a68e-9e86-4d06-b740-829a3cba2045\",\"v\":1,\"s\":\"M\",\"o\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"l\":\"label\\n with multi-lines\",\"i\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\"}#93e8bbc2\nE={\"id\":\"4e3e9254-dd08-4ec2-9c40-79f8d2d78ae3\",\"v\":1,\"s\":\"M\",\"o\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"l\":\"label\\n with multi-lines\",\"i\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\"}#f8ede449\nE={\"id\":\"0270e33b-8333-4cd9-9727-984a8c9647d0\",\"v\":1,\"s\":\"M\",\"o\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"l\":\"label\\n with multi-lines\",\"i\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\"}#2381309f\nE={\"id\":\"ef84c81b-585c-49a8-92b5-16a31630fdbb\",\"v\":1,\"s\":\"M\",\"o\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"l\":\"label\\n with multi-lines\",\"i\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\"}#b3da57e2\nE={\"id\":\"50e8ab98-9f19-47fd-aeb7-dd770c0c3b61\",\"v\":1,\"s\":\"M\",\"o\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"l\":\"label\\n with multi-lines\",\"i\":\"4964e145-32e6-4f51-98d8-5535f3546929\"}#2a173fd5\nE={\"id\":\"26be8423-2746-4c02-b414-9d178ae7a134\",\"v\":1,\"s\":\"M\",\"o\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"l\":\"label\\n with multi-lines\",\"i\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\"}#d80fdbe8\nE={\"id\":\"029090d7-1ade-4387-9882-6e9e925fb69c\",\"v\":1,\"s\":\"M\",\"o\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"l\":\"label\\n with multi-lines\",\"i\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\"}#1f13fbac\nE={\"id\":\"ccdb6e73-9217-4e84-aae1-3c0bd8fca7b0\",\"v\":1,\"s\":\"M\",\"o\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"l\":\"label\\n with multi-lines\",\"i\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\"}#7b1f430e\nE={\"id\":\"5292bbfb-d68c-44c1-832c-5cb42d992d8b\",\"v\":1,\"s\":\"M\",\"o\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"l\":\"label\\n with multi-lines\",\"i\":\"66ba0186-e709-4c05-8305-1ffed1143089\"}#a9a62e17\nE={\"id\":\"3000d197-68b2-4182-9e90-7ccecf58b199\",\"v\":1,\"s\":\"M\",\"o\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"l\":\"label\\n with multi-lines\",\"i\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\"}#851b7dc7\nE={\"id\":\"b846625b-7ee3-4487-9c30-fe77b001d283\",\"v\":1,\"s\":\"M\",\"o\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"l\":\"label\\n with multi-lines\",\"i\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\"}#3f115798\nE={\"id\":\"8263afcd-479b-4d6b-9c7e-5bcca31ed60b\",\"v\":1,\"s\":\"M\",\"o\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"l\":\"label\\n with multi-lines\",\"i\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\"}#accad448\nE={\"id\":\"9c3d1af2-8bb2-457d-b3d0-ecd7dbd81c3d\",\"v\":1,\"s\":\"M\",\"o\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"l\":\"label\\n with multi-lines\",\"i\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\"}#93fd7b76\nE={\"id\":\"273f0d1a-275e-46b3-b117-440bd70421c0\",\"v\":1,\"s\":\"M\",\"o\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"l\":\"label\\n with multi-lines\",\"i\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\"}#bcf386e3\nE={\"id\":\"107e4a36-a580-42ca-a22e-fa3895e620ba\",\"v\":1,\"s\":\"M\",\"o\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"l\":\"label\\n with multi-lines\",\"i\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\"}#1dd69b3e\nE={\"id\":\"74a55bd0-2f0a-45b5-939a-6f20f9f2aba3\",\"v\":1,\"s\":\"M\",\"o\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"l\":\"label\\n with multi-lines\",\"i\":\"e1332322-88c0-4468-a862-9f45311067ac\"}#363de35e\nE={\"id\":\"240afb59-0dc3-4b0f-bbbd-84ec63ea56b5\",\"v\":1,\"s\":\"M\",\"o\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"l\":\"label\\n with multi-lines\",\"i\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\"}#78bfcd48\nE={\"id\":\"79c976e5-3e7d-4407-8d78-8984e8ee32fe\",\"v\":1,\"s\":\"M\",\"o\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"l\":\"label\\n with multi-lines\",\"i\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\"}#fa291de8\nE={\"id\":\"219d3214-1850-4ac1-a7ff-573c69a88af8\",\"v\":1,\"s\":\"M\",\"o\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a756d65-e069-4e58-ae8e-3abf082496da\"}#b7cb1ad6\nE={\"id\":\"b0dcdd0c-deba-4a7d-8402-17f29f4489f1\",\"v\":1,\"s\":\"M\",\"o\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\"}#70a943df\nE={\"id\":\"d6070049-6365-4703-802c-748261c70508\",\"v\":1,\"s\":\"M\",\"o\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"l\":\"label\\n with multi-lines\",\"i\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\"}#7bafba80\nE={\"id\":\"f4910b68-7843-450c-aee3-da4516f7b118\",\"v\":1,\"s\":\"M\",\"o\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"l\":\"label\\n with multi-lines\",\"i\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\"}#d930e97e\nE={\"id\":\"6bf0cca9-8f51-4c1d-a6d2-c66ca90cedf5\",\"v\":1,\"s\":\"M\",\"o\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"l\":\"label\\n with multi-lines\",\"i\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\"}#92a8e6d4\nE={\"id\":\"14894ace-b151-4509-a8f5-5181b4e463d0\",\"v\":1,\"s\":\"M\",\"o\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"l\":\"label\\n with multi-lines\",\"i\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\"}#fadafbf0\nE={\"id\":\"aff119c4-d6a2-4cb8-924d-e8e5b73bdc4d\",\"v\":1,\"s\":\"M\",\"o\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\"}#034f405d\nE={\"id\":\"29282d33-da5c-4663-9e10-f5161cd2cc2d\",\"v\":1,\"s\":\"M\",\"o\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"l\":\"label\\n with multi-lines\",\"i\":\"108a0886-27a2-4f6e-bc12-67b051861197\"}#46edab09\nE={\"id\":\"3325e648-670a-4db8-ace3-6d37a0cd1b06\",\"v\":1,\"s\":\"M\",\"o\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"l\":\"label\\n with multi-lines\",\"i\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\"}#ead36f3d\nE={\"id\":\"0c635c4e-4aa1-4f7c-8be3-764df35c8567\",\"v\":1,\"s\":\"M\",\"o\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"l\":\"label\\n with multi-lines\",\"i\":\"846a5573-1815-4629-8be0-55eda1204b7d\"}#6e4fcae9\nE={\"id\":\"73ad443e-f233-4089-8179-f59c08b42239\",\"v\":1,\"s\":\"M\",\"o\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"l\":\"label\\n with multi-lines\",\"i\":\"7a014bff-371e-4740-8a43-33e03685a99f\"}#94272859\nE={\"id\":\"b0ccc7f4-c1cb-4eaa-94f7-221b7a1853bd\",\"v\":1,\"s\":\"M\",\"o\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"l\":\"label\\n with multi-lines\",\"i\":\"22e3370a-2d70-4e35-9599-ab78b814532e\"}#4459e173\nE={\"id\":\"23a2f626-0163-4d27-b1df-e54bb33f1d88\",\"v\":1,\"s\":\"M\",\"o\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"l\":\"label\\n with multi-lines\",\"i\":\"949e4daf-c136-4716-b23a-73e25c6489cc\"}#81418acb\nE={\"id\":\"e6b5344a-31db-49d3-9fa6-585d91cafef3\",\"v\":1,\"s\":\"M\",\"o\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"l\":\"label\\n with multi-lines\",\"i\":\"699e450b-51c1-4ade-a5d4-82404cd81654\"}#18011a65\nE={\"id\":\"a3ff3cc3-e427-476f-b67a-2053d0311ee2\",\"v\":1,\"s\":\"M\",\"o\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"l\":\"label\\n with multi-lines\",\"i\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\"}#2760c68c\nE={\"id\":\"bd876c2e-f1d9-46b5-9ebb-3212531c6262\",\"v\":1,\"s\":\"M\",\"o\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"l\":\"label\\n with multi-lines\",\"i\":\"8e06501f-3cb1-4a85-b148-407a711373c1\"}#8392c5e8\nE={\"id\":\"39019d0e-03a4-41bf-a525-d3b83891dbb6\",\"v\":1,\"s\":\"M\",\"o\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"l\":\"label\\n with multi-lines\",\"i\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\"}#b48e26ff\nE={\"id\":\"ae4e5f58-160c-4dd0-b9a3-6a2754f1001f\",\"v\":1,\"s\":\"M\",\"o\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"l\":\"label\\n with multi-lines\",\"i\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\"}#3a6aa91e\nE={\"id\":\"93c2953a-2fd2-4caa-b9a6-963ba7773599\",\"v\":1,\"s\":\"M\",\"o\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"l\":\"label\\n with multi-lines\",\"i\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\"}#fc73b93b\nE={\"id\":\"f3b7d6ec-4415-44b3-a981-1918f81ef851\",\"v\":1,\"s\":\"M\",\"o\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"l\":\"label\\n with multi-lines\",\"i\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\"}#55868086\nE={\"id\":\"6b27ad0c-e310-433a-9058-35ce7a8d1704\",\"v\":1,\"s\":\"M\",\"o\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"l\":\"label\\n with multi-lines\",\"i\":\"b83eac55-4589-4a17-90cc-cb24640727f1\"}#8f39461c\nE={\"id\":\"dd67b143-3a7c-4c54-a3b8-f459812e5e8e\",\"v\":1,\"s\":\"M\",\"o\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"l\":\"label\\n with multi-lines\",\"i\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\"}#d2499996\nE={\"id\":\"db6905ca-2e48-44ce-850c-fa594c852678\",\"v\":1,\"s\":\"M\",\"o\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"l\":\"label\\n with multi-lines\",\"i\":\"d41954be-3d11-473e-92c3-209fabfc13e3\"}#5ab08e5b\nE={\"id\":\"7d8860a2-7d8c-4754-80f8-c0f4e840b6b1\",\"v\":1,\"s\":\"M\",\"o\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"l\":\"label\\n with multi-lines\",\"i\":\"9a37b710-2dce-4283-994a-a95975660ae7\"}#28ef3e2f\nE={\"id\":\"933a7de9-a5e5-467b-9272-df7840b96156\",\"v\":1,\"s\":\"M\",\"o\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"l\":\"label\\n with multi-lines\",\"i\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\"}#695be7c6\nE={\"id\":\"3d7cb93f-5ba2-45a2-b672-822d438df47b\",\"v\":1,\"s\":\"M\",\"o\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"l\":\"label\\n with multi-lines\",\"i\":\"3215900c-8252-4027-9956-22e43e46a123\"}#bcee1da4\nE={\"id\":\"ced4254b-e43c-4460-8e80-963aa93f3a97\",\"v\":1,\"s\":\"M\",\"o\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"l\":\"label\\n with multi-lines\",\"i\":\"a82b5a47-1213-4132-a5ef-66e52716f789\"}#7b95e590\nE={\"id\":\"f6da2faf-ee1f-4534-9bd5-db7cbc33cf55\",\"v\":1,\"s\":\"M\",\"o\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"l\":\"label\\n with multi-lines\",\"i\":\"a812c713-46c8-4895-a610-a616c6aa792d\"}#94b647ed\nE={\"id\":\"66247646-3490-412c-9aaa-0e4dd1c6a2dd\",\"v\":1,\"s\":\"M\",\"o\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\"}#1ff54eae\nE={\"id\":\"58240965-488d-4353-9670-74008dc4f2d8\",\"v\":1,\"s\":\"M\",\"o\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"l\":\"label\\n with multi-lines\",\"i\":\"77cf4be1-be66-45b8-903f-f1740d698120\"}#04e76170\nE={\"id\":\"90a1fae4-06eb-48fe-afc5-9f5c6b53fe4e\",\"v\":1,\"s\":\"M\",\"o\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"l\":\"label\\n with multi-lines\",\"i\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\"}#5904a3f9\nE={\"id\":\"6f0ad059-0b25-469b-bf84-3c02680cdcd5\",\"v\":1,\"s\":\"M\",\"o\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"l\":\"label\\n with multi-lines\",\"i\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\"}#52975593\nE={\"id\":\"24aeb471-4a07-4798-b33b-3ed68fd0db89\",\"v\":1,\"s\":\"M\",\"o\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"l\":\"label\\n with multi-lines\",\"i\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\"}#440d6a51\nE={\"id\":\"ef57d5bc-2701-43a7-ad56-c8d96983bd7a\",\"v\":1,\"s\":\"M\",\"o\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"l\":\"label\\n with multi-lines\",\"i\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\"}#23a3ea34\nE={\"id\":\"36c401da-dc33-4087-a50f-d6a9501cf72a\",\"v\":1,\"s\":\"M\",\"o\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"l\":\"label\\n with multi-lines\",\"i\":\"a632888c-7486-42cf-93d5-d1aff3395a47\"}#f56c8f9a\nE={\"id\":\"8026beaa-170a-45a0-8e7b-5cc5d7caa5fa\",\"v\":1,\"s\":\"M\",\"o\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"l\":\"label\\n with multi-lines\",\"i\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\"}#94780096\nE={\"id\":\"5a571fd9-91a4-47d8-a9b1-41616f741bd5\",\"v\":1,\"s\":\"M\",\"o\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"l\":\"label\\n with multi-lines\",\"i\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\"}#5e506578\nE={\"id\":\"e8cda01d-e169-4277-a5e7-10e5847d615c\",\"v\":1,\"s\":\"M\",\"o\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"l\":\"label\\n with multi-lines\",\"i\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\"}#d4cc0c42\nE={\"id\":\"e5448c3c-4fdf-4c7e-baa3-abb29171fa08\",\"v\":1,\"s\":\"M\",\"o\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"l\":\"label\\n with multi-lines\",\"i\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\"}#bf852970\nE={\"id\":\"945ddcb5-67df-4d91-b985-d02b51b2db18\",\"v\":1,\"s\":\"M\",\"o\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"l\":\"label\\n with multi-lines\",\"i\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\"}#67392e9f\nE={\"id\":\"fe528e79-9b14-41bb-a4be-49e3bf61e554\",\"v\":1,\"s\":\"M\",\"o\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"l\":\"label\\n with multi-lines\",\"i\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\"}#85393692\nE={\"id\":\"26114871-f2a7-4894-bd6d-1922c38c9861\",\"v\":1,\"s\":\"M\",\"o\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"l\":\"label\\n with multi-lines\",\"i\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\"}#dbe772fa\nE={\"id\":\"170b651d-830d-4065-847c-877d14e18d94\",\"v\":1,\"s\":\"M\",\"o\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"l\":\"label\\n with multi-lines\",\"i\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\"}#afca4775\nE={\"id\":\"6ab9736c-138f-4f6f-a3b0-65513eea5c56\",\"v\":1,\"s\":\"M\",\"o\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"l\":\"label\\n with multi-lines\",\"i\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\"}#7652a454\nE={\"id\":\"166e4435-7653-42b5-8904-a39d2c229351\",\"v\":1,\"s\":\"M\",\"o\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"l\":\"label\\n with multi-lines\",\"i\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\"}#eb0c9eb5\nE={\"id\":\"fa5be5aa-a293-4c98-8873-b7bad7ab7c21\",\"v\":1,\"s\":\"M\",\"o\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"l\":\"label\\n with multi-lines\",\"i\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\"}#0b3c2e65\nE={\"id\":\"1c6e222c-631c-45d0-bd98-924eeccfa0fb\",\"v\":1,\"s\":\"M\",\"o\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"l\":\"label\\n with multi-lines\",\"i\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\"}#d75d7386\nE={\"id\":\"c4e04a23-6c5e-4dd5-8246-66a49890322a\",\"v\":1,\"s\":\"M\",\"o\":\"3215900c-8252-4027-9956-22e43e46a123\",\"l\":\"label\\n with multi-lines\",\"i\":\"363fc50d-2628-424a-abf8-665b29a2b22d\"}#7e9dd200\nE={\"id\":\"4a9b3290-a265-4c0a-b0e9-0c66c1c0c1e6\",\"v\":1,\"s\":\"M\",\"o\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"l\":\"label\\n with multi-lines\",\"i\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\"}#b449d213\nE={\"id\":\"326d76e9-46a9-4b02-b905-9fa5322407cd\",\"v\":1,\"s\":\"M\",\"o\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"l\":\"label\\n with multi-lines\",\"i\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\"}#91bba6e7\nE={\"id\":\"32b3aac5-357c-4b0b-8ae0-de3c195bdad1\",\"v\":1,\"s\":\"M\",\"o\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"l\":\"label\\n with multi-lines\",\"i\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\"}#030a9a38\nE={\"id\":\"36f5cfa9-8202-4ac0-bb53-3cf6ae203d5b\",\"v\":1,\"s\":\"M\",\"o\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"l\":\"label\\n with multi-lines\",\"i\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\"}#3e1714b6\nE={\"id\":\"98c554d2-9182-4765-909c-edc5427ade5c\",\"v\":1,\"s\":\"M\",\"o\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"l\":\"label\\n with multi-lines\",\"i\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\"}#54b7e0ea\nE={\"id\":\"3aa10590-4115-4d70-817b-c5a06818215d\",\"v\":1,\"s\":\"M\",\"o\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"l\":\"label\\n with multi-lines\",\"i\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\"}#28be99f4\nE={\"id\":\"c58e03ad-3662-43c1-a881-94bef15f522f\",\"v\":1,\"s\":\"M\",\"o\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"l\":\"label\\n with multi-lines\",\"i\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\"}#d4fced2d\nE={\"id\":\"f77ba846-2fb4-4e2f-a5ec-3add32b7eac4\",\"v\":1,\"s\":\"M\",\"o\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"l\":\"label\\n with multi-lines\",\"i\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\"}#1d1dd7b9\nE={\"id\":\"7491c951-0cd7-42b5-ac96-ef4899cfbca1\",\"v\":1,\"s\":\"M\",\"o\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"l\":\"label\\n with multi-lines\",\"i\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\"}#07c00499\nE={\"id\":\"d789c47f-10ae-4ff3-9329-6d43ff030dfc\",\"v\":1,\"s\":\"M\",\"o\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"l\":\"label\\n with multi-lines\",\"i\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\"}#9e4e8277\nE={\"id\":\"b66c20f0-aeb1-4f67-9a26-32cdadff4649\",\"v\":1,\"s\":\"M\",\"o\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"l\":\"label\\n with multi-lines\",\"i\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\"}#03597b7d\nE={\"id\":\"3e4a3b19-82f6-47ff-bb75-d7c0cc5a87fa\",\"v\":1,\"s\":\"M\",\"o\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"l\":\"label\\n with multi-lines\",\"i\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\"}#00c8dcbb\nE={\"id\":\"9fffc00b-65a4-4515-9447-a13fde7a41ec\",\"v\":1,\"s\":\"M\",\"o\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"l\":\"label\\n with multi-lines\",\"i\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\"}#f26a66e8\nE={\"id\":\"a7fcdab0-845e-4105-8e99-bba06853aded\",\"v\":1,\"s\":\"M\",\"o\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"l\":\"label\\n with multi-lines\",\"i\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\"}#ffea950e\nE={\"id\":\"9a71606c-3154-4990-8c34-2329c84b27b0\",\"v\":1,\"s\":\"M\",\"o\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"l\":\"label\\n with multi-lines\",\"i\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\"}#378e5fc1\nL=9#0023783b\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/metaA.txt",
    "content": "H=7#0021a681\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/metaB.txt",
    "content": "H=8#0021a6a0\nM=1.5#86d7bafb\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/txA.txt",
    "content": "H=9#0021a6bf\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/txB.txt",
    "content": "H=10#041314cf\n"
  },
  {
    "path": "src/test/resources/recovery/stage7/vA.txt",
    "content": ""
  },
  {
    "path": "src/test/resources/recovery/stage7/vB.txt",
    "content": "H=4#0021a624\nV={\"id\":\"a2be48e3-447e-4b50-9c20-a47f451776ce\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d87902cd\nV={\"id\":\"e1332322-88c0-4468-a862-9f45311067ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#aa782433\nV={\"id\":\"7a014bff-371e-4740-8a43-33e03685a99f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d9dcfe68\nV={\"id\":\"7a756d65-e069-4e58-ae8e-3abf082496da\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1789f3b0\nV={\"id\":\"66ba0186-e709-4c05-8305-1ffed1143089\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7d990817\nV={\"id\":\"8cef44fe-c1da-4e42-a419-b3335f2bc082\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4ac30bc3\nV={\"id\":\"a632888c-7486-42cf-93d5-d1aff3395a47\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#76b366a2\nV={\"id\":\"e13c1828-9387-4f8d-bc8d-85068c1ab83e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2c9685a9\nV={\"id\":\"b83eac55-4589-4a17-90cc-cb24640727f1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d55fc916\nV={\"id\":\"c7d856f1-1cd4-4ee4-823a-5c47ebb90234\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#c202de9e\nV={\"id\":\"ede79496-ae89-47aa-8804-dcf91f0284ad\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0295aae5\nV={\"id\":\"220b5f15-0158-498c-90d5-fdf8a66b068c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7a5fc823\nV={\"id\":\"bd6aabde-c6ae-455e-8242-eff4eeb6657b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d80bfa12\nV={\"id\":\"95e208d9-07eb-4e9f-8b2a-e9da75e4d570\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9c01de21\nV={\"id\":\"bfe8b5e1-8c4f-4b2f-bce2-d2b38aa29a3b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d4026b13\nV={\"id\":\"d41954be-3d11-473e-92c3-209fabfc13e3\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ec7dabc2\nV={\"id\":\"f7299af0-5fcb-4e49-a6e6-1c8218053a69\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#06e0d8fd\nV={\"id\":\"e4eb84bd-8373-4039-ace6-c5b2ca80dd42\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#68539f98\nV={\"id\":\"faecc6f4-cbe1-456f-bb63-8cf3236ecc91\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#2e651e6d\nV={\"id\":\"1d9676f1-307f-4770-bab2-cea6e2374f22\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a8d960db\nV={\"id\":\"f1f83e58-beda-4e68-b85b-f648af822d5d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0ee5dd7a\nV={\"id\":\"9e1a047d-d774-4cae-b393-b512d85f99d8\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#01f4651e\nV={\"id\":\"bc7e7469-3315-4a3c-86df-0354f0789a34\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b5a86012\nV={\"id\":\"6e4f1905-20f9-4ebd-b3c4-5faae4230479\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3023947b\nV={\"id\":\"c63f77e6-e0ae-41ce-86e3-0604b7ffac48\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#659f6b90\nV={\"id\":\"8367ce73-7f60-4a9f-8b02-7209f57294ac\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9f19fdc6\nV={\"id\":\"0cdfab37-7d6c-45a1-b96d-50fbfd736f23\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#543854c2\nV={\"id\":\"07034bd6-031c-4a1b-add5-02b94c997c4e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#789edfec\nV={\"id\":\"33e20bcb-8dcc-4861-9e9b-f5c774b8963e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d88ddfcf\nV={\"id\":\"7bd6d746-76a4-4b92-957e-c4b398b7ee24\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#856fdc7b\nV={\"id\":\"94c30168-b6d7-4353-bbb7-6f987cac8d4a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#002de60b\nV={\"id\":\"846a5573-1815-4629-8be0-55eda1204b7d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#16b7df3c\nV={\"id\":\"139a92ca-7eea-4e81-b4e4-9065e87dea07\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5e4fac97\nV={\"id\":\"52cfcc24-f07c-4c86-bd78-8033e2ff9032\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#09a249df\nV={\"id\":\"c8a6e49f-de83-44ec-abc1-480f6c4538ef\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d40e0349\nV={\"id\":\"9499885e-8c9c-4323-8d91-9f32fdb83e51\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#17e2d350\nV={\"id\":\"fe751078-680f-44f3-855f-fef5d4b6db1c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#d3c0284a\nV={\"id\":\"3f2b10bd-d6fb-48e6-b6e1-cf3c526b6cc7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#df930bc8\nV={\"id\":\"65f95ec7-7682-4989-a6ca-474f8d93807e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#44a6a41f\nV={\"id\":\"5f77efd7-031b-4f0e-a60a-1579896a4f78\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7c66cbb9\nV={\"id\":\"35af7bb4-7e60-43c6-ac61-95f70e196200\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#84f46339\nV={\"id\":\"1d7aabe3-c019-4927-86b2-0deb8048cf1f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fc359ab8\nV={\"id\":\"a93cfbd6-08ec-4632-8877-2f3ce582ce3e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0c26173d\nV={\"id\":\"29532ad8-fc4c-44c0-b08d-1e3745e304bd\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9e230e54\nV={\"id\":\"39ff5c91-f4d9-4967-91c4-379539a5cae9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5c13abde\nV={\"id\":\"ccdb7b2b-a48d-4ac7-8b4e-5dc423767d38\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#0a378f9e\nV={\"id\":\"38dea2e4-06b0-41d4-ad74-6f2bbd8fdfd0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#6c54f7f3\nV={\"id\":\"ed285887-8c38-4d4e-b6a5-742d6bb8c116\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e0cd633c\nV={\"id\":\"d6706433-998c-44df-9cb2-3134f6c50f7c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a050e387\nV={\"id\":\"bf6bd405-b1fe-448c-a430-513d62ff4b27\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8c772382\nV={\"id\":\"b31135af-901f-4ae6-9247-d8460a53682e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#48dc1c88\nV={\"id\":\"949e4daf-c136-4716-b23a-73e25c6489cc\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#cd306e45\nV={\"id\":\"7766492c-5034-41ba-bc49-f5a3763f42d2\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5c9e9901\nV={\"id\":\"85763e90-2b85-49fa-a8dd-f2b5b34203df\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#27f6895c\nV={\"id\":\"956ffca0-6d7d-49eb-a50b-79e95785c159\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#73e24a90\nV={\"id\":\"9abbecd3-ec6b-4352-9fd9-01fb66712353\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#652b6f75\nV={\"id\":\"349c90bf-1b64-4384-8da7-04fe0f05750d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#14969f70\nV={\"id\":\"77cf4be1-be66-45b8-903f-f1740d698120\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#40757213\nV={\"id\":\"8131d873-ec97-4b5a-ace3-d40bfa231901\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#aa0b8894\nV={\"id\":\"302be4e2-b381-474a-a351-f275d6c3215a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ca907a78\nV={\"id\":\"3476ea95-2132-47d5-91ca-d3bbbb7a746a\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#276cc2b7\nV={\"id\":\"290a756b-c37d-4a25-98a1-f9797bb6bd06\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9226606e\nV={\"id\":\"d5ac897f-e371-47e2-b762-119aae3ec499\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#abad5d27\nV={\"id\":\"b6c489fa-e1a0-43c2-aee8-557a441e050c\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#02664edd\nV={\"id\":\"db8fafa3-d3c6-4309-8495-873bbfea43d4\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5aac2742\nV={\"id\":\"e822a859-e9ff-44d2-b212-f8486ecace9b\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#8fed3b2b\nV={\"id\":\"0f531e1e-984d-4ff3-a5db-bbeb3ac63337\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3cd6aa34\nV={\"id\":\"e462c11b-2ba9-4141-b19a-b1d6bfa1ff55\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#af05fef6\nV={\"id\":\"8704e90a-ef77-40d7-becc-6ca51a690ce5\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#644e9886\nV={\"id\":\"ceb6ebd1-70ac-415c-afda-02aaa9d3e908\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#a50971fd\nV={\"id\":\"07caa96c-b1b7-4fd4-8323-1156e6c9b85d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#49d49997\nV={\"id\":\"a5004f7a-6026-4a3a-9bcb-fb08b28f56db\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#888d1d8a\nV={\"id\":\"d3477712-828c-467e-a500-d65e32097c85\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ca090713\nV={\"id\":\"081f8436-d6dc-42ee-84f6-53570de028c9\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#7e076c38\nV={\"id\":\"8e06501f-3cb1-4a85-b148-407a711373c1\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e9fa1c69\nV={\"id\":\"baba358e-63d0-47d1-a5ad-2cb46f85738f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3deadc99\nV={\"id\":\"a812c713-46c8-4895-a610-a616c6aa792d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f4a858cc\nV={\"id\":\"0fc01de7-2c14-4afc-b3a8-2be5a6febfa0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#55201a53\nV={\"id\":\"cab5d547-beb9-46d8-b214-f451e3c0a242\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#fac5140e\nV={\"id\":\"22e3370a-2d70-4e35-9599-ab78b814532e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#50f68f15\nV={\"id\":\"363fc50d-2628-424a-abf8-665b29a2b22d\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#b8306b9f\nV={\"id\":\"699e450b-51c1-4ade-a5d4-82404cd81654\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c0d2af1\nV={\"id\":\"7653211b-066f-4344-8ee6-b4c5ccc0fc54\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#22f5e62b\nV={\"id\":\"8d077095-ea36-4b46-9fd3-b075a9b963ad\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#684a6ef8\nV={\"id\":\"55378ed2-4cdb-49e1-ba3d-24622667ba01\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#610a0d9a\nV={\"id\":\"8e04e3e8-664e-4a02-be7e-40ce9ac91a83\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#4c3ac78a\nV={\"id\":\"3215900c-8252-4027-9956-22e43e46a123\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#59ca2086\nV={\"id\":\"a82b5a47-1213-4132-a5ef-66e52716f789\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#ddf0444a\nV={\"id\":\"350e3968-ae9c-49ce-ad48-f312b2dd2562\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#022a1502\nV={\"id\":\"cb5f20bb-50b8-4e8e-a568-fff9c9c962a0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9fb771a1\nV={\"id\":\"89b0cc8d-0486-4525-bea6-86caa63afb46\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#1a2764ae\nV={\"id\":\"2fcfc3c5-5cae-4c03-997e-1118e3f3d85e\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#9f8320df\nV={\"id\":\"21e36fe0-54ca-4db6-9d37-dfa23ffc4b88\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#678773ff\nV={\"id\":\"108a0886-27a2-4f6e-bc12-67b051861197\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#add271f2\nV={\"id\":\"dca84ff0-4783-4cee-9127-01cfd22316d0\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#f01f5146\nV={\"id\":\"9a37b710-2dce-4283-994a-a95975660ae7\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#dae1035b\nV={\"id\":\"4964e145-32e6-4f51-98d8-5535f3546929\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#3685d37d\nV={\"id\":\"3ec1e3a3-1351-46ae-a291-a8f4cf86acfe\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#5d60db4a\nV={\"id\":\"7c142297-d8a4-41c7-8dbf-fdfd3b11c4ce\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#775e846b\nV={\"id\":\"c0c43d88-345c-4b0e-a0c1-b907c025948f\",\"v\":1,\"s\":\"M\",\"p\":{\"foo\":\"something \\n multi-line\"}}#e78d9fb3\nV={\"id\":\"606a8426-a75b-4ab2-9a37-0cbcaafa0e1c\",\"v\":1,\"s\":\"M\"}#b7016099\nL=9#0023783b\n"
  }
]